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

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:

主站蜘蛛池模板: 兴城市| 成安县| 仁怀市| 乌苏市| 永济市| 明水县| 临猗县| 达尔| 马公市| 达尔| 宾阳县| 喀什市| 衡阳县| 忻州市| 桃江县| 通城县| 南安市| 木兰县| 阿瓦提县| 邵阳县| 兰坪| 上高县| 邹城市| 浮山县| 伊川县| 拉萨市| 弋阳县| 定日县| 江源县| 许昌市| 开平市| 湘乡市| 云安县| 陵水| 秦安县| 涞源县| 拜泉县| 江口县| 临桂县| 东兴市| 广水市|