http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten]
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten]
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is ‘always‘.
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten] ** We suggest setting it to ‘never‘
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten]
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is ‘always‘.
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten] ** We suggest setting it to ‘never‘
2015-08-03T12:39:33.996+0800 I CONTROL [initandlisten]
>
/******************解决办法
不重启服务器的情况下解决办法,在Linux下执行:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
服务器重启后立即生效办法:
# vi /etc/rc.local
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi
********************/
----正常停止方法:
# ps aux | grep mongod
root 3765 1.9 0.1 500832 58224 ? Sl 12:38 0:02 /data/mongodb/apps/mongodb/bin/mongod --config /data/mongodb/apps/mongodb/bin/mongodb.conf
# kill -2 3765
或
# /data/mongodb/apps/mongodb/bin/mongo -port 27107
> use admin
> db.shutdownServer();
----开机自动启动mongodb
# vi /etc/rc.d/rc.local
rm -rf /data/mongodb/db/mongod.lock
numactl --interleave=all /data/mongodb/apps/mongodb/bin/mongod --config /data/mongodb/apps/mongodb/bin/mongodb.conf
说明:启动时必须加numactl --interleave=all
版权声明:本文为博主原创文章,未经博主允许不得转载。
mongodb入门安装
标签:mongodb安装 mongodb源码安装