Ubuntu 14 - Install MongoDB

I have already written a tutorial on how to install MongoDB with PHP on the same server. However, if you are keeping your stack separated, then to just install the latest version of MongoDB, run the script below:

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/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-org

Older Alternative

If you just want to install MongoDB version 2.4.9, then you can simply run:

sudo apt-get install mongodb

References

No comments:

Post a Comment