Skip to content

Instantly share code, notes, and snippets.

@dawidgora-old-account
Forked from piotrplenik/phpbrew-install.sh
Created September 2, 2017 09:01
Show Gist options
  • Save dawidgora-old-account/c16a17bacc706b3fb84fccac6e1f013e to your computer and use it in GitHub Desktop.
Save dawidgora-old-account/c16a17bacc706b3fb84fccac6e1f013e 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