Compile php-5.6 with fpm support

On August 28 the PHP development team released version 5.6 which includes innovative features such as: functions with arguments variable using the operator , exponentiation operations by making use of the operator **, import functions and constants using the use keyword among others. Today LibreByte will show as compiling php-5.6 with fpm support.

Download PHP 5.6.0

$ wget

Unpack PHP 5.6.0

$ tar xJvf php-5.6.0.tar.xz

Download and run the script to install dependencies

$ wget -c --no-check-certificate && 
    chmod a+x -c && 
    ./ nginx

Download script to compile php

$ wget -c --no-check-certificate && 
chmod a+x -c

Compile php with fpm support

$ ./ -f php-5.6.0


$ cd php-5.6.0 && sudo make install

Create php configuration file


$ sudo cp -v php.ini-development /etc/php/php.ini


$ sudo cp -v php.ini-production /etc/php/php.ini

Activate OpCache

$ sudo bash -c 'echo "" > /etc/php/conf.d/20-opcache.ini'

Create fpm configuration file

$ sudo cp -pv /etc/php/php-fpm.conf.default /etc/php/php-fpm.conf

Create the fpm service startup file

sudo bash -c 'cp -v sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm &&  chmod a+x -c /etc/init.d/php-fpm'

Start the fpm service

$ sudo service fpm-start

Edit the nginx configuration file

$ sudo vim /etc/nginx/sites-enabled/default

and uncomment the following lines

location ~ .php$ {
    fastcgi_split_path_info ^(.+.php)(/.+)$;
    fastcgi_index index.php
    include fastcgi_params;

Start nginx

sudo service ngnix start

We check

$ firefox http://localhost/info.php

How to compile PHP from the source code, 9 (11)

5 thoughts on “Compile php-5.6 with fpm support”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.