In this Blog you can learn database, networking and cloud skills that will help you to understand Oracle Database and Non Oracle Database with extra key skill

Installation of MongoDB using yum on Oracle Linux 6

No comments :
Image result for mongodb image

Installing MONGODB using yum on Oracle Linux 6

Reference: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/

1) Configure the package management system (yum)
Create a /etc/yum.repos.d/mongodb-org-4.0.repo file so that you can install MongoDB directly using yum:

# vi /etc/yum.repos.d/mongodb-org-4.0.repo

save the following content:

[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

2) Install the MongoDB packages
# yum install -y mongodb-org
or
To install a specific release of MongoDB, specify each component package individually
yum install -y mongodb-org-4.0.5 mongodb-org-server-4.0.5 mongodb-org-shell-4.0.5 mongodb-org-mongos-4.0.5 mongodb-org-tools-4.0.5

Note:  By default, MongoDB runs using the mongod user account and uses the following default directories:

/var/lib/mongo (the data directory)
/var/log/mongodb (the log directory)

[root@dgstby ~]# ls -lrt /var/log/mongodb/mongod.log
-rw-r----- 1 mongod mongod 4429 Jan 31 15:20 /var/log/mongodb/mongod.log

Start MongoDB 
service mongod start
Verify that MongoDB has started successfully
verify that the mongod process has started successfully by checking the contents of the log file at /var/log/mongodb/mongod.log
[initandlisten] waiting for connections on port <port>
where <port> is the port configured in /etc/mongod.conf, 27017 by default.

You can optionally ensure that MongoDB will start following a system reboot by issuing the following command:
# chkconfig mongod on
Stop MongoDB process
# service mongod stop
Restart the mongod process
# service mongod restart
Begin using MongoDB
# mongo

No comments :

Post a Comment