我一直在尝试按照c9网站上的所有说明启动mongoDB服务器,但似乎没有任何工作。 这就是我得到的
ec2-user:~ $ ls
data environment mongod
ec2-user:~ $ ./mongod
./mongod: line 1: mongod: command not found
ec2-user:~ $
ls -al
total 76
drwx------ 9 ec2-user ec2-user 4096 Dec 22 22:38 .
drwxr-xr-x 3 root root 4096 Oct 24 18:29 ..
drwxr-xr-x 2 ec2-user ec2-user 4096 Dec 22 22:38 .aws
-rw------- 1 ec2-user ec2-user 5469 Dec 22 22:40 .bash_history
-rw-r--r-- 1 ec2-user ec2-user 18 Aug 15 2016 .bash_logout
-rw-r--r-- 1 ec2-user ec2-user 218 Oct 24 18:43 .bash_profile
-rw-r--r-- 1 ec2-user ec2-user 1410 Dec 19 16:29 .bashrc
-rw-r--r-- 1 root root 142 Dec 19 16:29 .bashr_profile
lrwxrwxrwx 1 ec2-user ec2-user 7 Oct 24 18:57 .c9 -> /opt/c9
drwxrwxr-x 2 ec2-user ec2-user 4096 Dec 22 09:42 data
drwxr-xr-x 8 ec2-user ec2-user 4096 Dec 22 13:10 environment
-rw-rw-r-- 1 ec2-user ec2-user 31 Dec 22 22:38 .gitconfig
-rwxrwxr-x 1 ec2-user ec2-user 58 Dec 22 14:36 mongod
-rw------- 1 ec2-user ec2-user 41 Dec 20 08:50 .node_repl_history
drwxrwxr-x 126 ec2-user ec2-user 4096 Dec 22 14:17 .npm
drwxrwxr-x 5 ec2-user ec2-user 4096 Oct 24 18:43 .nvm
drwxrw---- 3 ec2-user ec2-user 4096 Oct 24 18:43 .pki
drwx------ 2 ec2-user ec2-user 4096 Dec 5 12:21 .ssh
-rw------- 1 ec2-user ec2-user 3711 Dec 5 12:22 .viminfo
which mongo
/usr/bin/which: no mongo in (/home/ec2-user/.nvm/versions/node/v6.11.4/bin:/usr/local/rvm/gems/ruby-2.4.1/bin:/usr/local/rvm/gems/ruby-2.4.1@global/bin:/usr/local/rvm/rubies/ruby-2.4.1/bin:/usr/local/bin:/bin:/usr/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/opt/aws/bin:/usr/local/rvm/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin)
答案 0 :(得分:0)
您所使用的教程适用于Ubuntu Linux。看起来你有一个Centos Linux。试试这个https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-centos-7