MongoDB:
Prerequisites:
GPG keys of the software distributor are required by the Ubuntu package manager. So we need to import it. The below command is used to import the MongoDB public GPG Key
Next, we have to Create a list file for MongoDB. It can be created by issuing the following command
MongoDB is a document-oriented database. It is free and open-source. It is written in c++. It is NoSQL based database.
Prerequisites:
- Ubuntu - 64 bit
- user with sudo permission
GPG keys of the software distributor are required by the Ubuntu package manager. So we need to import it. The below command is used to import the MongoDB public GPG Key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6It shows the output like this
Next, we have to Create a list file for MongoDB. It can be created by issuing the following command
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.listUpdate the local package by typing
sudo apt-get update
Install the latest stable version (LTS) of MongoDB by
sudo apt-get install -y mongodb-org
To run MongoDB as a service on Ubuntu, we need to create a unit file describing the service. A unit file tells systemd how to manage a resource.Create a configuration file mongodb.service in the /etc/systemd/system directory by typing
sudo nano /etc/systemd/system/mongodb.service
Populate the /etc/systemd/system/mongodb.service file by adding below lines
To start MongoDB by typing[Unit]Description=High-performance, schema-free document-oriented databaseAfter=network.target[Service]User=mongodbExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf[Install]WantedBy=multi-user.target
sudo systemctl start mongodb
To know the status of MongoDB by
sudo systemctl status mongodb
To enable the MongoDB service to automatically start at boot time by typing
sudo systemctl enable mongodb
To stop the mongod process by issuing the following command
sudo service mongod stop
To restart the mongod process by typing
sudo service mongod restart
Reference:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
sunset vistas beachfront - The Official Website 우리카지노 쿠폰 우리카지노 쿠폰 1XBET 1XBET 우리카지노 쿠폰 우리카지노 쿠폰 7740DraftKings Sign Up Bonus Code & Review
ReplyDelete