Skip to content

Instantly share code, notes, and snippets.

@huglester
Last active August 29, 2015 13:57
Show Gist options
  • Save huglester/9587893 to your computer and use it in GitHub Desktop.
Save huglester/9587893 to your computer and use it in GitHub Desktop.
phpbrew Debian 7.0 setup
# I installed phpbrew 1.3.0 since has problems with instlaing extentions using 1.3.1
# see https://github.com/c9s/phpbrew/issues/214
curl -O https://raw.github.com/c9s/phpbrew/master/phpbrew
chmod +x phpbrew
sudo cp phpbrew /usr/bin/phpbrew
phpbrew init
source ~/.phpbrew/bashrc
# some pre-requirements
apt-get install -y php5 php5-dev php-pear autoconf automake curl build-essential libxslt1-dev re2c libxml2 libxml2-dev php5-cli bison libbz2-dev libreadline-dev
apt-get install -y libmcrypt4 libmcrypt-dev libgd-tools libicu-dev libfreetype6 libfreetype6-dev
apt-get install -y libpng12-dev libjpeg62-dev
# need before install
phpbrew lookup-prefix linux
phpbrew install php-5.3.28 +default +mysql +gettext +mcrypt +intl +iconv +ftp +exif +dba +openssl +soap +ipv6 +imap +debug +exif +apxs2=/usr/bin/apxs2 -- --with-libdir=lib/x86_64-linux-gnu --with-gd=shared --enable-gd-native-ttf --with-jpeg-dir=/usr --with-png-dir=/usr --enable-wddx --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-freetype-dir=/usr/include/freetype2/freetype
libtool --finish /root/.phpbrew/build/php-5.3.28/libs
phpbrew switch 5.3.28
# GD
apt-get install -y libcurl4-gnutls-dev
phpbrew ext install gd
# GD
apt-get install libgd2-xpm-dev
phpbrew ext install curl
# Imagick
apt-get install -y libmagick++-dev
phpbrew ext install imagick 3.1.0RC2
libtool --finish /root/.phpbrew/build/php-5.3.28/modules
libtool --finish /root/.phpbrew/build/php-5.3.28/ext/gd/modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment