Heim  >  Artikel  >  Backend-Entwicklung  >  So installieren Sie PHP7.3 mit yum unter CentOS7

So installieren Sie PHP7.3 mit yum unter CentOS7

醉折花枝作酒筹
醉折花枝作酒筹nach vorne
2021-05-20 18:00:043139Durchsuche

In diesem Artikel erfahren Sie, wie Sie PHP7.3 mit yum auf CentOS7 installieren. Es hat einen gewissen Referenzwert. Freunde in Not können sich darauf beziehen. Ich hoffe, es wird für alle hilfreich sein.

CentOS 7 yum Installation PHP7.3 Tutorial

1. Installieren Sie zuerst die EPEL-Quelle:

yum install epel-release

2. Installieren Sie das Yum-Quellenverwaltungstool:

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

3. Installieren Sie PHP7.3:

yum install yum-utils

Nachdem die Installation abgeschlossen ist, ist es am besten, den Computer neu zu starten, sonst können Sie PHP möglicherweise nicht starten.

Starten und Ausführen von Diensten einrichten:

yum install -y php73-php-fpm php73-php-cli php73-php-bcmath php73-php-gd php73-php-json php73-php-mbstring php73-php-mcrypt php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-pecl-crypto php73-php-pecl-mcrypt php73-php-pecl-geoip php73-php-recode php73-php-snmp php73-php-soap php73-php-xmll

PHP einrichten

Gefunden: php73-php-fpm-7.3 .6-1.el7.remi.x86_64 Installationsort

systemctl enable php73-php-fpm
systemctl start php73-php-fpm

Finden Sie den php.ini-Speicherort:

[root@xxx etc]# rpm -qa | grep 'php'php73-php-cli-7.3.6-1.el7.remi.x86_64
php73-php-mbstring-7.3.6-1.el7.remi.x86_64
php73-php-pecl-mcrypt-1.0.2-1.el7.remi.x86_64
php73-runtime-2.0-1.el7.remi.x86_64
php73-php-pdo-7.3.6-1.el7.remi.x86_64
php73-php-bcmath-7.3.6-1.el7.remi.x86_64
php73-php-fpm-7.3.6-1.el7.remi.x86_64
php73-php-mysqlnd-7.3.6-1.el7.remi.x86_64
php73-php-snmp-7.3.6-1.el7.remi.x86_64
php73-php-gd-7.3.6-1.el7.remi.x86_64
php73-php-json-7.3.6-1.el7.remi.x86_64
php73-php-soap-7.3.6-1.el7.remi.x86_64
php73-php-recode-7.3.6-1.el7.remi.x86_64
php73-php-pecl-crypto-0.3.1-5.el7.remi.x86_64
php73-php-common-7.3.6-1.el7.remi.x86_64
php73-php-opcache-7.3.6-1.el7.remi.x86_64
php73-php-pecl-geoip-1.1.1-6.el7.remi.x86_64

Bearbeiten Sie /etc/opt/remi/php73/php.ini und ersetzen Sie ;cgi.fix_pathinfo=1 bis cgi.fix_pathinfo= 0 Schnellbefehl:

[root@xxx etc]# rpm -ql php73-php-fpm-7.3.6-1.el7.remi.x86_64
/etc/logrotate.d/php73-php-fpm
/etc/opt/remi/php73/php-fpm.conf
/etc/opt/remi/php73/php-fpm.d
/etc/opt/remi/php73/php-fpm.d/www.conf
/etc/opt/remi/php73/sysconfig/php-fpm
/etc/systemd/system/php73-php-fpm.service.d
/opt/remi/php73/root/usr/sbin/php-fpm
/opt/remi/php73/root/usr/share/doc/php73-php-fpm-7.3.6
/opt/remi/php73/root/usr/share/doc/php73-php-fpm-7.3.6/php-fpm.conf.default
/opt/remi/php73/root/usr/share/doc/php73-php-fpm-7.3.6/www.conf.default
/opt/remi/php73/root/usr/share/fpm
/opt/remi/php73/root/usr/share/fpm/status.html
/opt/remi/php73/root/usr/share/licenses/php73-php-fpm-7.3.6
/opt/remi/php73/root/usr/share/licenses/php73-php-fpm-7.3.6/fpm_LICENSE
/opt/remi/php73/root/usr/share/man/man8/php-fpm.8.gz
/usr/lib/systemd/system/php73-php-fpm.service
/var/opt/remi/php73/lib/php/opcache
/var/opt/remi/php73/lib/php/session
/var/opt/remi/php73/lib/php/wsdlcache
/var/opt/remi/php73/log/php-fpm
/var/opt/remi/php73/run/php-fpm

php73-php-fpm neu starten

[root@xxx etc]# find /etc/opt/remi/php73 -name php.ini/etc/opt/remi/php73/php.ini
Weitere Vorgänge:

sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/opt/remi/php73/php.ini

PHP prüfen

Überprüfen Sie, ob die Installation erfolgreich war:

systemctl restart php73-php-fpm

PHP aktualisieren

Führen Sie das folgende Befehlssystem aus und alle können aktualisiert werden. Die aktualisierte Software enthält PHP

systemctl restart php73-php-fpm #重启
systemctl start php73-php-fpm #启动
systemctl stop php73-php-fpm #关闭
systemctl status php73-php-fpm #检查状态
Installieren Sie weitere Komponenten

Der obige Befehl installiert PHP. Es werden nur einige PHP-Erweiterungen installiert PHP-Video-Tutorial

Das obige ist der detaillierte Inhalt vonSo installieren Sie PHP7.3 mit yum unter CentOS7. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Dieser Artikel ist reproduziert unter:csdn.net. Bei Verstößen wenden Sie sich bitte an admin@php.cn löschen