PHP 5.5 introduces new features and improves several existing ones but to make use of them in distributions such as Debian, CentOS, Ubuntu, Fedora we should compile it because at the moment in which I write this article PHP 5.5 has not been included in official repositories today LibreByte will show how to compile PHP 5.5 on Debian GNU/Linux
This procedure has been tested on Debian GNU/Linux 7 (squeeze), make the necessary modifications so that it fits to your distribution.
Download PHP 5.5
$ wget http://us1.php.net/distributions/php-5.5.15.tar.xz
Unpack PHP 5.5
$ tar xJvf php-5.5.15.tar.xz
Download and run the script to install dependencies
$ wget --no-check-certificate https://raw.githubusercontent.com/yoander/sysadmin/master/shscript/php-dev-install-dep.sh && chmod a+x -c php-dev-install-dep.sh && ./php-dev-install-dep.sh
Download script to compile php
$ wget --no-check-certificate https://raw.githubusercontent.com/yoander/sysadmin/master/shscript/php-build.sh && chmod a+x -c php-build.sh
Compile php
$./php-build.sh -a php-5.5.15
Install
$ cd php-5.5.15 && sudo make install
Deploy configuration file
$ sudo cp -v php.ini-development /etc/php/php.ini
Activate OpCache
$ sudo bash -c 'echo "zend_extension=opcache.so" > /etc/php/conf.d/20-opcache.ini'
Restart Apache
$ sudo service apache2 restart
Check
$ firefox http://localhost/info.php
How to compile PHP from the source code, 7 (11)
- How to compile PHP 7.1 in Ubuntu 16.04
- Butterfly Builder, a tool to compile PHP
- How to compile PHP 7.4 on Ubuntu 18.04
- How to compile PHP-7.3 en Debian
- How to compile PHP-7.2 on CentOS
- How to Compile PHP 8.0 in Debian 10?
- Compile php 5.5 with apache prefork support
- Compile PHP-5.6 with Apache Worker support
- Compile php-5.6 with fpm support
- How to compile PHP-5.6 on CentOS 7
- Compile PHP 7 on Debian 8