Centos如何通过yum安装php7
Centos如何通过yum安装php7
1. 执行如下命令安装epel
yum -y install epel-release
2. Centos 5.X:
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpmCentOs 6.x:
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
CentOs 7.X:
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
3. 删除之前的php版本
yum remove php * php-common
4. 安装php7yum install php70w
5. 安装完成的查看php的版本,如下图所示:
php -v
6. 重启apache服务,重新加载php7
service httpd restart
7. 最后,写一个php探针看一下php相关信息如下图所示,代码如下
<?php phpinfo();?>
相关推荐
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
Noneyes 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23