启动 mongod 的 script 要用绝对路径,因为是要 sudo 去执行

This commit is contained in:
Luk Lu
2019-10-03 14:54:28 +08:00
parent ab0a9c0b27
commit c387edc55c
2 changed files with 4 additions and 4 deletions

View File

@@ -7,5 +7,5 @@ security:
javascriptEnabled: true javascriptEnabled: true
authorization: enabled authorization: enabled
systemLog: systemLog:
path: ../mongodb/log/mongod.log #日志路径。 path: /home/adot/mongodb/log/mongod.log #日志路径。
destination: file #日志输出方式。file/syslog,如果是file需指定path默认是输出到标准输出流中 destination: file #日志输出方式。file/syslog,如果是file需指定path默认是输出到标准输出流中

View File

@@ -6,9 +6,9 @@
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"dev": "node --inspect-brk ./", "dev": "node --inspect-brk ./",
"mongod": "~/mongodb/bin/mongod -f ./mongod.conf --logpath ~/mongodb/log/mongod.log", "mongod": "/home/adot/mongodb/bin/mongod -f ./mongod.conf --logpath /home/adot/mongodb/log/mongod.log",
"mongodump": "~/mongodb/bin/mongodump -h localhost:6842 -d vic -o ~/mongodb/backup", "mongodump": "/home/adot/mongodb/bin/mongodump -h localhost:6842 -d vic -o /home/adot/mongodb/backup",
"mongorestore": "~/mongodb/bin/mongorestore -h localhost:6842 -d vic -o ~/mongodb/backup/vic", "mongorestore": "/home/adot/mongodb/bin/mongorestore -h localhost:6842 -d vic -o /home/adot/mongodb/backup/vic",
"daemon.pm2": "cross-env NODE_ENV=production pm2 start index.js --name vic.server" "daemon.pm2": "cross-env NODE_ENV=production pm2 start index.js --name vic.server"
}, },
"author": "Nova.xu", "author": "Nova.xu",