PHP FPM (FastCGI Process Manager) is a PHP process manager allowing to execute PHP code and is called via FastCGI by your webserver. It affords to your webserver to communicate with PHP and generally provides better performances. The purpose is to make PHP work in a separated way and to install the Apache FastCGI module in order to make Apache and PHP communicate.

Apache installation

At first, it is important to install Apache on the machine in question via the following command :

MySQL installation

Then, you need to install MySQL via the following command :

During the installation, you will be asked to choose a password root.

It is advised to carefully choose your password preferably alphanumeric and including special characters.

To continue with the installation, the following command must be executed :

Enter your password root when requested and confirm the four following questions with yes :

PHP-FPM installation

Finally, you need to install PHP-FPM :

So that Apache could join PHP-FPM, we install the Fast-CGI module :

PHP-FPM configuration

From then on, you have access to the PHP configuration :

Configuration folder for PHP from the command line.

Configuration folder for PHP-FPM.

Different modules folder installed for PHP, we will come back to it for the PHP module installation.

The configuration changes are operated by the file editing php.ini.

However, please notice that the default configuration is quite enough.
After any modification, you need to restart PHP-FPM :

Apache configuration in FastCGI

PHP-FPM is currently operational but Apache now needs to know how to interpret the PHP code.
The fastcgi module has to change according to the following way :

Now, we activate the Actions module and restart Apache :

The PHP-FPM installation and configuration is complete, each PHP (.php) file will be processed by PHP-FPM.

PHP modules installation

It may happen that your system doest not have libraries/modules yet which you could need for your developer, yet you can still add some others such as GD for a PHP image processing :

The modules installed are automatically activated and the respective configuration files are located in the /etc/php5/conf.d/ folder which returns to the /etc/php5/fpm/mods-available/ folder previously discussed.

Categories: SystemTutorials

JN Community

Les Ressources, en particulier les tutoriaux, présupposent que l’Utilisateur qui décide de les mettre en œuvre dispose des connaissances, des compétences et de l’expérience nécessaire pour cette mise en œuvre. L’Utilisateur disposant d’une connaissance, compétence et/ou expérience limitée ou insuffisante doit absolument s’abstenir de mettre en œuvre les Ressources par lui-même.
Jaguar Network décline toute responsabilité quant aux conséquences dommageables de la mise en œuvre des Ressources, notamment sur les infrastructures informatiques de l’Utilisateur, de ses commettants ou préposés ou de tout tiers.
Il est précisé en tant que de besoin que toute intervention de Jaguar Network visant à réparer les dommages causés par la mise en œuvre des Ressources par un Utilisateur ne disposant pas des connaissances, compétences et/ou expériences suffisantes sera facturée et fera l’objet d’un devis préalable et d’un bon de commande aux conditions des contrats Jaguar Network en vigueur.

Related Posts


Installation of a web server LEMP (Linux, Nginx, MySQL, PHP)

Vote The installation of a server LEMP Linux + Nginx + MySQL + PHP might be more useful and efficient than an Apache (server LAMP). Articles similaires


Operating load-balancing with HAproxy

Vote HAproxy is a software allowing Load-Balancing between several web servers by allocating requests in an almost transparent way for the user. Articles similaires


10 tips to write efficient scripts on Linux

Vote The shell script is the most simple type of programming you would write on Linux. Moreover, it is a necessary skill to automate your system administration tasks, to develop new simple features, … In Read more…