mongodb
*******
1. Install MongoDB
Import the public key used by the package management system.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
2Create a list file for MongoDB.
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
3 Reload local package database.
sudo apt-get update
4 Install the MongoDB packages.
sudo apt-get install -y mongodb-org
4.1 Install a specific release of MongoDB.
sudo apt-get install -y mongodb-org=3.0.7 mongodb-org-server=3.0.7 mongodb-org-shell=3.0.7 mongodb-org-mongos=3.0.7 mongodb-org-tools=3.0.7
5. Start MongoDB.
sudo service mongod start
5.1 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 for a line reading
6 Stop MongoDB.
sudo service mongod stop
7 Restart MongoDB.
sudo service mongod restart
8. mongodb - uninstall
sudo service mongod stop
sudo apt-get purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
No comments:
Post a Comment