# mongod.conf # for documentation of all options, see: # http://www.tjdsmy.cn/manual/reference/configuration-options/ # where to write logging data. systemLog: destination:file logAppend:true path:/data/mongo/logs/mongod.log#修改成上面創(chuàng)建的路徑 # Where and how to store data. storage: dbPath:/data/mongo/data#修改成上面創(chuàng)建的路徑 journal: enabled:true # engine: # mmapv1: # wiredTiger: # how the process runs processManagement: fork:true# fork and run in background pidFilePath:/data/mongo/logs/mongod.pid#修改成上面創(chuàng)建的路徑 # location of pidfile timeZoneInfo:/usr/share/zoneinfo # network interfaces net: port:27017 bindIp:127.0.0.1# Listen to local interface only, comment to listen on all interfaces. #security: #operationProfiling: #replication: #sharding: ## Enterprise-Only Options #auditLog: #snmp:
啟動(dòng) MongoDB
mongod -f /etc/mongod.conf
0x05 ElasticSearch
下載ElasticSearch
cd /data && wget http://www.tjdsmy.cn/Tools/ElasticSearch/elasticsearch-6.8.11.tar.gz
解壓
tar -zxvf elasticsearch-6.8.11.tar.gz
創(chuàng)建用戶
useradd es #因?yàn)閑lasticsearch不能以root賬戶啟動(dòng),所以需新建一個(gè)用戶啟動(dòng)。