Website: https://www.mongodb.org/
Installation can refer to the official documentation: https://docs.mongodb.org/manual/tutorial/install-mongodb-enterprise-on-red-hat/
1. Create File:/etc/yum.repos.d/mongodb-enterprise.repo
Specific content (set up the latest version of the installation source):
[Mongodb-enterprise] name=MongoDB Enterprise Repositorybaseurl=https://repo.mongodb.com/yum/redhat/$ releasever/mongodb-enterprise/stable/$basearch/gpgcheck=0Enabled=1
2. Installation:
Yum Install-y mongodb-enterprise
3. Set the port to be able to pass through the system firewall
Semanage port-a-t mongod_port_t-p TCP 27017
4, modify the configuration file:/etc/mongod.conf
Log file default path:/var/log/mongodb/mongod.log
Data file default path:/var/lib/mongo
(You need to set read and write permissions for the default user mongod when modifying paths)
5. Start and close:
Service Mongod Start
Service Mongod Stop
Service Mongod Restart
6. Set Power on reboot:
Chkconfig Mongod on
7. Uninstall:
$ (Rpm-qa | grep mongodb-enterprise)
MongoDB3.0 Installation