Install PHP7.4 to build CentOS7 Laravel environment

Aug 25, 2020 PHP CentOS Laravel centos7 PHP7


Implementation environment

Item Information
OS CentOS 7 (7.8.2003)
Hardware Dell Studio 1537
Processor Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz
Memory 4 GB DDR3
Graphics Unknown


#Prerequisite information

After reading


  1. Add and install repository
  2. Confirm


  1. Add and install repository
    1. Execute the following command to add a repository.

      $ sudo yum install
    2. Execute the following command to install the necessary items.

      $ 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
  2. Confirm
    1. Execute the following command to display the installed package named php.

      $ yum list installed | grep php
    2. Below is information about the installed package named php in my environment.

      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
    3. If the same package as above is installed, the work of this article is completed.