centos8 安装mongodb

1 下载MongoDB (https://www.mongodb.com/try/download/community

wget https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.2/x86_64/RPMS/mongodb-org-server-4.2.8-1.el8.x86_64.rpm

2 安装

rpm -i mongodb-org-server-4.2.8-1.el8.x86_64.rpm

3 如果缺少对应依赖包

就安装对应得包

yum install python2

然后重复第二步

4 启动mongodb

systemctl start mongod

5 安装命令行工具 (https://www.mongodb.com/try/download/shell

get https://downloads.mongodb.com/compass/mongosh-0.0.6-linux.tgz
tar -zvxf mongosh-0.0.6-linux.tgz
chmod +x  mongosh
cp ./mongosh /usr/bin/

6 命令行连接Mongodb

mongosh

7 web可视化mongo 客户端 (https://github.com/mrvautin/adminMongo

发表评论

电子邮件地址不会被公开。 必填项已用*标注