MongoDB —— CentOS7安装MongoDB
发表于:2022-07-16 15:45:04浏览:750次
MongoDB —— CentOS7安装MongoDB
mongodb安装位置:/usr/local/software/mongodb
1)下载对应版本mongodb压缩包 直达下载地址,解压,创建对目录
# wget # tar -zxvf mongodb-linux-x86_64-rhel70-5.0.9.tgz # mv mongodb-linux-x86_64-rhel70-5.0.9 /usr/local/software/mongodb # cd /usr/local/software/mongodb # mkdir data log conf
2)配置config文件,先不配置密码安全认证,文件遵守yaml格式
# vim conf/mongo.conf # - - - - - - systemLog: destination: file path: /usr/local/software/log/mongod.log # log path logAppend: true storage: dbPath: /usr/local/software/mongodb/data # data directory engine: wiredTiger #存储引擎 journal: #是否启用journal日志 enabled: true net: bindIp: 0.0.0.0 port: 27017 # port processManagement: fork: true #security: #authorization: enabled