How to install Mongodb on centos

1) sudo vi /etc/yum.repos.d/mongodb-org-3.6.repo
press i : for insert mode
then write –
[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc

2) sudo yum update
3) sudo yum install mongodb-org
4) sudo systemctl start mongod
5) sudo systemctl reload mongod
6) sudo systemctl enable mongod
7) sudo yum install php-mongo
8) sudo apachectl restart

More – Mongodb

Leave a Reply

Your email address will not be published. Required fields are marked *