Linix安装Mongo

启动:sudo service mongod start 验证是否启动:/var/log/mongodb/mongod.log 有这样一段话 [initandlisten] waiting for connections on port <port> <port> is the port configured in /etc/mongod.conf, 27017 by default. 停止:sudo service mongod stop 重启:sudo service mongod restart  to stop MongoDB, press Control+C  The MongoDB instance stores its data files in /var/lib/mongodb and its log files in /var/log/mongodb by default, ---*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--- Setup Mongo  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list sudo apt-get update sudo apt-get install -y mongodb-org  Install PHP Mongo Extension  sudo pecl install mongo After install successfully, create 'mongo.ini' file in /etc/php5/mods-available, write 'extension=mongo.so' to it. Then create symbol link like below  sudo ln -s /etc/php5/mods-available/mongo.ini /etc/php5/fpm/conf.d/30-mongo.ini sudo ln -s /etc/php5/mods-available/mongo.ini /etc/php5/cgi/conf.d/30-mongo.ini sudo ln -s /etc/php5/mods-available/mongo.ini /etc/php5/cli/conf.d/30-mongo.ini

你可能感兴趣的:(Linix安装Mongo)