1.
Create yum repository for MongoDB
Create a new repository for yum in fedora
#>cd /etc/yum.repos.d
#>touch mongodb.repo
#>vi /etc/yum.repos.d/mongodb.repo
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
2.Install MongoDB
Use yum to install the latest mongodb
#>yum -y install mongodb-org mongodb-org-server
3.Start MongoDB service
Start & Enable mongod service
#>systemctl start mongod
#>systemctl enable mongod
4.Create Admin User
You need a user to be able to connect remotely
#>mongo
use admin
db.createUser(
{
user: "Admin",
pwd: "password",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
}
5.Check MongoDB Service Status
Check the service status
#>systemctl status mongod
6.Summary List of Status Statistics
Monitor what is happening with your database
#>mongostat