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.
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
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
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!