编译安装php-7.0.12

1.下载php安装包

# wget http://cn2.php.net/distributions/php-7.0.12.tar.bz2

2.解压

# tar -zxvf nginx-1.10.3.tar.gz

3.编译

# ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --datadir=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-fpm-user=nginx --with-fpm-group=nginx --with-gd --with-iconv --enable-mbstring --enable-fpm --enable-mysqlnd

出错:

configure: error: xml2-config not found. Please check your libxml2 installation.

解决:

libxml-devel没有安装

# yum install libxml2*

出错:

configure: error: png.h not found.

解决:

# yum install libpng*

4.安装

# make & make install

你可能感兴趣的:(linux运维)