官术网_书友最值得收藏!

Configure and run MongoDB on RHEL/Fedora/CentOS

If you followed the procedure outlined previously, a configuration file /etc/mongod.conf will have been auto-generated by the installation script. By default, database files will be placed in /var/lib/mongodb and log files in /var/log/mongodb/mongod.log. Here is an example of the auto-generated file for MongoDB v4.0 on CentOS 7:

You are now able to perform these operations:

    
Operation           Command
Start | stop | restart the server           /bin/systemctl start|stop|restart mongod.service
Access MongoDB via the shell (covered later)           mongo --host 127.0.0.1:27017

After starting the service, use the command /bin/systemctl status mongod.service to confirm the status of MongoDB:

主站蜘蛛池模板: 时尚| 分宜县| 开阳县| 镇坪县| 木兰县| 咸阳市| 林甸县| 河间市| 河源市| 门头沟区| 夏邑县| 汉源县| 定结县| 衡山县| 河池市| 开平市| 百色市| 加查县| 仙桃市| 东山县| 石柱| 都昌县| 蒙城县| 元氏县| 白朗县| 桃园市| 澜沧| 乌什县| 临洮县| 日喀则市| 五原县| 宁远县| 纳雍县| 巍山| 浠水县| 集安市| 鹿泉市| 高州市| 浠水县| 绩溪县| 玛曲县|