系统相关
首页 > 系统相关> > centos7.5 安装mongo

centos7.5 安装mongo

作者:互联网

1、修改配置文件

vim /etc/yum.repos.d/mongodb-org-4.2.repo

[mongodb-org-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc

2、安装

yum install –y mongodb-org

3、启动

systemctl start mongod #启动
systemctl enable mongod #开机启动
systemctl status mongod #状态

4、远程访问

vim /etc/mongod.conf

#bind_ip = 0.0.0.0  # 注释端口

systemctl restart mongod  # 重启服务

标签:mongod,mongo,4.2,mongodb,systemctl,yum,org,安装,centos7.5
来源: https://www.cnblogs.com/huameixiao/p/14528309.html