Install Mongodb using RPM's
----->For reference use:
http://tommongo.blogspot.com/2018/01/install-mongodb-using-rpm-packages.html
1) Install RPM packages;
----> rpm -ivh mongodb-org-server-3.2.16-1.el7.x86_64.rpm
----> rpm -ivh mongodb-org-shell-3.2.16-1.el7.x86_64.rpm
----> rpm -ivh mongodb-org-tools-3.2.16-1.el7.x86_64.rpm
----> rpm -ivh mongodb-org-mongos-3.2.16-1.el7.x86_64.rpm
----> rpm -ivh mongodb-org-3.2.16-1.el7.x86_64.rpm
2) By default, after the installation the below file will be created;
---->(/etc/mongod.conf)--->(server will start according to the configuration mentioned in
/etc/mongod.conf file.)
3) check configuration files created by default;
-----> dbpath = /var/lib/mongo
-----> logpath = /var/log/mongodb/mongodb.log
4) To start the server;
-----> # sudo service mongod start
Starting mongod (via systemctl): [ OK ]
5) check the mongo service by using the command,
-----> # ps aux | grep mongo
mongod 11008 1.3 1.8 397692 34292 ? Sl 23:44 0:00 /usr/bin/mongod -f
/etc/mongod.conf
root 11050 0.0 0.0 112708 976 pts/1 R+ 23:45 0:00 grep --color=auto mongo
# Edited By shabir khan
6) To Start the client;
# mongo
MongoDB shell version: 3.2.16
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten]
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten] ** WARNING:
/sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten]
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten] ** WARNING:
/sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten]
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits
set to 4096 processes, 64000 files. Number of processes should be at least 32000 : 0.5 times number
of files.
2021-12-28T23:44:29.405-0800 I CONTROL [initandlisten]
7) Then check the dbs;
> show dbs
local 0.000GB
Mongodb working Done!
# Edited By shabir khan
# Edited By shabir khan