启动mongod命令无效,systemctl status mongod
查了下资料,貌似是教程里的安装命令
yum -y install mongodb mongodb-server.x86_64 mariadb-devel.i686
会导致安装不全,建议参考教程https://blog.csdn.net/heromps/article/details/110260405配置源
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://www.mongodb.org/static/pgp/server-4.4.asc
然后安装
sudo yum install -y mongodb-org
然后正常接着教程第二步开始就OK了
赞0
踩0