Last active
January 1, 2016 06:09
-
-
Save noleto/8103292 to your computer and use it in GitHub Desktop.
Install latest MongoDB on Ubuntu
This file contains 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
#!/bin/bash | |
#How to use it? | |
#wget -O- https://gist.github.com/noleto/8103292/raw/e6a77ef6faa0eab3676287b9a265a15b4d9edee3/install-mongo.sh | sh | |
LOG_TIME_FORMAT='date +%d-%m-%Y_%T' | |
echo "------------------------------------------" | |
echo "Install MongoDB on Ubuntu" | |
echo "------------------------------------------" | |
echo "[$($LOG_TIME_FORMAT)] [MONGO] Installing latest stable release..." | |
#Mongo DB | |
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-10gen | |
echo "------------------------------------------" | |
mongo --version | |
echo "------------------------------------------" | |
echo "[$($LOG_TIME_FORMAT)] [MONGO] Install successful." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment