How to compile and install php5.6 php-fpm
php5.6 php-fpm compilation and installation method: 1. Install the php dependency package and download the php5.6.36 version; 2. Specify the software installation directory as "/usr/local/php"; 3. Perform nginx Just configure and parse php.
The operating environment of this article: ubuntu16.04 system, php5.6.36 version, Dell G3 computer.
php5.6 php-fpm nginx installation and configuration
Today I found a website based on the php version, and then I went online to collect information and installed it again. try.
1. First install the php dependency package.
1 |
|
2. Download the php5.6.36 version
1 |
|
php-fpm component description
nginx in the LNMP environment does not support php, you need Process PHP requests through the fastcgi plug-in. PHP requires the php-fpm component to provide this function. In versions before php5.3.3, php-fpm existed in the form of a patch package. After php5.3.3, you only need to use --enable-fpm to load the module during compilation and installation, without installing it separately.
3. Install php
First create the directory where php needs to be installed
1 2 3 4 5 6 |
|
In the following configuration, specify the software installation directory as /usr/local/php , the configuration file installation directory is
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
View the contents of the software installation directory
1 2 |
|
Copy the configuration file template to the configuration file directory
1 |
|
Create a soft connection
1 2 3 |
|
Check the installed version
1 2 3 4 5 6 7 8 9 10 11 |
|
Check whether the port is occupied
1 |
|
Start the service
1 2 3 4 |
|
Four , nginx configuration parsing php
1. Enter the nginx directory
1 |
|
2. Edit the configuration file
1 |
|
and find it under server
1 2 3 4 5 6 |
|
Configure below. The php request is sent to the back-end php-fpm module. By default, the php configuration block is commented. At this time, remove the comment and modify it to the following content:
1 2 3 4 5 6 7 8 9 |
|
Reload nginx after saving
1 2 3 |
|
5. Related queries
1. Use the command to check how many php-cgi processes are opened on the server
1 |
|
2. Check how many php-cgi processes are used to handle tcp requests
1 |
|
3. In the linux nginx php environment, each php-fpm process Memory limit
Setting method:
Edit the php-fpm.conf configuration file
php_admin_value[memory_limit] = 128M (the configuration file on my server is in /etc/php5/fpm/pool .d/www.conf This file is included in php-fpm.conf) The following numbers can be changed at will: 32M, 64M, 128M, 256M, 512M. This setting can be based on the memory size of your server and your needs. To write, you need to load the php-fpm service after modification
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to compile and install php5.6 php-fpm. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

PHP 8's JIT compilation enhances performance by compiling frequently executed code into machine code, benefiting applications with heavy computations and reducing execution times.

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

The article discusses symmetric and asymmetric encryption in PHP, comparing their suitability, performance, and security differences. Symmetric encryption is faster and suited for bulk data, while asymmetric is used for secure key exchange.

The article discusses implementing robust authentication and authorization in PHP to prevent unauthorized access, detailing best practices and recommending security-enhancing tools.

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

Article discusses best practices for PHP input validation to enhance security, focusing on techniques like using built-in functions, whitelist approach, and server-side validation.

The article discusses strategies to prevent CSRF attacks in PHP, including using CSRF tokens, Same-Site cookies, and proper session management.
