Skip to content

Instantly share code, notes, and snippets.

@nghuuphuoc
Last active December 30, 2015 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nghuuphuoc/7781168 to your computer and use it in GitHub Desktop.
Save nghuuphuoc/7781168 to your computer and use it in GitHub Desktop.
Install MongoDb on Centos 6
// Add mongo repos
$ nano /etc/yum.repos.d/10gen.repo
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
// Install Mongo
$ yum install mongo-10gen mongo-10gen-server
// Set Mongo auto-start
$ chkconfig mongod on
$ chkconfig --levels 235 mongod on
// Start/stop/restart Mongo
$ service mongod start/stop/restart
// Config file: /etc/mongod.conf
// Install mongo extension for PHP
$ yum --enablerepo=remi,remi-test install php-pecl-mongo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment