Last active
August 29, 2015 14:18
-
-
Save jmeyo/16f1b352b3b1c8b6251d to your computer and use it in GitHub Desktop.
PHP oldversion compilation on ubuntu server
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
TMPDIR=$( mktemp -d 2>/dev/null ) | |
cd $TMPDIR | |
VERSION=5.3.29 #latest php released stable version in 5.3.X | |
wget http://in1.php.net/distributions/php-$VERSION.tar.bz2 | |
tar xvf php-$VERSION.tar.bz2 | |
cd php-$VERSION | |
apt-get install libxml2-dev libcurl4-openssl-dev pkg-config libssl-dev libmcrypt-dev libmysqlclient-dev libbz2-dev libjpeg-dev libpng12-dev libxpm-dev libfreetype6-dev libpq-dev libmariadbclient-dev | |
./configure --prefix=/opt/php-$VERSION --with-pdo-pgsql --with-zlib-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --enable-ftp --without-imap --without-imap-ssl --with-kerberos --with-gettext --enable-fpm --with-libdir=/lib/x86_64-linux-gnu --with-libdir=lib | |
make -j9 # octocore | |
make install | |
# edit php.ini | |
# You may want to add: /opt/php-5.3.29/lib/php to your php.ini include_path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment