Last active
September 5, 2017 07:58
-
-
Save mansurali901/ea1fb2f5d201e9d2fbfa09cd007fd653 to your computer and use it in GitHub Desktop.
Install Mongo 3.2.15 in Ubuntu 16.04
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
# This script install Mongo 3.2.15 in Ubuntu 16.04 | |
# Author Mansur Ul Hasan | |
# [email protected] | |
# Adding gpg key | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
# Adding MongoDB repository | |
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
# System APT update | |
apt-get update -y | |
# Installing MongoDB | |
apt-get install -y mongodb-org | |
# Adding Service | |
echo " | |
[Unit] | |
Description=High-performance, schema-free document-oriented database | |
After=network.target | |
[Service] | |
User=mongodb | |
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf | |
[Install] | |
WantedBy=multi-user.target" >> /etc/systemd/system/mongodb.service | |
# Starting Mongo | |
systemctl start mongodb | |
# Checking Mongo Status | |
systemctl status mongodb | |
echo " | |
################################################### | |
Mongo DB 3.2.15 has been installed | |
################################################### | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment