centos 7.6 安装mongodg4.4
1.检查是否安装了mongodb
检查redis相关的文件夹: find / -name mongodb 删除文件夹: rm -rf path
如果没有wget 命令,安装wget: yum install wget
2.配置文件:
vim /etc/yum.repos.d/mongodb-org-4.4.repo
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://mongodb.org/static/pgp/server-4.4.asc
3.安装
yum install -y mongodb-org-4.4.1 mongodb-org-server-4.4.1 mongodb-org-shell-4.4.1 mongodb-org-mongs-4.4.1 mongodb-org-tools-4.4.1
4.启动mongodb
systemctl start mongod
systemctl status mongod
systemctl enable mongod
systemctl stop mongod