Install and start mongodb in linux.
1. decompress the downloaded package to the directory
Lamp @ QA-clg server $ tar-zxvf mongodb. tgz
After installation, check:
[Lamp @ QA-clg Co., mongodb-linux-x86_64-2.4.6] $ cd bin
[Lamp @ QA-clg bin] $ ls
Bsondump mongodump mongoimport mongorestore mongostat
Mongo kernel export kernel oplog mongos kernel top
Mongod program files mongoperf implements sniff
Mongod in bin is the MongoDB server process, mongo is its client, and other commands are used for other purposes of MongoDB, such as MongoDB File Export.
3. startup process:
Create a directory for MongoDB to store data files and log files.
[Lamp @ QA-clg mongodb-linux-x86_64-2.4.6] $ cd data
[Lamp @ QA-clg data] $ ls
Db logs
[Lamp @ QA-clg data] $
Use mongod in the bin directory of the MongoDB installation directory to start MongoDB ,. /mongod -- dbpath = (self-installed path)/data/mongodb_data/-- logpath = (self-installed path)/data/mongodb_log/mongodb. log -- logappend &
4. Check the log and check that the startup is successful.