centos 7.2 安装mongodb 3.4.4免编译
/根目录下:
获取命令:
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.4.tgz
解压命令:
tar zvxf mongodb-linux-x86_64-3.4.4.tgz
移动到/usr/local/mongodb344目录下:
mv mongodb-linux-x86_64-3.4.4 /usr/local/mongodb344
/usr/local/mongodb344目录下:
配置mongodb:
mkdir mongodb_database
进入mongodb_database目录:cd mongodb_database
mkdir data
mkdir log
mkdir conf
mkdir bin
cp bin/mongod bin/
进入conf目录编写配置文件:
cd conf/
vim mongod.conf
回到mongodb_database目录下:cd ..
./bin/mongod -f conf/mongod.conf
cp ../bin/mongo bin/ ./bin/mongo 127.0.0.1:344