Heim  >  Artikel  >  Backend-Entwicklung  >  So installieren Sie PHP5.6 aus dem Centos7-Quellcode

So installieren Sie PHP5.6 aus dem Centos7-Quellcode

藏色散人
藏色散人Original
2022-10-25 11:22:081274Durchsuche

So installieren Sie PHP5.6 aus dem Centos7-Quellcode: 1. Führen Sie den Befehl „rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm“ aus. 2. Entfernen Sie den Befehl „php“. das kommt mit dem System -common“; 3. Installieren Sie php5.6 über den Befehl „yum install -y php56w“; 4. Führen Sie den Befehl „yum install httpd“ aus, um Apache zu installieren.

So installieren Sie PHP5.6 aus dem Centos7-Quellcode

Die Betriebsumgebung dieses Tutorials: Centos7-System, PHP5.6-Version, Dell G3-Computer.

Wie installiere ich PHP5.6 aus dem Centos7-Quellcode?

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

Apache installieren

Geben Sie den folgenden Befehl auf der Konsole ein, um Apache zu installieren, öffnen Sie dann den Dienst und schalten Sie die Firewall aus.

yum install httpd
systemctl start httpd 

systemctl enable httpd 

systemctl stop firewalld 

systemctl disable firewalld

Empfohlenes Lernen: „PHP-Video-Tutorial

Das obige ist der detaillierte Inhalt vonSo installieren Sie PHP5.6 aus dem Centos7-Quellcode. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn