PHP安装编译配置参考

时间:2023-03-08 15:56:22
PHP安装编译配置参考

编辑安装php的参考配置:

./configure --prefix=/usr/local/php-5.6.8 --with-config-file-path=/usr/local/php-5.6.8/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local/freetype-2.4.0 --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local/libxml2 --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir=lib64

--prefix=/usr/local/php-5.6.8   // 安装路径,自行修改

安装前安装依赖包:

yum install gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y