Install MongoDB
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
Note :- (mongodb-org/3.3 multiverse) ---- you can change version from just change version number in below command.
# sudo echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.3 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.3.list
# sudo apt-get update
# sudo apt-get install -y --allow-unauthenticated mongodb-org
# sudo vim /etc/systemd/system/mongodb.service
[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
# sudo systemctl start mongodb
# sudo systemctl start mongod
# sudo systemctl status mongodb
# sudo systemctl status mongod
# sudo systemctl enable mongodb
# mongo --version
# mongo
No comments:
Post a Comment
testing