一、Installing MongoDB-6.0.2 on openEuler-22.09
1 查看版本
openEuler-22.09 和 CentOS 8.3 里安装无差别,直接一步到位好吧!
X、One Step Success
systemctl stop firewalld
dnf install -y tar
cd /opt/software
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel80-6.0.2.tgz
wget https://downloads.mongodb.com/compass/mongodb-mongosh-1.6.0.x86_64.rpm
tar -zxvf /opt/software/mongodb-linux-x86_64-rhel80-6.0.2.tgz -C /opt && cd /opt/mongodb-linux-x86_64-rhel80-6.0.2 && ll
mv /opt/mongodb-linux-x86_64-rhel80-6.0.2 /opt/mongodb-602
cp /opt/mongodb-602/bin/* /usr/local/bin/
rpm -ivh /opt/software/mongodb-mongosh-1.6.0.x86_64.rpm
mkdir /opt/mongodb-602/conf
mkdir /opt/mongodb-602/data
mkdir /opt/mongodb-602/logs
touch /opt/mongodb-602/logs/mongodb.log
cat > /opt/mongodb-602/conf/mongodb.conf << EOF
# 数据文件存访目录
dbpath = /opt/mongodb-602/data
# 日志文件存访目录
logpath = /opt/mongodb-602/logs/mongodb.log
# 以追加的方式记录日志
logappend = true
# 端口默认为 27017
port = 27017
# 对访问 IP 地址不做限制,默认为本机地址
bind_ip = 0.0.0.0
# 以守护进程的方式启用,即在后台运行
fork = true
# 所有客户端都可以访问
bind_ip_all = true
EOF
mongod -f /opt/mongodb-602/conf/mongodb.conf
mongosh
Y、 Error message
Z、Related Links
Installing MongoDB-5.0.13 on CentOS 7.9:https://www.cnblogs.com/huaxiayuyi/p/16758999.html
Installing MongoDB-6.0.2 on CentOS 8.3:https://www.cnblogs.com/huaxiayuyi/p/16871771.html
标签:opt,x86,602,MongoDB,Installing,mongodb,64,6.0,openEuler From: https://www.cnblogs.com/huaxiayuyi/p/16875384.html