1、下载
wget
2、配置
创建目录
mkdir /usr/local/php7.3
解压
tar php-7.3.0.tar.gz
进入目录
cd php-7.3.0
配置
./configure --enable-fpm --prefix=/usr/local/php7.3 --with-config-file-path=/usr/local/php7.3/etc --with-apxs2=/usr/local/apache/bin/apxs --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-openssl --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip
编译
make && make install
其他配置处理
ln -s /usr/local/php7.3/bin/php /usr/local/bin/php
cp /usr/local/php7.3/etc/php-fpm.conf.default /usr/local/php7.3/etc/php-fpm.conf
cp /usr/local/php7.3/etc/php-fpm.d/www.conf.default /usr/local/php7.3/etc/php-fpm.d/www.conf
vim /usr/local/php7.3/etc/php-fpm.d/www.conf 将user和group设置成apache
cp php.ini-development /usr/local/php7.3/etc/php.ini