快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

mongoDB3.0installedonRedHat

官方安装手册

在施秉等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都做网站、成都网站设计、成都外贸网站建设 网站设计制作按需定制,公司网站建设,企业网站建设,成都品牌网站建设,网络营销推广,外贸营销网站建设,施秉网站建设费用合理。

http://docs.MongoDB.org/manual/tutorial/install-mongodb-on-red-hat/

安装完成后,登录出现如下告警:

1.登录mongo shell

[root@localhost ~]# mongo

缺少openssl、libssh3

yum -y install openssl
service mongod restart

2.I use mongodb 3.0 and find a warning:

[root@localhost ~]# mongo
MongoDB shell version: 3.0.1
connecting to: test
Server has startup warnings: 
2015-03-13T16:28:29.405+0800 I CONTROL  [initandlisten] 
2015-03-13T16:28:29.406+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-03-13T16:28:29.406+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-03-13T16:28:29.406+0800 I CONTROL  [initandlisten] 
2015-03-13T16:28:29.407+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-03-13T16:28:29.407+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-03-13T16:28:29.407+0800 I CONTROL  [initandlisten]

solved:

vi /etc/init.d/mongod
#行首添加
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

重启mongod
service mongod restart

3.Recommended ulimit Settings

Every deployment may have unique requirements and settings; however, the following thresholds and settings are particularly important for mongod and mongos deployments:

-f (file size): unlimited

-t (cpu time): unlimited

-v (virtual memory): unlimited [1]

-n (open files): 64000

-m (memory size): unlimited [1] [2]

-u (processes/threads): 64000

Always remember to restart your mongod and mongos instances after changing the ulimit settings to ensure that the changes take effect.

vi /etc/profile

在最后添加

ulimit -n 64000

ulimit -u 64000

source /etc/profile

2015-04-02T01:36:21.150-0700 I CONTROL  [initandlisten] 
2015-04-02T01:36:21.150-0700 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 1024 processes, 64000 files. Number of processes should be at least 32000 : 0.5 times number of files.

当前名称:mongoDB3.0installedonRedHat
标题链接:http://6mz.cn/article/pppggp.html

其他资讯