配置mongo yum repository
# /etc/yum.repos.d/mongodb-enterprise.repo
[mongodb-enterprise]
name=MongoDB Enterprise Repository
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/3.4/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
安装
yum install -y mongodb-enterprise
配置
# /etc/mongod.conf
net:
port: 27017
# bindIp: 127.0.0.1 # 这里注释掉,代表监听所有地址
启动
service mongod start
设置自启
chkconfig mongod on
取消SElinux
# /etc/selinux/config
SELINUX=disabled
网友评论