安装相关依赖库
sudo apt-get update
sudo apt-get install libxml2-dev
#安装gcc
sudo apt-get install build-essential
sudo apt-get install openssl (不安装则报错: Cannot find OpenSSL\'s )
sudo apt-get install libssl-dev (不安装则报错: Cannot find OpenSSL\'s )
sudo apt-get install make
sudo apt-get install curl(不安装则报错: libcrl未找到 )
sudo apt-get install libcurl4-gnutls-dev (不安装则报错: libcrl未找到 )
sudo apt install webp(让php支持webp)
sudo apt-get install libjpeg-dev (让php支持jpeg)
sudo apt-get install libpng-dev (让php支持png)
sudo apt-get install libmcrypt-dev (让php支持mcrypt)
sudo apt-get install libreadline6 libreadline6-dev
解释下Linux命令:
./configure #脚本配置工具
./configure --help #查看脚本配置工具configure的命令行选项
/home/php/bin/phpize #phpize命令用于在编译好的PHP中扩展模块
配置安装如下:
1)简单安装
./configure --prefix=http://www.likecs.com/home/php --enable-fpm --with-fpm-user=daokr --with-fpm-group=daokr --with-config-file-path=http://www.likecs.com/home/php/etc --with-config-file-scan-dir=http://www.likecs.com/home/php/etc/scan --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-mbstring --with-openssl --with-curl