PHP的安装与配置
PHP的安装与配置
1.安装epel源(安装过可跳过)
yum install -y epel-release
2.安装remi源(安装过可跳过)
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
3.安装yum源管理工具(安装过可跳过)
yum install -y 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.重启一下计算机
reboot
6.设置php的开机启动、运行服务
systemctl start php73-php-fpm
systemctl enable php73-php-fpm
7.查看一下安装的相应php源
rpm -qa | grep php
8.查看php安装位置
rpm -ql php73-php-fpm-7.3.6-1.el7.remi.x86_64
9. 查找php.ini位置
find /etc/opt/remi/php73 -name php.ini
10.重启php
systemctl restart php73-php-fpm
11.查看PHP版本
php73 -v
12.查看php运行状态
systemctl status php73-php-fpm
感谢大家,点赞,收藏,关注,评论!