1 wget https://www.php.net/distributions/php-7.3.8.tar.gz
解压安装
1 tar -xvf php-7.3.8.tar.gz 2 3 ./configure --prefix=/usr/local/php --with-config-file-path=/etc --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-opcache --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gettext --enable-mbstring --with-iconv --with-mcrypt --with-mhash --with-openssl --enable-bcmath --enable-soap --with-libxml-dir --enable-pcntl --enable-shmop --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-sockets --with-curl --with-zlib --enable-zip --with-bz2 --with-readline --without-sqlite3 --without-pdo-sqlite --with-pear
然后可能会出现错误
解决办法:
1 yum install libxml2-devel
查看是否成功
1 find / -name "xml2-config"
1 yum -y install curl-devel
解决办法
yum -y install libzip-devel
(由于1.5以及以上的安装方式和版本下的不同,所以这里还需要安装个东西)
yum -y install cmake
然后切回 local目录(版本可能更新了)
wg