1.先检查之前版本:
rpm -qa | grep php
2.如果有,则删除全部版本
yum remove php*
3. 配置yum源(提前确认源是否有效)
yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
4.确认安装PHP版本
yum list --enablerepo=remi --enablerepo=remi-php73 | grep php
5.安装php7.3
yum install --enablerepo=remi --enablerepo=remi-php73 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common
6.安装成功后 查看一下PHP 版本
php -v