作者:mobiledu2502869373 | 来源:互联网 | 2023-05-31 13:46
一、下载wget wgethttps:www.ydhwh.cnmongodb-linux-x86_64-rhel70-3.6.8.tgz二、解压tar-zxvfmongodb-li
一、下载
wget wget https://www.ydhwh.cn/mongodb-linux-x86_64-rhel70-3.6.8.tgz
二、解压
tar -zxvf mongodb-linux-x86_64-rhel70-3.6.8.tgz
三、配置
1、新建db、log存放文件
2、新建配置文件 mongo.config
dbpath=/usr/local/product/mongodb/db
logpath=/usr/local/product/mongodb/log/mongo.log
fork=true
bind_ip=127.0.0.1
四、启动关闭
Mongodb启动
mongod -f /usr/local/product/mongodb/mongo.config
win下开机启动
mongod –config c:\data\mongodb\mongo.config –install –serviceName “MongoDB”
Mongodb安全关闭
mongod –shutdown -f /usr/local/product/mongodb/mongo.config
五、配置Mongodb账号密码(待续)