Home  >  Article  >  Operation and Maintenance  >  centos php5.6 installation tutorial

centos php5.6 installation tutorial

藏色散人
藏色散人Original
2020-08-26 09:13:184932browse

Centos php5.6 installation method: first delete the old php; then add the third-party yum source and install the required php version; finally restart the apache service through the command "service httpd restart".

centos php5.6 installation tutorial

# Recommended: "

centos tutorial

CentOS 6.5 Install php 5.6 method

Delete the old php

The default in yum is 5.3. Version 3 is a bit low

yum list installed | grep php #可以查看所有已安装的php软件yum remove php* #删除所有php软件


Add third-party yum source
yum list php*  #查看是否有你需要的php版本,没有的话就需要下面的添加yum 源

Add as needed

#CentOs 5.x rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm 
#CentOs 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

Then install the required php version: such as

php56w

yum install php56w #安装php5.6
php -v #安装完成后查看当前版本#会显示下面的内容PHP 5.6.26 (cli) (built: Sep 17 2016 13:45:08) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies#安装成功


Restart apache service
service httpd restart  #如果不重启,在页面中运行phpinfo()你会发现还是原来的版本

             

The above is the detailed content of centos php5.6 installation tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn