Home > Plesk > Install Second Version of PHP on Plesk (2015)

1. Download php from http://php.net/downloads.php

cd /usr/local/src/
wget http://xxx/php-5.6.11.tar.bz2
tar xjf php-5.6.11.tar.bz2
mv php-5.6.11 php5611

2. Install the necessary libraries

yum install libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel gmp-devel mysql-devel ncurses-devel unixODBC-devel net-snmp-devel mhash-devel libc-client-devel libicu-devel gcc postgresql-devel aspell-devel libxslt-devel gcc-c++ openldap-devel

3. Configure

./configure '--with-libdir=lib64' '--cache-file=../config.cache' '--prefix=/usr/local/php5611-cgi' '--with-config-file-path=/usr/local/php5611-cgi/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/local/php5611-cgi' '--with-png-dir=/usr/local/php5611-cgi' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/local/php5611-cgi' '--with-openssl' '--with-pspell' '--with-pcre-regex' '--with-zlib' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-wddx' '--with-kerberos' '--with-unixODBC=/usr' '--enable-shmop' '--enable-calendar' '--without-sqlite3' '--with-libxml-dir=/usr/local/php5611-cgi' '--enable-pcntl' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbregex' '--with-gd' '--enable-bcmath' '--with-xmlrpc' '--with-ldap' '--with-ldap-sasl' '--with-mysql=/usr' '--with-mysqli' '--with-snmp' '--enable-soap' '--with-xsl' '--enable-xmlreader' '--enable-xmlwriter' '--enable-pdo' '--with-pdo-mysql' '--with-pdo-pgsql' '--with-pear=/usr/local/php5611-cgi/pear' '--without-pdo-sqlite' '--with-config-file-scan-dir=/usr/local/php5611-cgi/php.d' '--enable-cgi'

4. Compile php

cd /usr/local/src/php5611
make

5. Install php

cd /usr/local/src/php5611
make install

6. Set up php.ini

cp php.ini-development /usr/local/php5611-cgi/etc/php.ini

7. Restore SELinux contexts

restorecon -R /usr/local/php5611-cgi

Reference:
http://kb.odin.com/en/118378
http://download1.parallels.com/Plesk/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=72042.htm



Flag Counter