mongoDB3.0installedonRedHat-创新互联

官方安装手册

创新互联建站长期为近千家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为呼伦贝尔企业提供专业的做网站、网站制作呼伦贝尔网站改版等技术服务。拥有十年丰富建站经验和众多成功案例,为您定制开发。

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.

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


新闻标题:mongoDB3.0installedonRedHat-创新互联
标题URL:http://myzitong.com/article/cecheo.html