安装mangodb
1、配置yum源 [root@www ~]# cat /etc/yum.repos.d/mongodb-org-3.4.repo [mongodb-org-3.4] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc 2、安装mango yum -y install mongodb-org 查看mongo安装位置 whereis mongod 查看修改配置文件 : vim /etc/mongod.conf 3.启动MongoDB 启动mongodb :systemctl start mongod.service 停止mongodb :systemctl stop mongod.service 5.设置开机启动 systemctl enable mongod.service 6.登录mango mongo 7.设置mongodb远程访问: 注释掉bindIp,重启mongodb. vi /etc/mongod.conf # bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces.