(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)