Mongodb Installation 1. Import The Public Key Used by The Package Management System
Mongodb Installation 1. Import The Public Key Used by The Package Management System
gpg: key EA312927: public key "MongoDB 3.2 Release Signing Key
<packaging@mongodb.com>" imported
Ubuntu 14.04
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-
org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-
org-3.2.list
Ubuntu 16.04
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse"
| sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
3 Reload local package database.
Issue the following command to reload the local package database:
sudo apt-get update
You can install either the latest stable version of MongoDB or a specific version of MongoDB.
If you only install mongodb-org=3.2.10 and do not include the component packages, the latest
version of each MongoDB package will be installed regardless of what version you specified.
If you change the user that runs the MongoDB process, you must modify the access control rights
to the /var/lib/mongodb and /var/log/mongodb directories to give this user access to
these directories.
1
Start MongoDB.
Issue the following command to start mongod:
sudo service mongod start
3 Stop MongoDB.
As needed, you can stop the mongod process by issuing the following command:
sudo service mongod stop
4 Restart MongoDB.
Issue the following command to restart mongod:
sudo service mongod restart
baskar@200809JUNC0287-A:~$ mongo
MongoDB shell version: 3.2.10
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:
2016-10-24T14:01:09.725+0530 I CONTROL [initandlisten]
2016-10-24T14:01:09.725+0530 I CONTROL [initandlisten] ** WARNING:
/sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-10-24T14:01:09.725+0530 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-10-24T14:01:09.725+0530 I CONTROL [initandlisten]
2016-10-24T14:01:09.725+0530 I CONTROL [initandlisten] ** WARNING:
/sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-10-24T14:01:09.725+0530 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2016-10-24T14:01:09.725+0530 I CONTROL [initandlisten]
>