


Linux source code compilation of php5.4 and above comes with the configure parameters and dependency packages of php-fpm
I often need to compile and install PHP myself in the Linux environment. There are many configure parameters. Sometimes I have to recompile PHP when I use it without paying attention, so the commonly used configure commands are organized as follows.
The first step is to install the dependent package:
yum -y install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel libaio
In fact, you may also need to install the mcrypt extension (typical error: phpmyadmin reports an error and cannot load the mcrypt extension).
To install the mcrypt extension, you can use the command:
yum install libmcrypt-devel
Then use the command:
yum install php-mcrypt
The mcrypt extension is successfully installed.
Second step, install php:
cd /tmp wget http://cn2.php.net/get/php-5.5.10.tar.gz/from/cn2.php.net/mirror tar -zxvf mirror cd ./php-5.5.10
Then execute the command:
./configure \ --prefix=/usr/local/php5 \ --with-config-file-path=/usr/local/php5/etc \ --with-bz2 \ --with-curl \ --enable-ftp \ --enable-sockets \ --disable-ipv6 \ --with-gd \ --with-jpeg-dir=/usr/local \ --with-png-dir=/usr/local \ --with-freetype-dir=/usr/local \ --enable-gd-native-ttf \ --with-iconv-dir=/usr/local \ --enable-mbstring \ --enable-calendar \ --with-gettext \ --with-libxml-dir=/usr/local \ --with-zlib \ --with-pdo-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-mysql=mysqlnd \ --enable-dom \ --enable-xml \ --with-libdir=lib64 \ --enable-pdo \ --enable-fpm \ --enable-mcrypt
The compilation process may report the following error:
checking for known struct flock definition… configure: error: Don’t know how to define struct flock on this system, set –enable-opcache=no
The solution is:
yum groupinstall "Development tools"
Finally execute the commands separately:
make make install
The above introduces the configure parameters and dependency packages of php-fpm that come with Linux source code compilation of php5.4 and above, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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

AI Hentai Generator
Generate AI Hentai for free.

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



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

To work on file upload we are going to use the form helper. Here, is an example for file upload.

Validator can be created by adding the following two lines in the controller.

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP is an open source MVC framework. It makes developing, deploying and maintaining applications much easier. CakePHP has a number of libraries to reduce the overload of most common tasks.

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an
