创建文件目录:
mkdir /usr/local/php74
cd /usr/local/php74
下载--解压:
下载PHP安装包
wget https://www.php.net//distributions/php-7.4.3.tar.gz
解压安装包
tar -zxvf php-7.4.3.tar.gz
进入解压目录
cd php-7.4.3
./configure --prefix=/usr/local/php74 --with-config-file-path=/usr/local/php74/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mbstring --enable-mysqlnd
编译错误: 版本编译时与系统的兼容处理,以下是亲测中出现的问题
报错1:configure: error:Package requirements (openssl >= 1.0.1) were not met
yum install openssl-devel
报错2
configure: error: in `/usr/local/php74/php-7.4.3':
configure: error: no acceptable C compiler found in $PATH