1、首先安装 EPEL 源:
yum install -y epel-release
安装 REMI 源:
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
2.安装 Yum 源管理工具:
yum install -y yum-utils
3.安装 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
设置开机启动、运行服务
systemctl enable php73-php-fpm
systemctl start php73-php-fpm
常用命令
systemctl restart php73-php-fpm #重启
systemctl start php73-php-fpm #启动
systemctl stop php73-php-fpm #关闭
systemctl status php73-php-fpm #检查状态
php73 -v #查看 PHP
rpm -qa | grep ‘php’ # 查找安装包:
rpm -ql php73-php-fpm-7.3.6-1.el7.remi.x86_64 #找到:php73-php-fpm-7.3.6-1.el7.remi.x86_64安装位置:
find /etc/opt/remi/php73 -name php.ini /etc/opt/remi/php73/php.ini #查找php.ini位置
上次更新时间 13 3 月, 2023 at 09:59 上午