关于src/mongo/shell/mongo.js:91问题
manna@ubuntu:/var/lib/mongodb$ mongo
MongoDB shell version: 2.2.1
connecting to: test
Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed
查找log发现
[initandlisten] Unable to check for journal files due to: boost::filesystem::basic_directory_iterator constructor: No such file or directory: "/var/lib/mongodb/journal"
发现没有journal文件夹
sudo mkdir journal
mongod
再开一终端 mongo
ok
另发现nginx下页面问题,原来是文件夹权限问题
给他前
-rw-r--r-- 1 root root 537 9月 25 23:03 50x.html
drwxr-xr-x 5 root root 4096 11月 13 21:00 git
-rw-r--r-- 1 root root 612 9月 25 23:03 index.html
-rwxrwxrwx 1 root root 24 11月 3 20:37 index.php
drwxr-xr-x 2 root root 4096 11月 13 21:48 local
-rw-r--r-- 1 root root 20 11月 2 21:27 php.html
-rw-r--r-- 1 root root 0 11月 3 21:30 php.ini
-rw-r--r-- 1 root root 20 11月 2 21:28 php.php
-rw-r--r-- 1 root root 281 11月 6 13:06 skua.php
然后
sudo chmod a+rwx html/ -R
全给他
-rwxrwxrwx 1 root root 537 9月 25 23:03 50x.html
drwxrwxrwx 5 root root 4096 11月 13 21:00 git
-rwxrwxrwx 1 root root 612 9月 25 23:03 index.html
-rwxrwxrwx 1 root root 24 11月 3 20:37 index.php
drwxrwxrwx 2 root root 4096 11月 13 21:48 local
-rwxrwxrwx 1 root root 20 11月 2 21:27 php.html
-rwxrwxrwx 1 root root 0 11月 3 21:30 php.ini
-rwxrwxrwx 1 root root 20 11月 2 21:28 php.php
-rwxrwxrwx 1 root root 281 11月 6 13:06 skua.php
过