Home > Backend Development > PHP Problem > How to install php5.6 from centos7 source code

How to install php5.6 from centos7 source code

藏色散人
Release: 2023-03-17 09:18:02
Original
1355 people have browsed it

How to install php5.6 from centos7 source code: 1. Execute the "rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm" command; 2. Remove the system automatic Bring "php-common"; 3. Install php5.6 through the "yum install -y php56w" command; 4. Execute the "yum install httpd" command to install Apache.

How to install php5.6 from centos7 source code

The operating environment of this tutorial: centos7 system, php5.6 version, Dell G3 computer.

How to install php5.6 from centos7 source code?

centos7 install php5.6

yum provides php #自带的只有5.4版本
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm #更新源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum remove php-common -y #移除系统自带的php-common
yum install -y php56w php56w-opcache php56w-xml php56w-mcrypt php56w-gd php56w-devel php56w-mysql php56w-intl php56w-mbstring #安装依赖包
php -v #版本变为5.6
yum provides php-fpm #因为我是准备搭建lnmp,所以安装php-fpm,这里会提示多个安装源,选择5.6版本的安装就可以了
yum install php56w-fpm-5.6.31-1.w7.x86_64 -y

cd /var/www/html
Copy after login

Apache / MaruaDB / PHP installation

Install Apache

Enter the following command on the console to install Apache , then turn on the service and turn off the firewall.

yum install httpd
systemctl start httpd 

systemctl enable httpd 

systemctl stop firewalld 

systemctl disable firewalld
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to install php5.6 from centos7 source code. 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