Skip to content

Instantly share code, notes, and snippets.

@piotrplenik
Last active February 21, 2019 09:47
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 piotrplenik/261edf48a8e24b97eb587a5d8ea1dd1c to your computer and use it in GitHub Desktop.
Save piotrplenik/261edf48a8e24b97eb587a5d8ea1dd1c to your computer and use it in GitHub Desktop.
PHPBrew for Symfony 3 on Ubuntu and Debian
# Install Requrements
apt-get install curl libxslt1-dev libreadline6-dev libmcrypt-dev libicu-dev g++ \
libcurl4-openssl-dev libssl-dev clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev \
pkg-config libcurl3 autoconf libmagickwand-dev libmagickcore-dev
# Install PHPBrew (https://github.com/phpbrew/phpbrew)
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew; chmod +x phpbrew
sudo mv phpbrew /usr/local/bin/phpbrew
########################
## PHP 7.1
# Install with all Symfony required extensions
phpbrew install php-7.1.0 as php71 +default+mb+mysql+sqlite+pdo+fpm+json+iconv+mcrypt+intl+exif
phpbrew ext install gd \
-- --with-gd=shared \
--enable-gd-native-ttf \
--with-freetype-dir=/usr/include/freetype2/freetype
phpbrew --debug ext install imagick
# Usage (on session)
phpbrew use php71
# Switch (pernament)
phpbrew switch php71
########################3
## PHP 7.0
# Install with all Symfony required extensions
phpbrew install php-7.0.14 as php7 +default+mb+mysql+sqlite+pdo+fpm+json+iconv+mcrypt+intl+exif+gd+curl
# Usage
phpbrew use php7
# Switch
phpbrew switch php7
########################3
## Disable PHPBrew
phpbrew off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment