Skip to content

Instantly share code, notes, and snippets.

@salvianoo
Forked from chapeupreto/instalacao.md
Created May 17, 2017 15:13
Show Gist options
  • Save salvianoo/e64abc3e24f60c094a7f435d0b02f5f6 to your computer and use it in GitHub Desktop.
Save salvianoo/e64abc3e24f60c094a7f435d0b02f5f6 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