Linux Installation MongoDB

Source: Internet
Author: User

Linux installation mongodb1. Download MongoDB Linux

wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.2.6.tgz

TAR-ZXVF mongodb3.2.6.tgz Decompression

The extracted directory

Bsondump MONGO Mongod mongodump mongoexport mongofiles mongoimport mongooplog mongoperf mongorestore mongos Mongostat Mong Otop

2. Create a new MongoDB location

mkdir mongodb_test

CD Mongodb_test

mkdir data//Database storage location

mkdir Log//database log

mkdir CONF//MONGODB configuration file

Create a new mongod.conf configuration file in conf

CD conf

Vim mongod.conf

port:10000//Port

dapath=data//Database path Location

logpath=log/mongodb.log//Log Input Location

Fork=true//linux Start a background service (invalid under window)

mkdir bin//mongodb Execute command

3. Copy the extracted Mongod and MONGO to the bin path

Cp.. /mongodb3.2.6/bin/mongod bin/

Cp.. /mongodb3.2.6/bin.mongo bin/

4. Open the service:

./bin/mognod-f Conf/mongodb.log (start service side)

About-to-fork child process, waiting until server was ready for connections.
Forked process:5716
Child process started successfully, parent exiting

See this message indicates that the MONGO server started successfully

5. Connect Mognodb service with Client

./bin/mongo 127.0.0.1:1000/test

Startup success

Use admin

6. Close the service

Db.shutdownserver ()

7.linux General Command

wget-Address (download)

Tail (show file contents)

CP (copy)

MV (rename)

LS (show file)

mkdir (new folder)

Vim new File and edit

Fork (start background service)

RM-RF (delete folder)

Rm-f (delete files)

CD to the specific directory

Date display time

..........

8.Linux Command Daquan

Basic Common commands: http://blog.csdn.net/xiaoguaihai/article/details/8705992

Linux command Daquan: http://www.cnblogs.com/qq78292959/archive/2011/06/10/2077866.html

Linux Installation MongoDB

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.