Last active
August 29, 2015 14:18
-
-
Save jineshpaloor/6bd9d7539a190a3539bd to your computer and use it in GitHub Desktop.
mongodb installation script to install and run process as daemon
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
# Local | |
======== | |
~ cd /mongo/installation/directory/ | |
~ cd ~/opt/mongodb-linux-x86_64-ubuntu1404-3.0.1/ | |
# Start Mongodb server | |
# ==================== | |
- bin/mongod --config bin/mongodb.config | |
# Start Mongo Shell | |
# ================= | |
- bin/mongo | |
# Detected unclean shutdown - /var/lib/mongodb/data/mongod.lock is not empty. | |
# =========================================================================== | |
- remove lock file | |
- run `bin/mogod --repair` | |
# Install MongoDB on server | |
# ============================ | |
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list | |
apt-get -y update | |
apt-get -y install mongodb-10gen | |
# Install MongoDB Cliet | |
========================= | |
sudo apt-get install mongodb-clients |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment