Last active
August 29, 2015 14:07
-
-
Save fernandojunior/367360e12233ca82a1ce to your computer and use it in GitHub Desktop.
Shell script to install mongodb 10gen 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 | |
# Script based on How to install mongoDB on Ubuntu Tutorial (http://www.mkyong.com/mongodb/how-to-install-mongodb-on-ubuntu/) | |
# By Fernando Felix do Nascimento Junior | |
# become superuser | |
sudo su | |
# add mongodb 10gen package to /etc/apt/sources.list.d | |
touch /etc/apt/sources.list.d/mongo.list | |
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" > /etc/apt/sources.list.d/mongo.list | |
# 10gen package required GPG key, imports it | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
# update your apt-get list | |
sudo apt-get update | |
# install mongodb-10gen | |
sudo apt-get install mongodb-10gen -y | |
# starting MongoDB | |
sudo service mongodb start | |
# stoping MongoDB | |
sudo service mongodb stop | |
# restarting MongoDB | |
sudo service mongodb restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment