-
-
Save sibosend/a974ffd2f1a6ff79d46087e62d63c38c to your computer and use it in GitHub Desktop.
Install mongoDB 3.4 on Ubuntu 16.04 LTS
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
############################################################################### | |
# Install mongoDB Server on Ubuntu 16.04 LTS | |
############################################################################### | |
# Import the Public Key used by the Ubuntu Package Manager | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 | |
# Create a file list for mongoDB to fetch the current repository | |
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list | |
# Update the Ubuntu Packages | |
apt update | |
# Install MongoDB | |
apt install mongodb-org -y | |
# Change mongoDB Listening IP Address from local 127.0.0.1 to All IPs 0.0.0.0 | |
sed -i 's/127\.0\.0\.1/0\.0\.0\.0/g' /etc/mongod.conf | |
# Start the MongoDB Service | |
service mongod start | |
# End Script | |
echo "Please do run mysql_secure_installation to Secure your MySQL Installation." | |
echo "Thanks for using this script." | |
############################################################################### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment