How to use yum to install PHP7.3 on CentOS7
This article will introduce to you how to install PHP7.3 on CentOS7 using yum. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
CentOS 7 yum installation PHP7.3 tutorial
1. First install EPEL source:
yum install epel-release
Install REMI source:
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
2. Install Yum source management tool:
yum install yum-utils
3. Install PHP7.3:
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
After the installation is completed, it is best to restart the computer, otherwise you may not be able to start php
Set up startup and run services:
systemctl enable php73-php-fpm systemctl start php73-php-fpm
Set up PHP
Find the installation package:
[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
Found: php73-php-fpm-7.3.6-1 .el7.remi.x86_64 installation location
[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
Find the location of php.ini:
[root@xxx etc]# find /etc/opt/remi/php73 -name php.ini/etc/opt/remi/php73/php.ini
Edit /etc/opt/remi/php73/php.ini and replace; cgi.fix_pathinfo=1 is cgi.fix_pathinfo=0 Shortcut command:
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/opt/remi/php73/php.ini
Restart php73-php-fpm
systemctl restart php73-php-fpm
More operations:
systemctl restart php73-php-fpm #重启 systemctl start php73-php-fpm #启动 systemctl stop php73-php-fpm #关闭 systemctl status php73-php-fpm #检查状态
Check PHP
Verify whether Successful installation:
root@mf88.biz-service:~# php73 -v PHP 7.3.0-1+(cli) (built: Dec 6 2018 20:24:55) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.0-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
Update PHP
Run the following command system and the system will update all updateable software including PHP
yum update
Install more components
The above command to install PHP only installs some PHP extensions. More software can be seen:
# yum search php73 Updating Subscription Management repositories. Last metadata expiration check: 0:27:54 ago on Wed 15 May 2019 10:39:52 AM EDT. ============================================================================================= Name Exactly Matched: php73 ============================================================================================== php73.x86_64 : Package that installs PHP 7.3 php73.x86_64 : Package that installs PHP 7.3 ============================================================================================ Name & Summary Matched: php73 ============================================================================================= php73-syspaths.x86_64 : System-wide wrappers for the php73 package php73-syspaths.x86_64 : System-wide wrappers for the php73 package php73-scldevel.x86_64 : Package shipping development files for php73 php73-scldevel.x86_64 : Package shipping development files for php73 php73-php-zstd-devel.x86_64 : php73-php-zstd developer files (header) php73-runtime.x86_64 : Package that handles php73 Software Collection. php73-runtime.x86_64 : Package that handles php73 Software Collection. php73-runtime.x86_64 : Package that handles php73 Software Collection. php73-php-pecl-psr-devel.x86_64 : php73-php-pecl-psr developer files (header) php73-php-pecl-psr-devel.x86_64 : php73-php-pecl-psr developer files (header) php73-php-pecl-raphf-devel.x86_64 : php73-php-pecl-raphf developer files (header) php73-php-pecl-raphf-devel.x86_64 : php73-php-pecl-raphf developer files (header) php73-php-pecl-propro-devel.x86_64 : php73-php-pecl-propro developer files (header) php73-php-pecl-yaconf-devel.x86_64 : php73-php-pecl-yaconf developer files (header) php73-php-pecl-propro-devel.x86_64 : php73-php-pecl-propro developer files (header) php73-php-pecl-yaconf-devel.x86_64 : php73-php-pecl-yaconf developer files (header) php73-php-pecl-xmldiff-devel.x86_64 : php73-php-pecl-xmldiff developer files (header) php73-php-pecl-swoole4-devel.x86_64 : php73-php-pecl-swoole4 developer files (header) php73-php-pecl-xmldiff-devel.x86_64 : php73-php-pecl-xmldiff developer files (header) php73-php-zephir-parser-devel.x86_64 : php73-php-zephir-parser developer files (headers) php73-php-zephir-parser-devel.x86_64 : php73-php-zephir-parser developer files (headers) php73-php-pecl-handlebars-devel.x86_64 : php73-php-pecl-handlebars developer files (header) ================================================================================================= Name Matched: php73 ================================================================================================== php73-php.x86_64 : PHP scripting language for creating dynamic web sites php73-php.x86_64 : PHP scripting language for creating dynamic web sites php73-build.x86_64 : Package shipping basic build configuration ……
Recommended learning: php video tutorial
The above is the detailed content of How to use yum to install PHP7.3 on CentOS7. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When loading CentOS-7.0-1406, there are many optional versions. For ordinary users, they don’t know which one to choose. Here is a brief introduction: (1) CentOS-xxxx-LiveCD.ios and CentOS-xxxx- What is the difference between bin-DVD.iso? The former only has 700M, and the latter has 3.8G. The difference is not only in size, but the more essential difference is that CentOS-xxxx-LiveCD.ios can only be loaded into the memory and run, and cannot be installed. Only CentOS-xxx-bin-DVD1.iso can be installed on the hard disk. (2) CentOS-xxx-bin-DVD1.iso, Ce

Because C++11 needs to be used, but the gcc4.4.7 that comes with CentOS does not support it, I decided to upgrade gcc. The operation is as follows: #Backup mv/etc/yum.repos.d/devtools-2.repo/etc/yum.repos.d/devtools-2.repo.bakwgethttp://people.centos.org/tru/devtools-2 /devtools-2.repo-O/etc/yum.repos.d/devtools-2.repoyuminstalldevtoolset-2-gccdevtoolse

Open the centos7 page and appear: welcome to emergency mode! afterloggingin, type "journalctl -xb" to viewsystemlogs, "systemctlreboot" toreboot, "systemctldefault" to tryagaintobootintodefaultmode. giverootpasswordformaintenance(??Control-D???): Solution: execute r

There is a lot of garbage in the tmp directory in the centos7 system. If you want to clear the garbage, how should you do it? Let’s take a look at the detailed tutorial below. To view the list of files in the tmp file directory, execute the command cdtmp/ to switch to the current file directory of tmp, and execute the ll command to view the list of files in the current directory. As shown below. Use the rm command to delete files. It should be noted that the rm command deletes files from the system forever. Therefore, it is recommended that when using the rm command, it is best to give a prompt before deleting the file. Use the command rm-i file name, wait for the user to confirm deletion (y) or skip deletion (n), and the system will perform corresponding operations. As shown below.

1. Download the gitlab installation package. Download the latest Chinese version of the gitlab installation package from [Tsinghua University Open Source Software Mirror Station]. The installation package comes with a simplified Chinese localization package. Download the latest gitlab installation package from [gitlab official website]. 2. Install gitlab, take gitlab-ce-14.9.4-ce.0.el7.x86_64 as an example, upload it to the centos server and use yum to install gitlabyum-yinstallgitlab-ce-14.3.2-ce.0.el7.x86_64. rpm uses yum to install gityum-yinstallgit#Install git and modify the gitlab configuration file vi

Set password rules for security reasons Set the number of days after which passwords expire. User must change password within days. This setting only affects created users, not existing users. If setting to an existing user, run the command "chage -M (days) (user)". PASS_MAX_DAYS60#Password expiration time PASS_MIN_DAYS3#Initial password change time PASS_MIN_LEN8#Minimum password length PASS_WARN_AGE7#Password expiration prompt time Repeat password restriction use [root@linuxprobe~]#vi/etc/pam.d/system-auth#nearline15:

1.UncaughtError:Calltoundefinedfunctionmb_strlen(); When the above error occurs, it means that we have not installed the mbstring extension; 2. Enter the PHP installation directory cd/temp001/php-7.1.0/ext/mbstring 3. Start phpize(/usr/local/bin /phpize or /usr/local/php7-abel001/bin/phpize) command to install php extension 4../configure--with-php-config=/usr/local/php7-abel

Centos7 does not have a mysql database. The default database is mariadb (a branch of mysql). You can install the mysql database manually by following the steps below. 1. Download the rpm installation file wgethttp://repo.mysql.com/mysql-community-release-el7.rpm 2. Execute rpm to install rpm-ivhmysql-community-release-el7.rpm. After the dependency resolution is completed, the following options appear: dependenciesresolved =================================
