- 安装remi扩展源
yum install epel-release yum install https://baitexiaoyuan.oss-cn-zhangjiakou.aliyuncs.com/updatecrm/php/20230901/remi-release-7.rpm
- 安装yum管理工具
yum install yum-utils
- 查找是否有php74
yum search php74
- 安装php
yum install php74-php-cli php74-php-common php74-php-devel php74-php-embedded php74-php-fpm php74-php-gd php74-php-mbstring php74-php-mysqlnd php74-php-pdo php74-php-opcache php74-php-xml php74-php-soap
- 确认安装结果
yum list installed | grep php
- 建立软连接
通过remi安装的php的指令是php74,这里建立一下软链接ln -s /opt/remi/php74/root/usr/bin/php /usr/local/bin/php
- 查看php版本
php -v
- 启动fpm
service php74-php-fpm startsystemctl start php74-php-fpm
- 设置开机启动
systemctl enable php74-php-fpm
发表评论 取消回复