php7.4.32编译

 ./configure --prefix=/www/server/php/74 --with-config-file-path=/www/server/php/74/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype --with-jpeg --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-intl --enable-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --disable-fileinfo --enable-opcache --with-sodium=/usr/local/libsodium --with-webp --disable-rpath --with-gettext

 

上述编译参数是aaPanel在debian11上编译的参数。

 

 

以下编译为网上参考https://commandnotfound.cn/php/2/17/PHP-7.4.7-Linux-%E4%B8%8B%E7%9A%84%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85且将部分参数改为塔参数:

centos示例:


yum install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel \
libcurl libcurl-devel libjpeg libjpeg-devel libpng \
libpng-devel freetype freetype-devel gmp gmp-devel \
libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel

#PHP 7.4 新的改动:
yum install libsqlite3x-devel -y
yum install oniguruma-devel -y


# PCRE 高版本依赖(如果需要安装扩展 --with-external-pcre),官网新的 PCRE2 改为在 Github 中:
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.40/pcre2-10.40.tar.gz
tar xvf pcre2-10.40.tar.gz
cd pcre2-10.40
./configure --prefix=/usr/local/pcre2 --enable-pcre2-16 --enable-pcre2-32 --enable-jit --enable-jit-sealloc
make && make install
export PKG_CONFIG_PATH=/usr/local/pcre2/lib/pkgconfig/


wget https://www.php.net/distributions/php-7.4.32.tar.gz
tar -xzf php-7.4.32.tar.gz
cd php-7.4.32

./configure --prefix=/www/server/php/74 --with-config-file-path=/www/server/php/74/etc --enable-fpm --enable-gd --with-fpm-user=www --with-fpm-group=www --enable-inline-optimization --disable-rpath --enable-soap --enable-xml --with-xmlrpc --with-openssl --with-external-pcre --with-zlib --enable-bcmath --with-iconv --with-curl --disable-fileinfo --with-jpeg --with-freetype --with-gettext --with-mhash --enable-mbstring --enable-mbregex --enable-pdo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pdo-sqlite --enable-shmop --enable-sockets --enable-sysvsem --enable-sysvshm --enable-mysqlnd-compression-support --enable-opcache

make && make install

 

 

 

 

 

 

成功编译安装完成后,再安装pear
wget http://pear.php.net/go-pear.phar
/usr/local/bin/php go-pear.phar

300*300
  • 没有相关文章
  • 没有评论
 文章首页关于迷茫时代关于我写意人生
版权所有:迷茫时代 All rights reserved   
执行时间:0.00561 秒