Skip to content

Instantly share code, notes, and snippets.

@chapeupreto
Created February 2, 2017 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chapeupreto/5ec09c3e5cc2f5f2c4be1843b8eb4a7d to your computer and use it in GitHub Desktop.
Save chapeupreto/5ec09c3e5cc2f5f2c4be1843b8eb4a7d to your computer and use it in GitHub Desktop.
Instalação MongoDB com PHP5.6 no Ubuntu 14

Instalação mongodb (1.1.8) com PHP5.6 (Ubuntu 14.04.5 LTS)

sudo apt-get install -y php5.6-dev
sudo apt-get install -y php-pear
sudo apt-get install -y pkg-config

sudo pecl channel-update pecl.php.net
sudo pecl install mongodb

Opcional

sudo apt-get install -y libsslcommon2-dev
# como usuario root
cat > /etc/php/5.6/mods-available/mongodb.ini <<EOM
extension=mongodb.so
EOM

-rw-r--r-- 1 root root 21 Sep 30 00:13 mongodb.ini

ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/20-mongodb.ini
ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/apache2/conf.d/20-mongodb.ini
service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment