当前位置:网站首页>centos 安装多个版本的php并切换
centos 安装多个版本的php并切换
2022-07-01 02:07:00 【A黄俊辉A】
同一个linux系统中是可以安装多个 php版本的, 安装时就是通常的安装
在安装完成以后, 我们可以到php 的安装目录下
我分别 安装了, 7.4 版本的, 和 8版本的
php 默认监听的端口是9000 , 如果两个版本都开启的话, 那么肯定会冲突, 所以, 我让8版本的监听9001 端口
在 这个目录下有一个 www.conf
这样就修改了 php8 的监听端口为 9001
完成之后, 我们要把 php 8 的bin目录放置在环境变量中

在 文件的末尾 末尾 末尾加上 上面的两段
之后运行 source /etc/profile 来使文件生效
我在运行完了之后, 还是出问题了, 当我使用 php -v 的时候, 它还是给我的 php 7.4.28的结果, 问题找了半天, 才发现我的 /usr/bin/ 目录下有一个 php 的命令, 它是以前 php7.4.28的, 每次找的时候它找到的是 /usr/bin/php 的命令, 所以, 我把 /usr/bin/php 文件组删除掉了, 再次运行 srouce /etc/profile 完成
之后, 再使用 php -v 就得到了 想要的结果
边栏推荐
- SWT / anr problem - anr/je causes SWT
- (翻译)使用眉状文本提高标题点击率
- 删除重复的电子邮箱
- [proteus simulation] Arduino UNO +74c922 keyboard decoding drive 4x4 matrix keyboard
- For the sustainable development of software testing, we must learn to knock code?
- When facing the industrial Internet, they even use the ways and methods of consuming the Internet to land and practice the industrial Internet
- Pytoch -- foundation refers to the north_ II. What high school students can understand [back propagation and gradient descent]
- Log4j2 ThreadContext日志链路追踪
- (总结一)Halcon基础之寻找目标特征+转正
- Sitge joined the opengauss open source community to jointly promote the ecological development of the database industry
猜你喜欢

修复表中的名字(首字符大写,其他小写)

(summary I) Halcon Foundation's target finding features + becoming a regular

@The difference between configurationproperties and @value

机器学习9-通用逼近器径向基函数神经网络,在新观点下审视PDA和SVM

halcon变量窗口的图像变量不显示,重启软件和电脑都没用

Batch import of Excel data in applet
2022年最新csdn涨薪技术栈-app自动化测试概述

删除重复的电子邮箱

7-2 punch in reward DP for puzzle a

In the fourth week of June, the list - flying melon data up main growth ranking list (BiliBili platform) was released!
随机推荐
For the sustainable development of software testing, we must learn to knock code?
Alphabet rearrange inator 3000 (dictionary tree custom sorting)
CorelDRAW 2022 Chinese Simplified 64 bit direct download
(translation) use eyebrow shaped text to improve Title click through rate
FL Studio20.9水果软件高级中文版电音编曲
Laravel+redis generates an order number - automatically increase from 1 on the same day
Video tutorial | Chang'an chain launched a series of video tutorial collections (Introduction)
A preliminary understanding of operator overloading
Leetcode (524) -- match the longest word in the dictionary by deleting letters
数学知识:满足条件的01序列—求组合数
软件开发中的上游和下游
运算符重载的初识
int和位数组互转
Use of laravel carbon time processing class
Do you write API documents or code first?
工厂+策略模式
如何选择券商?另外,手机开户安全么?
【Content-Type请求头的内容】
Some uses of Halcon array
Ernie gram, an explicit and complete n-gram mask language model, implements explicit n-gram semantic unit knowledge modeling.