linux 安装php7.3
请先安装依赖包
$ yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
下载php-7.3.0
wget http://cn2.php.net/get/php-7.3.0.tar.gz/from/this/mirror -o php-7.3.0
解压
$ tar -zxvf php-7.3.4.tar.gz $ cd php-7.3.4
配置
./configure --prefix=/app/php7.3.4 --exec-prefix=/app/php7.3.4 --bindir=/app/php7.3.4/bin --sbindir=/app/php7.3.4/sbin --includedir=/app/php7.3.4/include --libdir=/app/php7.3.4/lib/php --mandir=/app/php7.3.4/php/man --with-config-file-path=/app/php7.3.4/etc --with-openssl --enable-mbstring --enable-fpm
编译安装
$ make && make install
配置
cp /app/php7.3.4/etc/php-fpm.d/www.conf.default /app/php7.3.4/etc/php-fpm.d/www.conf
cp /app/lnmp/php-7.3.4/php.ini-production /app/php7.3.4/etc/php.ini
cp /app/php7.3.4/etc/php-fpm.conf.default /app/php7.3.4/etc/php-fpm.conf
原文链接:https://blog.csdn.net/weixin_42579642/article/details/85290670