Install MongoDB 4 on CentOS 7
Create file
1 |
vi /etc/yum.repos.d/mongodb-org-4.0.repo |
Add
1 2 3 4 5 6 |
[mongodb-org-4.0] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/testing/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc |
Install MongoDB with
1 |
yum install -y mongodb-org |
Set MongoDB to start on boot.
1 |
chkconfig mongod on |
Start MongoDB
1 |
service mongod start |