1: Download
Http://www.mongodb.org/downloads
Unzip the package after uploading it on the 85 machine.
first, unzip the installer in Linuxoperation by command:Decompression TAR-ZXVF mongodb-linux-x86_64-2.6.7.gzmongodb-linux-x86_64-2.6.7 renamed to
MongoDB 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.logmkdir Log
mkdir data
CD Log
Touch Mongodb.log CD Mongodb/binUse the Mongod command to set up a MongoDB database link with a port number of 100001, a database path of/mongodb/data, and a log path of/mongodb/log/mongodb.logTouch mongodb.conf./bin/mongod-f mongodb.confMongoDB also provides a background daemon way to start, only need to add a "--fork" parameter, it is worth noting that the "--fork" parameter must be enabled "--logpath" parameter. As shown below:Shell Code
The fork parameter that the daemon mode starts can also be configured in the configuration file as follows:
Port=27017dbpath=data/dblogpath=log/mongodb.loglogappend=truefork=true
Then the configuration file starts after MongoDB is also started in the background:
Linux installation Start MongoDB