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

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:

主站蜘蛛池模板: 阳朔县| 同德县| 运城市| 河间市| 天祝| 奎屯市| 玉溪市| 江达县| 和平县| 嘉善县| 邢台市| 轮台县| 红安县| 时尚| 谢通门县| 沅陵县| 土默特右旗| 博客| 咸宁市| 宁陕县| 泰州市| 亚东县| 北京市| 鹤山市| 晋城| 临清市| 浦县| 台北市| 阜城县| 平和县| 昌图县| 普兰店市| 富裕县| 三门县| 凤台县| 云霄县| 兴隆县| 辽阳市| 怀远县| 肥乡县| 北碚区|