Created
February 1, 2015 05:57
-
-
Save jebai0521/b8cce06abac69de6611f to your computer and use it in GitHub Desktop.
后台起mongod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 方法1:(推荐) | |
# --fork 选项将会通知 mongod 在后台运行 | |
/path/to/MongoDB_Dir/bin/mongod --logpath /path/to/file.log --logappend --fork | |
# 方法2: | |
# 将输出重定向到 file.log 文件 | |
# & 将该进程置于后台运行 | |
/path/to/MongoDB_Dir/bin/mongod >> /path/to/file.log & | |
# 还可以这样运行(不记录日志) | |
# 因为所有重定向到位桶文件 /dev/null 的信息都会被丢弃 | |
/path/to/MongoDB_Dir/bin/mongod >> /dev/null & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment