Skip to content

Instantly share code, notes, and snippets.

@nocoo
Created April 9, 2014 03:14
Show Gist options
  • Save nocoo/10222877 to your computer and use it in GitHub Desktop.
Save nocoo/10222877 to your computer and use it in GitHub Desktop.
Compile install PHP 5.3.28
# Install dependency libs of PHP5
aptitude build-dep php5
# Add this one
aptitude install libmcrypt-dev
./configure --prefix=/usr/local/php53 \
--with-config-file-path=/etc/php53 \
--with-config-file-scan-dir=/etc/php53/conf.d \
--without-t1lib \
--disable-short-tags \
--enable-pcntl \
--with-tsrm-pthreads \
--with-mysqli \
--with-mysql \
--with-pdo-mysql \
--with-zlib \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-fpm \
--with-gd \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-iconv-dir \
--with-gettext \
--enable-mbstring \
--with-mcrypt \
--with-mhash \
--with-pspell \
--enable-soap \
--enable-sockets \
--enable-wddx \
--with-xmlrpc \
--with-xsl \
--enable-zip \
--with-kerberos \
--with-tidy \
--with-curl \
--with-curlwrappers \
--disable-fileinfo
# If your VPS doesn't have 1G+ plus memory, add "--disable-fileinfo" to configure
make
make install
mkdir -p /etc/php53/conf.d
cp php.ini-production /etc/php53/conf.d/php.ini
cp sapi/fpm/php-fpm.conf /usr/local/php53/etc/
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment