Created
April 30, 2012 15:04
-
-
Save ktkaushik/2559060 to your computer and use it in GitHub Desktop.
install mongoDB on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) receive the key that 10gen has setup | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
2) sudo vi /etc/apt/sources.list and add this line at the end | |
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen | |
3) Update. This step is very important to load everything from sources.list from the previous step. | |
sudo apt-get update | |
4) Install MongoDB. | |
sudo apt-get install mongodb-10gen | |
5) Not done yet, create a dir as | |
sudo mkdir -p ~/data/db | |
6) Assign sudo persmissions | |
sudo chown `id -u` /var/lib/mongodb | |
sudo chown `id -u` /data/db | |
7) this step has not been tried and tested but i think this could be useful considering where the db is stored. | |
mongod --dbpath=/home/user/mongodb or any other path you wish. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment