Guide on installing MongoDB databases in Linux

Source: Internet
Author: User
Tags install mongodb
Guide document on MongoDB database installation in Linux environment 1. Create and install user NA annotation: Generally, we create a mongodb user, which allows O & M to help create 2. Upload

Guide document for installing MongoDB databases in Linux environment 1. Create and install user N/A annotation: We generally create A mongodb user, which allows O & M to help create 2. Upload

Guide on installing MongoDB databases in Linux

1. Create an installer

N/

Note: We generally create a mongodb user. This allows O & M to help create

2. Upload mongodb data software.

N/

Annotation: Using mongodb users to upload software; -- mongodb-linux-x86_64-2.4.12.tgz

3. Unzip the installation package

Tar-zxvf mongodb-linux-x86_64-2.4.12.tgz -- unzip the installation package

Music mongodb-linux-x86_64-2.4.12 mongodb-change mongodb-linux-x86_64-2.4.12 to mongodb

4. Create a data folder and a log folder;

Cd mongodb

Mkdir date

Mkdir log

Annotation: used to store data and logs respectively;

5. Create the mongodb. conf file.

Cd $ HOME

The content of the new mongodb. conf file is as follows:

# Port = 10000

Dbpath =/home/mongodb/data/

Logpath =/home/mongodb/log/mongodb. log

Logappend = true

Fork = true

Note: The function here is to facilitate the start of the mongodb service. You can directly use mongod-f mongodb. conf to start

6. Configure Environment Variables

Cd $ HOME

Add two lines after file. bash_profile

Export MONGODB_HOME =/home/mongodb

Export PATH = $ MONGODB_HOME/bin: $ PATH

Annotation: 1. re-open a login interface; or load the file. bash_profile; source. bash_profile

2. You do not need to add a full path when executing the command. You just need to press mongod/mongo.

7. Start the service

Mongod-f mongodb. conf

OK; mongodb is so simple; it can be done in minutes.

------------------------------------------ Split line ------------------------------------------

CentOS 6 install MongoDB and server configuration using yum

Install MongoDB2.4.3 in Ubuntu 13.04

MongoDB beginners must read (both concepts and practices)

MongoDB Installation Guide for Ubunu 14.04

MongoDB authoritative Guide (The Definitive Guide) in English [PDF]

Nagios monitoring MongoDB sharded cluster service practice

Build MongoDB Service Based on CentOS 6.5 Operating System

MongoDB details: click here
MongoDB: click here

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.