Last active
December 30, 2015 05:09
-
-
Save nghuuphuoc/7781168 to your computer and use it in GitHub Desktop.
Install MongoDb on Centos 6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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