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