LDFLAGS='-lfreetype' CFLAGS="-O3 -I/usr/include/freetype2" CXXFLAGS="-O3 -I/usr/include/freetype2" ./configure \ --with-apxs2=/usr/local/httpd24/bin/apxs --prefix=/usr/local/php --with-zlib --with-gd \ --enable-mbstring --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config\ --with-pdo-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php --with-iconv --with-libxml-dir --with-png-dir \ --with-freetype-dir --with-openssl --with-curl
依赖项:
可用yum安装以下包
curl.x86_64 7.29.0-54.el7_7.2 @updates
freetype.i686 2.8-14.el7 @os
freetype.x86_64 2.8-14.el7 @os
freetype-devel.i686 2.8-14.el7 @os
freetype-devel.x86_64
libcurl.x86_64 7.29.0-54.el7_7.2 @updates
libcurl-devel.x86_64 7.29.0-54.el7_7.2 @updates
libxml2.x86_64 2.9.1-6.el7_2.3 @anaconda
libxml2-devel.x86_64 2.9.1-6.el7_2.3 @os
libxml2-python.x86_64 2.9.1-6.el7_2.3 @anaconda
openssl.x86_64 1:1.0.2k-12.el7 @anaconda
openssl-libs.x86_64 1:1.0.2k-12.el7 @anaconda
openssl-devel
zlib.i686 1.2.7-18.el7 @os
zlib.x86_64 1.2.7-18.el7 @os
zlib-devel.x86_64 1.2.7-18.el7 @os
mysql/apache可以自行编译
btw: php 5.6 不支持openssl 1.1