Install MongoDB on Ubuntu 12.04

Source: Internet
Author: User
Tags install mongodb mongodb mongodb server virtual private server
from:https://www.digitalocean.com/community/articles/how-to-install-mongodb-on-ubuntu-12-04 Install MongoDB on Ubuntu 12.04MongoDB is a document database used commonly in modern web applications. This is tutorial should help your setup a virtual private server to use as a dedicated MongoDB server for a production Applica tion environment.
Step 1--Create a DropletThis one's easy. Once you do, go ahead and ' ssh ' in.
n.b.:: It is recommended so you configure ' ssh ' and ' sudo ' as this
Step 2--Create the Install ScriptThe MongoDB install process is simple enough to being completed with a Bash script. Copy the following into a new file named ' Mongo_install.bash ' in your home directory:

Apt-key adv--keyserver keyserver.ubuntu.com--recv 7f0ceb10
echo "Deb http://downloads-distro.mongodb.org/repo/ Ubuntu-upstart Dist 10gen "| Tee-a/etc/apt/sources.list.d/10gen.list
apt-get-y update
apt-get-y install Mongodb-10gen

Here's an explanation of the script:
The ' Apt-key ' call registers the public key of the custom 10gen MongoDB aptitude repository A custom 10gen repository list The file is created containing the location of the MongoDB binaries Aptitude are updated so this new packages can be Registere D locally on the Droplet Aptitude are told to install MongoDB
Tip:at any time, to change to your home directory, simply execute ' CD '
Step 3--Run the Install ScriptExecute the following from your home directory:
$ sudo bash./mongo_install.bash

If Everything is successful, you should the output contain a PID of the newly started process:
MongoDB start/running, Process 2368

Step 4 – Check It outBy default to install method, MongoDB should start automatically when your Droplet is booted. This means so if you are need to reboot your Droplet, MongoDB'll start right back.
To start learning about the running ' mongod ' process, run the following command:
$ ps aux | grep MONGO

One line of the output should look like the following:
MongoDB    569  0.4  6.4 627676 15936?        SSL  22:54   0:02/usr/bin/mongod--config/etc/mongodb.conf

We can ...
User: ' MongoDB ' PID: ' 569 ' Command: '/usr/bin/mongod--config/etc/mongodb.conf ' config File: '/etc/mongodb.conf '
ResourcesHttp://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/https://www.digitalocean.com /community/articles/introduction-to-ssh-on-ubuntu
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.