CentOS(Liunx)REMI方式安装PHP7.4和PHP8.2双版本版本共存

以CentOS7为例:

1、安装源

yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

2、先安装PHP7.4及插件库

yum --enablerepo=remi install php74-php php74-php-gd php74-php-xml php74-php-sockets php74-php-session php74-php-snmp php74-php-mysql

3、安装完成后的处理

#运行并查看版本
php74 -v
#重启命令php-fpm
systemctl restart php74-php-fpm
#添加自动启动
systemctl enable php74-php-fpm

4、修改php74-fpm配置文件

进入 cd /etc/opt/remi/php74/php-fpm.d
#编辑下 
www.conf

#注意,我nginx服务用的是nginx用户
user = nginx
group = nginx
#9000用于php74
listen = 127.0.0.1:9000 

5、同理安装”php82″

yum --enablerepo=remi install php82-php php82-php-gd php82-php-xml php82-php-sockets php82-php-session php82-php-snmp php82-php-mysql

6、同理,安装完成后,修改php82-fpm相应的“www.conf”

#我用10000端口作用于php82

listen = 127.0.0.1:10000

7、根据需要去选择php版本;

8、有问题的在博客回复留言,我看到第一时间会回复。

Related Posts

Linux 下 发生 e:无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系 的处理

完美解决 debian ubuntu deepin e:无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系 的处理

强力推荐一个国产AI编程辅助工具,用起来丝滑水润

代号:Fitten Code 你的专业 AI 代码助手

Python 打包 exe, 除了pyInstaller还有Nuitka的新选择

简介 Nuitka是一个用Python写的Python…

Linux Ubuntu/Deepin 等基于debian的os,解决sign_and_send_pubkey: signing failed: agent refused operation问题

sign_and_send_pubkey: signing failed: agent refused operation

MySQL下,实现每个id或字段,查询限定其记录行数

[亲测]github国内无法访问的解决办法

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注