最近我通过阅读本页(http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/)安装了mongodb软件包.我使用docker和ubuntu 14.04映像来部署我的服务器.
问题始于首先运行mongod服务:
# service mongod start
Run Code Online (Sandbox Code Playgroud)
我得到以下内容:
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mongod restart
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mongod ; start mongod. The restart(8) utility is also available.
Run Code Online (Sandbox Code Playgroud)
我试过这个:
# start mongod
Run Code Online (Sandbox Code Playgroud)
但没有输出.
接下来我想查看日志,但没有日志!
ls /var/log/mongodb -a #empty
Run Code Online (Sandbox Code Playgroud)
好的,接下来我尝试启动mongo shell:
# mongo
2014-08-12T17:42:44.431+0000 …Run Code Online (Sandbox Code Playgroud)