0% found this document useful (0 votes)
177 views1 page

Install and Configure MongoDB on Fedora

The document outlines the steps to install and configure MongoDB on a Fedora system: 1) create a yum repository for MongoDB, 2) install MongoDB using yum, 3) start and enable the MongoDB service, 4) create an admin user, 5) check the status of the MongoDB service, and 6) use mongostat to monitor the database status and statistics.

Uploaded by

Eugen T. Morar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views1 page

Install and Configure MongoDB on Fedora

The document outlines the steps to install and configure MongoDB on a Fedora system: 1) create a yum repository for MongoDB, 2) install MongoDB using yum, 3) start and enable the MongoDB service, 4) create an admin user, 5) check the status of the MongoDB service, and 6) use mongostat to monitor the database status and statistics.

Uploaded by

Eugen T. Morar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like