1.mogedb下载
下载的是他tar包
https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel80-7.0.5.tgz
wget -o https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel80-7.0.5.tgz
2.将包上传至服务器并解压
#进入目录 并解压 cd /opt/ tar xvf mongodb-linux-x86_64-rhel80-7.0.5.tgz
复制到/usr/local/mongodb/
3.添加环境变量 vi /etc/profile
vi /etc/profile PATH=$PATH:/usr/local/mongodb/bin source /etc/pro