[Installation method under Mongodb-10gen]ubuntu

Source: Internet
Author: User
Tags install mongodb
This is a creation in Article, where the information may have evolved or changed.

Because I always do not give up, so still continue to start my golang under Ubuntu, today found that the source of the service quickly soon to go the source code from Googleproject to Hg back, That's why I checked out the way to install Mongodb-10gen under Ubuntu today. In fact, under the Linux apt-get commands are quite simple, the only need is to have a very good speed, if you can fq that is the best.

In fact, in the MONGODB official website above has introduced, we just follow his method steps step by step can complete installs, the address is as follows:

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

First you need to add a GPG key to enter in the terminal:

sudo apt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv 7F0CEB10

To add a software source:

Echo ' Deb Http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen ' | sudo tee/etc/apt/sources.list.d/mongodb.list

Then update the software source, which needs to be performed after the software source is added before updating the software:

sudo apt-get update

Ann Mongodb-10gen:

sudo apt-get install Mongodb-10gen

The rest is a long wait, after the installation is complete, the following results appear:

 reading the package list ... Completing the dependency tree that is analyzing the package is reading state information ... Complete the following "new" packages will be installed: Mongodb-10gen upgraded 0 packages, installed 1 new packages, uninstalled 0 packages, and 0 packages were not upgraded. You need to download the 87.9 MB package. 225 MB of extra space is consumed after decompression. Get: 1 http://downloads-distro.mongodb.org/repo/ubuntu-upstart/dist/10gen mongodb-10gen amd64 2.4.8 [87.9 mb] Download 87.9 MB, Takes 16 minutes 32 seconds (88.6 kb/s) Selecting previously unselected package Mongodb-10gen. (Reading data Library... The system currently has a total of 213,763 files and directories installed. ) extracting Mongodb-10gen (from .../mongodb-10gen_2.4.8_amd64.deb) ... Processing triggers for man-db ... Processing triggers for ureadahead ... Setting Mongodb-10gen (2.4.8) ... Adding system User "MongoDB" (UID 118) ... Adding new User "MongoDB" (UID 118) to group "Nogroup" ... Unable to create home directory "/home/mongodb" is adding group "MongoDB" (GID 128) ... Complete. Adding user "MongoDB" to "MongoDB" group ... The user "MongoDB" is being added to the "MongoDB" group to complete. MongoDB start/running, Process 1496 

The default MongoDB stores the database files in the "/var/lib/mongo" directory, and the log files are stored in the "/var/log/mongo" file. And the default user is MongoDB, if you want to change the user to run your database service, of course, also need to increase the user rights of both directories, otherwise you may not have permission to write and read Oh.

To run the MongoDB service:

sudo service MongoDB start

To stop the MongoDB service:

sudo service MongoDB stop

To restart the MongoDB service:

sudo service MongoDB restart

This is the MongoDB installation process, below we can be golang and MongoDB together to learn.

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.