Skip to content

Instantly share code, notes, and snippets.

@aputs
Created February 12, 2010 04:08
Show Gist options
  • Save aputs/302284 to your computer and use it in GitHub Desktop.
Save aputs/302284 to your computer and use it in GitHub Desktop.
ubuntu php 5.3.2-dev + xcache + phpfpm + mysql
#pre requisites
aptitude install -y build-essential libtool libltdl3-dev libgd2-xpm-dev libmcrypt-dev libxml2-dev libmysqlclient15-dev flex m4 awk automake autoconf bison make libbz2-dev libpcre3-dev libssl-dev zlib1g-dev vim re2c
aptitude install -y mysql-client mysql-client mysql-common mysql-server mysql-server mysql-server-core
aptitude install -y libtidy-dev curl libcurl4-openssl-dev libcurl3 libcurl3-gnutls zlib1g zlib1g-dev libxslt1-dev libzip-dev libzip1 libxml2 libsnmp-base libsnmp15 libxml2-dev libsnmp-dev libjpeg62 libjpeg62-dev libpng12-0 libpng12-dev zlib1g zlib1g-dev libfreetype6 libfreetype6-dev libbz2-dev libxpm4-dev libmcrypt-dev libmcrypt4
aptitude install -y libxml2-dev libevent-dev
#modify php-fpm config at /usr/local/etc/php-pfm.conf
#copy php-fpm init script under sapi/fpm/php-fpm to /etc/init.d/
#get php from svn
svn co http://svn.php.net/repository/php/php-src/branches/PHP_5_3_FPM php_5_3_fpm
cd php_5_3_fpm
./buildconf
./configure --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --with-openssl --with-gd --with-jpeg-dir=/usr/lib --enable-gd-native-ttf \
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock \
--with-curl --disable-debug --disable-rpath --enable-inline-optimization --enable-sockets \
--with-curl --with-bz2 --with-zlib --with-xsl --with-tidy --with-pcre-regex --enable-ftp --enable-exif --enable-inline-optimization \
--enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip
make
checkinstall --pkgname=php53dev --pkgversion "php5.3.2-dev+svn`svnversion|sed -e 's/^[^:]*://;s/[A-Za-z]//'`" --backup=no --default
rehash php
#xcache 1.3.0
export XCACHE_VER=1.3.0
wget http://xcache.lighttpd.net/pub/Releases/$XCACHE_VER/xcache-$XCACHE_VER.tar.gz
tar xzvf xcache-$XCACHE_VER.tar.gz
cd xcache-$XCACHE_VER
phpize
./configure --with-php-config=/usr/local/bin/php-config --enable-xcache
make
checkinstall --pkgname=xcache --pkgversion "xcache1.3.0" --backup=no --default
#enable xcache on php.ini
#/usr/local/lib/php.ini
---
magic_quotes_gpc=0
[xcache-common]
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20090626/xcache.so
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M
date.timezone = "Asia/Manila"
default_charset = "utf-8"
------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment