mongodb
1、下载
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.4.tgz
2、解压tar包
3、在/usr/local/software/mongodb-linux-x86_64-4.0.7/下创建datas和logs文件夹,并且在logs文件夹内创建mongodb.log文件
4、配置mongodb环境变量
vi /etc/profile
添加如下内容:
#mongodb
export MONGODB_HOME=/usr/local/software/mongodb-linux-x86_64-4.0.7
export PATH= $PATH: $MONGODB_HOME/bin
5、启动/停止 命令
启动命令:
[[email protected] bin]# ./mongod -f mongodb.conf --logappend --fork
停止命令:
[[email protected] bin]# ./mongod -f mongodb.conf --shutdown
6、启动后测试是否启动成功
mongo
这只是简单的入门。