Centos8 编译安装 PHP 8.1.0

PHP教程 Linux文章/教程评论909阅读模式

安装工具包

yum -y install libtool automake libzip-devel epel-release libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel uuid libuuid-devel gcc bzip2 bzip2-devel gmp-devel  readline-devel libxslt-devel autoconf bison gcc gcc-c++ sqlite-devel cmake

下载安装 oniguruma

wget -c https://github.com/kkos/oniguruma/archive/refs/tags/v6.9.7.1.tar.gz
tar -zxvf v6.9.7.1.tar.gz
cd oniguruma-6.9.7.1
./autogen.sh && ./configure --prefix=/usr
make && make install

下载安装 php 8.1.0

wget -c  https://www.php.net/distributions/php-8.1.0.tar.gz
tar -zxvf php-8.1.0.tar.gz
cd php-8.1.0

./configure \
--prefix=/opt/php/8.1.0 \
--with-config-file-path=/opt/php/8.1.0/etc \
--with-config-file-scan-dir=/opt/php/8.1.0/etc/conf.d \
--enable-fpm \
--enable-soap \
--with-openssl \
--with-openssl-dir \
--with-zlib \
--with-iconv \
--with-bz2 \
--enable-gd \
--with-jpeg \
--with-freetype \
--with-curl \
--enable-dom \
--with-xml \
--with-zip \
--enable-mbstring \
--enable-pdo \
--with-pdo-mysql \
--with-zlib-dir \
--enable-session \
--enable-shmop \
--enable-simplexml \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-xsl \
--enable-mysqlnd \
--with-mysqli \
--without-pear \
--disable-short-tags 

make && make install

Installing shared extensions:     /opt/php/8.1.0/lib/php/extensions/no-debug-non-zts-20210902/
Installing PHP CLI binary:        /opt/php/8.1.0/bin/
Installing PHP CLI man page:      /opt/php/8.1.0/php/man/man1/
Installing PHP FPM binary:        /opt/php/8.1.0/sbin/
Installing PHP FPM defconfig:     /opt/php/8.1.0/etc/
Installing PHP FPM man page:      /opt/php/8.1.0/php/man/man8/
Installing PHP FPM status page:   /opt/php/8.1.0/php/php/fpm/
Installing phpdbg binary:         /opt/php/8.1.0/bin/
Installing phpdbg man page:       /opt/php/8.1.0/php/man/man1/
Installing PHP CGI binary:        /opt/php/8.1.0/bin/
Installing PHP CGI man page:      /opt/php/8.1.0/php/man/man1/
Installing build environment:     /opt/php/8.1.0/lib/php/build/
Installing header files:          /opt/php/8.1.0/include/php/
Installing helper programs:       /opt/php/8.1.0/bin/
  program: phpize
  program: php-config
Installing man pages:             /opt/php/8.1.0/php/man/man1/
  page: phpize.1
  page: php-config.1
/home/centos/php-8.1.0/build/shtool install -c ext/phar/phar.phar /opt/php/8.1.0/bin/phar.phar
ln -s -f phar.phar /opt/php/8.1.0/bin/phar
Installing PDO headers:           /opt/php/8.1.0/include/php/ext/pdo/
文章源自爱尚资源教程网-https://www.23jcw.net/1537.html
相关文章
版权声明:文章图片资源来源于网络,如有侵权,请留言删除!!!
  • 温馨提示:如遇到资源下载不了,或者文章没有解决你的问题的,可以联系我们帮你处理!!!
  • 转载请务必保留本文链接:https://www.23jcw.net/1537.html

发表评论