Create a /etc/apt/sources.list.d/mongodb.list file using the following command. # echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list # apt-get update # apt-get install mongodb-10gen # service mongodb start
裝完之後.可以直接打 # mongo MongoDB shell version: 2.4.8 connecting to: test >