Last active
May 1, 2020 23:40
-
-
Save wilmeragsgh/c2d69391cfc53e1d126b86d1cfc57f80 to your computer and use it in GitHub Desktop.
Installing mongodb
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
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
apt-get update | |
apt-get install -y mongodb-org | |
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 | |
sudo systemctl start mongodb | |
# check with: | |
# sudo systemctl status mongodb | |
sudo systemctl enable mongodb | |
# ref: https://www.digitalocean.com/community/tutorials/como-instalar-mongodb-en-ubuntu-16-04-es | |
sudo apt-get install mongodb-clients |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment