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

centos php5.6 installation tutorial

藏色散人
Release: 2020-08-26 09:13:18
Original
4991 people have browsed it

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软件
Copy after login


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

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
Copy after login

Then install the required php version: such as

php56w

yum install php56w #安装php5.6
Copy after login
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#安装成功
Copy after login


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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template