美文网首页
CentOS 安装MongoDB

CentOS 安装MongoDB

作者: 一杉风雨 | 来源:发表于2017-07-21 18:14 被阅读0次

配置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

相关文章

网友评论

      本文标题:CentOS 安装MongoDB

      本文链接:https://www.haomeiwen.com/subject/tuwekxtx.html