The User directive specifies that the server will be run under the mongodb user, and the ExecStart directive defines the startup command for MongoDB server. The Service section how the service should be started. In our case, MongoDB depends on networking already being available, hence network.target here. a human-readable description for MongoDB service) as well as dependencies that must be satisfied before the service is started. The Unit section contains the overview (e.g. Create a unit file to manage the MongoDB service.Ĭreate a configuration file named rvice in the /etc/systemd/system directory: $ sudo nano /etc/systemd/system/rviceĭescription=High-performance, schema-free document-oriented databaseĮxecStart=/usr/bin/mongod -quiet -config /etc/nf Install MongoDB $ sudo apt-get install -y mongodb-org 5. Issue the following command to create a list file for MongoDB $ echo "deb xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt//mongodb-org-3.2.list 3. Import they key for the official MongoDB repository $ sudo apt-key adv -keyserver hkp://:80 -recv EA312927Īfter successfully importing the key, you will see: gpg: Total number processed: 1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
May 2023
Categories |