Skip to content

Instantly share code, notes, and snippets.

@natanfelles
Created January 11, 2018 22:36
Show Gist options
  • Save natanfelles/cb5acdd5a5343344ea8f5be117f5728a to your computer and use it in GitHub Desktop.
Save natanfelles/cb5acdd5a5343344ea8f5be117f5728a to your computer and use it in GitHub Desktop.
PHP Dev Env
sudo apt-get install apt-transport-https lsb-release ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list'
sudo apt update
sudo apt upgrade
sudo apt install php5.6-fpm php7.0-fpm php7.1-fpm php7.2-fpm

git clone https://github.com/xdebug/xdebug.git
cd xdebug
git checkout XDEBUG_2_5_5

PHPV=7.2
sudo sh -c "echo 'zend_extension=xdebug.so' > /etc/php/$PHPV/mods-available/xdebug.ini"
sudo ln -sf /etc/php/$PHPV/mods-available/xdebug.ini /etc/php/$PHPV/fpm/conf.d/20-xdebug.ini
sudo ln -sf /etc/php/$PHPV/mods-available/xdebug.ini /etc/php/$PHPV/cli/conf.d/20-xdebug.ini
sudo phpize$PHPV && sudo ./configure && sudo make clean && sudo make && sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment