Install PHP7.4 to build CentOS7 Laravel environment
Purpose
–Summary of how to install PHP on CentOS 7 machine
Implementation environment
–Hardware environment
item | information | |
---|---|---|
OS | CentOS 7 (7.8.2003) | a |
hardware | Dell Studio 1537 | |
Processor | Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz | |
memory | 4 GB DDR3 | |
Graphics | unknown |
Prerequisites
–The CentOS 7 machine must be built using the method below or the method described below.
-Install Cent0S7 on your PC
Prerequisite information
–The command introduced in the explanation is executed by connecting from the client PC (Mac) using SSH.
Feeling after reading
–You can install PHP on a CentOS 7 PC, which is premised on building a Laravel environment.
Overview
- Add and install repositories
- Confirmation
Details
- Add and install repositories
-
Execute the following command to add the repository.
```terminal $ sudo yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm ```
-
Execute the following command to install the necessary items.
```terminal $ sudo yum install --enablerepo=remi-php74 php74 php $ sudo yum install --enablerepo=remi-php74 php-fpm $ sudo yum install --enablerepo=remi-php74 php-mbstring $ sudo yum install --enablerepo=remi-php74 php-mysqlnd $ sudo yum install --enablerepo=remi-php74 php-pecl-zip $ sudo yum install --enablerepo=remi-php74 php-xml ```
- Confirmation
-
Execute the following command to display the installed package named php.
```terminal $ yum list installed | grep php ```
-
Below is the information of the installed package named php in my environment.
```terminal oniguruma5php.x86_64 6.9.5+rev1-2.el7.remi @remi-safe php.x86_64 7.4.8-2.el7.remi @remi-php74 php-cli.x86_64 7.4.8-2.el7.remi @remi-php74 php-common.x86_64 7.4.8-2.el7.remi @remi-php74 php-fpm.x86_64 7.4.8-2.el7.remi @remi-php74 php-json.x86_64 7.4.8-2.el7.remi @remi-php74 php-mbstring.x86_64 7.4.8-2.el7.remi @remi-php74 php-mysqlnd.x86_64 7.4.8-2.el7.remi @remi-php74 php-pdo.x86_64 7.4.8-2.el7.remi @remi-php74 php-pecl-zip.x86_64 1.19.0-1.el7.remi.7.4 @remi-php74 php-sodium.x86_64 7.4.8-2.el7.remi @remi-php74 php-xml.x86_64 7.4.8-2.el7.remi @remi-php74 php74.x86_64 1.0-3.el7.remi @remi-safe php74-php-cli.x86_64 7.4.8-2.el7.remi @remi-safe php74-php-common.x86_64 7.4.8-2.el7.remi @remi-safe php74-php-json.x86_64 7.4.8-2.el7.remi @remi-safe php74-runtime.x86_64 1.0-3.el7.remi @remi-safe ```
- If the same package as above is installed, the work of this article is completed.