Skip to content

Instantly share code, notes, and snippets.

@paul91
Created October 17, 2014 16:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save paul91/f0d7a4467955746ca4be to your computer and use it in GitHub Desktop.
Save paul91/f0d7a4467955746ca4be to your computer and use it in GitHub Desktop.
PECL install mongo client on CentOS 6.5
#!/bin/bash
# Resolve dependencies. If you are using a custom version of php (ex. php55w) replace it here.
yum install -y php php-devel php-pear gcc
# Use PECL to compile the extension
pecl install mongo
# Enable the mongo extension
echo "extension=mongo.so" > /etc/php.d/mongo.ini
# Ensure the module is loaded properly and restart Apache/Nginx
php -i | grep mongo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment