目录
[1 安装epel源](#1 安装epel源)
[2 安装REMI源](#2 安装REMI源)
[3 安装yum源管理工具](#3 安装yum源管理工具)
[4 安装PHP7.3](#4 安装PHP7.3)
[5 启动php服务](#5 启动php服务)
[6 设置PHP](#6 设置PHP)
[6.1 查找安装包](#6.1 查找安装包)
[6.2 查找PHP安装位置](#6.2 查找PHP安装位置)
[6.3 查找php配置文件位置](#6.3 查找php配置文件位置)
[6.4 配置PHP](#6.4 配置PHP)
[6.5 设置快捷命令](#6.5 设置快捷命令)
[6.6 查看php版本](#6.6 查看php版本)
[6.7 更新php](#6.7 更新php)
1 安装epel源
yum -y install epel-release

2 安装REMI源
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

3 安装yum源管理工具
yum -y install yum-utils

4 安装PHP7.3
yum install -y php73-php-fpm php73-php-cli php73-php-bcmath php73-php-gd php73-php-json php73-php-mbstring php73-php-mcrypt php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-pecl-crypto php73-php-pecl-mcrypt php73-php-pecl-geoip php73-php-recode php73-php-snmp php73-php-soap php73-php-xmll

5 启动php服务
systemctl start php73-php-fpm
设置开机自启
systemctl enable php73-php-fpm

6 设置PHP
6.1 查找安装包
rpm -qa | grep php

6.2 查找PHP安装位置
rpm -ql php73-php-fpm-7.3.33-11.el7.remi.x86_64

6.3 查找php配置文件位置
find /etc/opt/remi/php73 -name php.ini

6.4 配置PHP
vi /etc/opt/remi/php73/php.ini
可以更改以下设置:
memory_limit = 128M
upload_max_filesize = 50M
post_max_size = 50M
max_execution_time = 600
6.5 设置快捷命令
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/opt/remi/php73/php.ini
重启php
systemctl restart php73-php-fpm
6.6 查看php版本
php73 -v

6.7 更新php
yum -y update