Skip to content

Instantly share code, notes, and snippets.

@snowtema
Last active June 26, 2017 10:42
Show Gist options
  • Save snowtema/a80aec7860e55964882258ccf41db0b4 to your computer and use it in GitHub Desktop.
Save snowtema/a80aec7860e55964882258ccf41db0b4 to your computer and use it in GitHub Desktop.
Bash script to install MongoDB extension for LEMP (PHP7.x)
sudo apt-get install php-dev pkg-config libssl-dev libsslcommon2-dev php-pear -y
sudo pecl install mongodb
echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
# Replace 'x' with actual PHP version
service php7.x-fpm restart
service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment