Last active
August 29, 2015 13:57
-
-
Save bagf/9599977 to your computer and use it in GitHub Desktop.
Downloads PHP 5.5.9 and builds it from source, then processed to use PECL to install memcache, libxl, openssl and gearman extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Installing php5 build dependencies..." | |
apt-get build-dep -q=2 php5 | |
cd /tmp | |
# Get PHP | |
echo "Downloading and extracting php5.5.9 source..." | |
wget -q -O php5.5.9.tar.xz http://us2.php.net/get/php-5.5.9.tar.xz/from/this/mirror | |
tar xf php5.5.9.tar.xz | |
cd php-5.5.9/ | |
# Build PHP | |
echo "Building php5..." | |
./configure --enable-opcache --prefix=/usr --with-apxs2=/usr/bin/apxs2 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-tidy=/usr --with-curl=/usr/bin --with-openssl-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-pdo-mysql=mysqlnd --with-xsl=/usr --with-ldap --with-xmlrpc --with-iconv-dir=/usr --with-snmp=/usr --enable-exif --enable-calendar --with-bz2=/usr --with-mcrypt=/usr --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-mbstring --enable-zip --with-pear --with-libdir=/lib/i386-linux-gnu/ --enable-mysqlnd --enable-fpm --enable-pcntl | |
make | |
make install | |
# Pecl install memcache | |
echo "Installing memcache extension..." | |
pecl install memcache | |
cd ext/ | |
# Downloading and compling PHP_EXCEL extension for libxl | |
wget -q -O php_excel.zip https://github.com/iliaal/php_excel/archive/master.zip | |
unzip php_excel.zip | |
cd php_excel-master/ | |
phpize | |
./configure --with-libxl-incdir=/usr/include/libxl_c/ --with-libxl-libdir=/usr/lib/ --with-excel | |
make | |
make install | |
# Complie and install openssl extension | |
echo "Installing Openssl extension..." | |
cd ../openssl/ | |
mv config0.m4 config.m4 | |
phpize | |
./configure | |
make | |
make install | |
# PECL install gearman | |
echo "Installing gearman extension..." | |
pecl install gearman |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment