mongoDB linux 安装
一、安装环境及配置yum
# more /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # vi /etc/yum.repos.d/mongodb-org-3.2.repo [mongodb-org-3.2] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc
二、安装MongoDB
yum -y install mongodb-org
安装完成
1
|
rpm -qa |grep mongodb |
查看安装组件
rpm -ql mongodb-org-server
/etc/init.d/mongod start
netstat -nltp|grep mongo
mongo
Mongodb 启动报错:"/sys/kernel/mm/transparent_hugepage/enabled is 'always'"
唉~!这就走起来
/sys/kernel/mm/transparent_hugepage/enabled /sys/kernel/mm/transparent_hugepage/defrag
完成后
vim /etc/security/limits.conf
添加一下几行 mongod soft nofile 64000 mongod hard nofile 64000 mongod soft nproc 32000 mongod hard nproc 32000
sudo service mongod restart