Skip to content

Instantly share code, notes, and snippets.

@atasky
Forked from Amar-Chaudhari/Readme.md
Last active July 28, 2024 16:45
Show Gist options
  • Select an option

  • Save atasky/0d6db7a40eabfeb36014bd3db2846d1e to your computer and use it in GitHub Desktop.

Select an option

Save atasky/0d6db7a40eabfeb36014bd3db2846d1e to your computer and use it in GitHub Desktop.
Install PHP-5.6.38 from source

Install Requirments

yum install bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel libxml2-devel libc-client-devel libmcrypt-devel -y
or
zypper install 

Download Package

cd /tmp
wget -O php-5.6.38.tar.gz http://pl1.php.net/get/php-5.6.38.tar.gz/from/this/mirror
tar -zxvf php-5.6.38.tar.gz
cd php-5.6.38

Compile php

libtoolize && aclocal && autoconf && automake
./configure --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-kerberos --enable-mbstring --with-mhash --with-mysql --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-zlib-dir --with-regex --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-soap --enable-sockets --with-xmlrpc --enable-zip --with-zlib --with-imap-ssl --with-kerberos --enable-inline-optimization --enable-mbregex --enable-opcache --enable-fpm --with-libdir=lib64 --prefix=/usr/local/php56
make -j $(nproc)
make install

PHP-FPM setup

cd /usr/local/php/etc
mkdir fpm.d
cp php-fpm.conf.default php-fpm.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment