1.解压缩php包
2.编译参数
./configure --prefix=/usr/local/lnm--witconfig-file-path=/usr/local/lnmp/php/etc --with-mysql --with-mysqli --with-pdo-mysql --enable-mysqlnd --with-openssl --with-snmp --with-gd --with-zlib --with-curl --with-libxml-dir --with-png-dir --with-jpeg-dir --with-freetype-dir –-without-pear --with-gettext --with-gmp --enable-inline-optimization --enable-soap --enable-ftp --enable-sockets --enable-mbstring --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-mcrypt –-with-mhash
3.出错信息汇总
a.
错误信息的原因是因为写的字母可能有问题,重新输入一下
解决办法:
yum install -y libxml2-devel
b.
yum install -y curl-devel
c.
yum provides */jpeglib.h
yum install -y libjpeg-turbo-devel
d.
yum provides */png.h
yum install -y libpng-devel
e.
yum install -y freetype-devel
f.
yum install -y gmp-devel
g.
可以看到在 yum中找不到这个包,所以只能从外部获得
yum install -y libmcrypt-devel-2.5.8-9.el6.x86_64.rpm
yum install -y libmcrypt-2.5.8-9.el6.x86_64.rpm
h.
yum install -y net-snmp-devel
4.至此,安装完毕
与cmake不同,可以不用清除缓存,直接再重新编译就好。