mongodb:centos9安装mongodb

一,下载

官网下载页面:

https://www.mongodb.com/try/download/community

选择适合自己的版本,例如:

image

二,安装

# rpm -ivh mongodb-org-server-6.0.27-1.el9.x86_64.rpm

启动:

# systemctl daemon-reload
# systemctl status mongod.service
○ mongod.service - MongoDB Database Server
     Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; preset: disabled)
     Active: inactive (dead)
       Docs: https://docs.mongodb.org/manual
# systemctl start mongod.service

其他包从这里安装:

https://repo.mongodb.org/yum/redhat/9/mongodb-org/6.0/x86_64/RPMS/

三,测试效果

# mongosh
...
test> show dbs;
admin   40.00 KiB
config  12.00 KiB
local   40.00 KiB
test>

test> use admin;
switched to db admin
admin> show tables;
system.version

 

posted @ 2026-01-12 10:09  刘宏缔的架构森林  阅读(0)  评论(0)    收藏  举报