一、安装
官网:Download MongoDB Community Server | MongoDB
选择centOS版,下载之后:
在腾讯云OrcaTerm上上传到服务器:
1、解压缩
tar -zxvf mongodb-linux-x86_64-rhel70-6.0.5.tgz
2、重命名解压缩后的文件夹并且移动到 /usr/local 中
mv mongodb-linux-x86_64-rhel70-6.0.5 /usr/local/mongodb
3、配置环境变量
vim /etc/profile
按下i键编辑,编辑完成后按esc,然后输入:wq退出
添加下面的代码:
export PATH=/usr/local/mongodb/bin:$PATH
<