1. Download MongoDB (64-bit)
Http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.9.tgz
Or
http://pan.baidu.com/s/1mgyRB8c
2. Install MongoDB (install to/usr/local)
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
Tar zxvf mongodb-linux-x86_64-2.4.9.tgzmv mongodb-linux-x86_64-2.4.9 mongodbcd mongodbmkdir dbmkdir logscd Binvi Mongodb.conf
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
Dbpath=/usr/local/mongodb/dblogpath=/usr/local/mongodb/logs/mongodb.logport=27017fork=truenohttpinterface=true
3. rebind the configuration file address and access IP of MongoDB
/usr/local/mongodb/bin/mongod--bind_ip localhost-f/usr/local/mongodb/bin/mongodb.conf
4, boot automatically start MongoDB
Vi/etc/rc.d/rc.local
/usr/local/mongodb/bin/mongod--config/usr/local/mongodb/bin/mongodb.conf
5, restart the system test can be self-starting
/usr/local/mongodb/bin/mongo# View Database list show dbs# current DB version db.version ();
CentOS6.4 Installing MongoDB