php 编译安装

php 报错:

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

解决:

apt install libxml2
apt install libxml2-dev

编译安装 zlib(wordpress 报错 Call to undefined function gzinflate(), 特编译此项):

#https://zlib.net/
wget https://zlib.net/zlib-1.2.11.tar.gz
./configure --prefix=/mnt/apps/zlib
make
make install

编译:

./configure --prefix=/mnt/apps/php7 --enable-fpm  --with-pdo-mysql --with-mysqli  --with-zlib-dir=/mnt/apps/zlib
make
make install