Skip to content

Instantly share code, notes, and snippets.

@paceline
Created August 13, 2013 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paceline/6219330 to your computer and use it in GitHub Desktop.
Save paceline/6219330 to your computer and use it in GitHub Desktop.
Install php from source to use with fastcgi, e.g. behind a nginx web server. Should work on Debian-based systems (can't remember exactly but I think used these on Ubuntu Lucid)

Install necessary packages

apt-get install autoconf2.13 libssl-dev libcurl4-gnutls-dev libjpeg62-dev libpng12-dev libmcrypt-dev libmysql++-dev libfreetype6-dev libt1-dev libc-client-dev libbz2-dev mysql-client libevent-dev libxml2-dev

apt-get install autoconf libssl-dev libcurl4-gnutls-dev libjpeg62-dev libpng12-dev libmcrypt-dev libmysql++-dev libfreetype6-dev libt1-dev libc-client-dev libbz2-dev mysql-client libxml2-dev

Configure, compile and install

cd /usr/src/php-5.3.3`

./configure --enable-fpm --enable-soap --with-mcrypt --enable-mbstring --with-openssl --with-mysql --with-mysql-sock --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --with-pdo-mysql --with-libxml-dir=/usr/lib --with-mysqli=/usr/bin/mysql_config --with-curl --enable-zip --with-bz2 --with-imap=shared --with-imap-ssl --enable-sockets --with-zlib --enable-exif --enable-ftp --with-iconv --with-gettext --enable-gd-native-ttf --with-t1lib=/usr --with-freetype-dir=/usr --with-kerberos --prefix=/usr/local/php --with-fpm-user=www-data --with-fpm-group=www-data`

make

make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment