Installing MongoDB (reprinted) under Linux (centos6.5,64 bit)

Source: Internet
Author: User
Tags mongodb create database

(transferred from http://blog.csdn.net/yuwenruli/article/details/8529192)1. Download the installation package wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgz unzip the tarball after the download is complete ZXF Mongodb-linux-i686-1.8.2.tgz 2. Install prepare to move MongoDB to/usr/local/server/mongdb folder MV Mongodb-linux-i686-1.8.2/usr/local/mongodb Create database folder and log file mkdir/usr/ Local/mongodb/datatouch/usr/local/mongodb/logs 3. Set up start-up to add MongoDB Startup items to rc.local ensure MongoDB starts when the server boots up echo "/usr/local/mongodb/bin/mongod--dbpath=/usr/local/mongodb/ Data–logpath=/usr/local/mongodb/logs–logappend--auth–port=27017 ">>/etc/rc.local 4. Start MongoDB ( some dependent packages may not be installed at startup, causing errors and error messages Baidu can find a solution,

Yum Install glibc.i686,

Yum Install libstdc++.so.6

) CD to the Bin folder under the MongoDB directory to start mongodb//below this is the login method that requires permissions, user connection requires user name and password/usr/local/mongodb/bin/mongod--dbpath=/usr/local/ Mongodb/data--logpath=/usr/local/mongodb/logs--logappend--auth--port=27017--fork//This is not a password required/usr/local/mongodb/ Bin/mongod--dbpath=/usr/local/mongodb/data--logpath=/usr/local/mongodb/logs--logappend--port=27017--fork 5. Enter the CLI management interface of the database CD to the Bin folder under the MongoDB directory and execute the command./mongo run as follows: [[email protected] mongodb]#./bin/mongomongodb Shell version: 1.8.2connecting to:test> use test;switched to DB test

Installing MongoDB (reprinted) under Linux (centos6.5,64 bit)

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.