CentOS8 编译安装 php7.2.11

1.安装必要的运行环境

yum -y install autoconf freetype gd libpng libpng-devel libjpeg libxml2 libxml2-devel zlib curl curl-devel net-snmp-devel libjpeg-devel php-ldap openldap-devel openldap-clients freetype-devel gmp-devel libzip libzip-devel

下载php-7.2.11.tar.gz

cd /home/sunyang
tar -zxvf php-7.2.11.tar.gz
cd php-7.2.11.tar.gz
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-curl --with-gd --with-gmp --with-zlib --with-xmlrpc --with-openssl --without-pear --with-snmp --with-gettext --with-mhash --with-libxml-dir=/usr --with-fpm-user=nginx --with-fpm-group=nginx --enable-xml --enable-fpm  --enable-ftp --enable-bcmath --enable-soap --enable-shmop --enable-sysvsem --enable-sockets --enable-inline-optimization --enable-maintainer-zts --enable-mbregex --enable-mbstring --enable-pcntl --disable-fileinfo --disable-rpath --enable-libxml --enable-opcache --enable-mysqlnd 

编译安装

make && make install

Leave a comment

您的电子邮箱地址不会被公开。 必填项已用 * 标注