首页 > 代码库 > linux(centos )mongodb install

linux(centos )mongodb install

file down :http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.9.tgz

/usr/local/

tar zxvf mongodb-linux-x86_64-2.4.9.tgzmv mongodb-linux-x86_64-2.4.9 mongodbcd mongodbmkdir dbmkdir logscd binvim mongodb.conf

conf:

dbpath=/usr/local/mongodb/dblogpath=/usr/local/mongodb/logs/mongodb.logport=27017fork=truenohttpinterface=true

bindip and conf:

/usr/local/mongodb/bin/mongod --bind_ip localhost -f /usr/local/mongodb/bin/mongodb.conf

ok

 

syntax:

语法应该是基于面向对象的:show dbsdb.version();db.basic_data.findOne();....

 

linux(centos )mongodb install