This article shared the issue of compiling and installing PHP, very detailed, the need for friends can refer to
Assuming that all dependencies have been resolved, such as installing a program that is not installed, continue after installation
Set up to use the highest privileged user, if not then add sudo before the command
Download to PHP website
Extract to User directory
Tar jxvf php-5.6.5.tar.bz2
Configuring Installation Options
./configure \
--prefix=/usr/local/php \
--WITH-CONFIG-FILE-PATH=/USR/LOCAL/PHP/ETC \
--enable-zip \
--ENABLE-FPM \
--enable-static \
--enable-debug \
--enable-calendar \
--enable-mbstring \
--enable-sockets \
--WITH-OPENSSL \
--with-zlib \
--with-curl \
--with-gettext \
--with-iconv \
--with-pcre-regex \
--with-mcrypt \
--with-iconv \
--WITH-LIBDIR=/LIB/X86_64-LINUX-GNU \
--WITH-MYSQL=MYSQLND \
--WITH-MYSQLI=MYSQLND \
--with-pdo-mysql=mysqlnd
Compiling the program
Make
installation program
Make install
Copying a configuration file
CP./php.ini-development/usr/local/php/etc/php.ini
Start PHP-FPM
/usr/local/php/sbin/php-fpm
Add PHP-FPM script to startup item
CP./SAPI/FPM/INIT.D.PHP-FPM/ETC/INIT.D/PHP-FPM
chmod 755/etc/init.d/php-fpm
Related recommendations:
LNMP compile and install PHP and LNMP configuration and authentication instance sharing
Questions about compiling and installing PHP
Manually compiling and installing PHP encounters errors and resolution records