Jul 10, 2014
Installing and running MondoDB on Ubuntu / Linux
Installation:-
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
sudo apt-get update && sudo apt-get install mongodb-10gen
Change configurations:-
vi /etc/mongodb.conf
Check for error/logs:-
tail -f /var/log/mongodb/mongodb.log
Create the dbpath dir if not exists, and give permissions:-
sudo chown -R mongodb:mongodb /root/data/db
Start mongod as a Daemon:-
mongod --fork --logpath /var/log/mongodb.log
Ref - http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/
Labels: linux, mongodb, ubuntu
By : Motyar+ @motyar