How to install mongoDB in Centos 8

Step 1: 配置安装库

[root@iZbp1ehco2fi1l7bj6hhphZ ~]# vi /etc/yum.repos.d/mongodb-org-4.2.repo

Step 2: 将需要更新的package更新到源中的最新版。(yum update和yum upgrade的功能都是一样的,都是将需要更新的package更新到源中的最新版。唯一不同的是,yum upgrade会删除旧版本的package,而yum update则会保留(obsoletes=0)。)
[root@iZbp1ehco2fi1l7bj6hhphZ ~]# yum update

 

How to install mongoDB in Centos 8

 

Step 3: 搜索 mongodb-org

[root@iZbp1ehco2fi1l7bj6hhphZ ~]# yum search mongodb-org

How to install mongoDB in Centos 8

Step 4: 安装mongodb-org

[root@iZbp1ehco2fi1l7bj6hhphZ ~]# yum install mongodb-org

How to install mongoDB in Centos 8

 

How to install mongoDB in Centos 8

Step 5:

systemctl enable mongod

systemctl start mongod

systemctl status mongod

mongo

How to install mongoDB in Centos 8

 

 

上一篇:批处理框架 Spring Batch 这么强,你会用吗?


下一篇:PostgreSQL数据的导出导入