一、下载
【官网地址容易变,所以弄百度网盘里了】
链接:点击下载mongodb6
提取码:681v
二、安装
1.解压
tar -zxvf mongodb-linux-x86_64-enterprise-rhel80-6.0.2.tgz
mv mongodb-linux-x86_64-enterprise-rhel80-6.0.2 mongodb
mv mongodb /usr/local/
cd /usr/local/mongodb/
vim /etc/profile
2.vim配置环境,添加变量
#mongodb6
export MONGODB_HOME=/usr/local/mongodb
export PATH=$PATH:$MONGODB_HOME/bin
3.验证安装成功
source /etc/profile
bin/mongod --version
4.报错处理(版本验证成功的略过)
安装依赖
yum install net-snmp
5.安装mongodb6 shell
1.安装报错
rpm -ivh mongodb-mongosh-shared-openssl11-1.6.0.aarch64.rpm
2.先安装glibc_2.17
yum install -y wget gcc openssl-devel
cd /tmp/
wget http://ftp.gnu.org/pub/gnu/glibc/glibc-2.17.tar.gz
tar -zxvf glibc-2.17.tar.gz
cd glibc-2.17
mkdir build #否则后面执行./configure会报错you must configure in a separate build directory
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make && make install #make install 必须是root
又报错gcc版本太低
最后放弃安装rpm的包了,选择了taz解决
百度网盘:
链接:mongosh-1.6.0-linux-x64.tgz
提取码:681v