Installing
PHP 7
- Install dependent packages
Be sure to install gd,png,curl,xml and so on before installing the Lib Development library. If you are unsure, execute the following command:
Yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel–y
- Compiling and installing PHP 5.5.0
The following parameters support, FTP, image functions, PDO and other support, because the use of PHP's own mysqlnd, so there is no need to install the MySQL Lib library. If you are a 64-bit system, the parameters are appended with--with-libdir=lib64, if not can be skipped.
TAR-XJF php.tar.bz2
CD php-5.5.0
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/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--enable-fpm--with-libdir=lib64
This step is important and complex and must be carefully
Make && make install
CP Php.ini-production/usr/local/php/etc/php.ini
Cp/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf
Cp/usr/local/php/etc/php-fpm.d/www.conf.default/usr/local/php/etc/php-fpm.d/www.conf
(This is version 7 plus)
Start PHP
/usr/local/php-5.5.0/sbin/php-fpm
Installing nginx-php 7