MongoDB installation and startup and configuration under Linux

Source: Internet
Author: User

1. Download Link: http://fastdl.mongodb.org/linux/mongodb-linux-i686-2.0.1.tgz

2. Unzip the compilation

[Email protected] soft]# TAR-ZXVF mongodb-linux-i686-2.0.2-rc2.tgzmongodb-linux-i686-2.0.2-rc2/ mongodb-linux-i686-2.0.2-rc2/third-party-noticesmongodb-linux-i686-2.0.2-rc2/ gnu-agpl-3.0mongodb-linux-i686-2.0.2-rc2/readmemongodb-linux-i686-2.0.2-rc2/bin/mongodb-linux-i686-2.0.2-rc2/ bin/mongofilesmongodb-linux-i686-2.0.2-rc2/bin/mongostatmongodb-linux-i686-2.0.2-rc2/bin/ bsondumpmongodb-linux-i686-2.0.2-rc2/bin/mongosmongodb-linux-i686-2.0.2-rc2/bin/ mongotopmongodb-linux-i686-2.0.2-rc2/bin/mongodumpmongodb-linux-i686-2.0.2-rc2/bin/ mongoimportmongodb-linux-i686-2.0.2-rc2/bin/mongosniffmongodb-linux-i686-2.0.2-rc2/bin/ mongomongodb-linux-i686-2.0.2-rc2/bin/mongodmongodb-linux-i686-2.0.2-rc2/bin/ Mongoexportmongodb-linux-i686-2.0.2-rc2/bin/mongorestore

3. We renamed MONGODB-LINUX-I686-2.0.2-RC2 to MongoDB (MV name renamed)

We put a new data directory in the MongoDB directory to hold the information, create a new log directory to hold the log, and then create a new log file under the directory, for example, we named Mongodb.log
[[email protected] mongodb]# mkdir log[[email protected] mongodb]# mkdir data[[email protected] mongodb]# CD Log[[email PR Otected] log]# Touch Mongodb.log

4. Then navigate to the Mongodb/bin directory

[Email protected] local]# CD Mongodb/bin

5. Use the Mongod command to establish a MongoDB database link with a port number of 27017, a database path of/mongodb/data, and a log path of/mongodb/log/mongodb.log

6. Start MongoDB (the port can be modified by itself, default 27017, if not added --fork, MongoDB will not run from the background)

[Email protected] mongodb]#/bin/mongod-port 27017--dbpath data/--logpath log/mongodb.log--fork

7. If you want to turn off MongoDB (be careful not to use the mess)

Pkill Mongod

  

MongoDB installation and startup and configuration under Linux

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.