Add the following in yum repository configuration file
$ sudo vi /etc/yum.repos.d/mongodb.repo
[Mongodb]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/8Server/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
Install MongoDB
$ sudo dnf install mongodb-org
Start MongoDB Service
$ sudo systemctl enable mongod.service
$ sudo systemctl start mongod.service
Top comments (0)