时间:2021-07-01 10:21:17 帮助过:10人阅读
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]
>
/******************解决的方法
不重新启动server的情况下解决的方法,在Linux下运行:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
server重新启动后马上生效办法:
# 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入门安装
标签:interface res ready server touch sync data .gz until