安裝說明
系統內容:Centos-6.3
安裝軟體:mongodb-linux-x86_64-2.2.2.tgz
下載地址:http://www.mongodb.org/downloads
安裝機器:192.168.15.237
上傳位置:/usr/local/
軟體安裝位置:/usr/local/mongodb
資料存放位置:/var/mongodb/data
日誌存放位置:/var/mongodb/logs
1.安裝:
cd usr/local/groupadd mongodbuseradd mongodb -g mongodbcd /usr/localtar -zxv -f mongodb-linux-x86_64-2.2.2.tgzmv mongodb-linux-x86_64-2.2.2 mongodbchown -R mongodb: mongodb mongodbcd mongodbmkdir /var/mongodbmkdir /var/mongodb/datamkdir /var/mongodb/logstouch /var/mongodb/logs/log.logchmod 777 -R /var/mongodb/logs/log.logchmod 777 -R /var/mongodb/data
2.配置開機啟動:
vi + /etc/rc.d/rc.local/usr/local/mongodb/bin/mongod --dbpath=/var/mongodb/data --logpath /var/mongodb/logs/log.log -fork
3.啟動mongodb測試:
/usr/local/mongodb/bin/mongod --dbpath=/var/mongodb/data --logpath /var/mongodb/logs/log.log -fork
4
對於mongodb從檔案啟動,mongodb慢查詢的啟動,參看地址:
http://blog.csdn.net/terry_water/article/details/46827415