How to install PHP 7 on CentOS 8


Step 1: Install remi-repo

rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-8.rpm
[root@tutorialspots ~]# rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-8.rpm
Retrieving http://rpms.remirepo.net/enterprise/remi-release-8.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
        package remi-release-8.1-2.el8.remi.noarch is already installed

Step 2:

yum install -y php74
yum install php74-php-devel
yum install php74-php-fpm
systemctl enable php74-php-fpm
systemctl start php74-php-fpm

Result:

...
[root@tutorialspots ~]# yum install php74-php-devel
Last metadata expiration check: 3:30:04 ago on Sat 25 Jul 2020 01:10:51 PM CEST.
Dependencies resolved.
================================================================================
 Package             Arch       Version                     Repository     Size
================================================================================
Installing:
 php74-php-devel     x86_64     7.4.9~RC1-1.el8.remi        remi-test     731 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 731 k
Installed size: 5.2 M
Is this ok [y/N]: y
Downloading Packages:
php74-php-devel-7.4.9~RC1-1.el8.remi.x86_64.rpm 4.5 MB/s | 731 kB     00:00
--------------------------------------------------------------------------------
Total                                           3.5 MB/s | 731 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : php74-php-devel-7.4.9~RC1-1.el8.remi.x86_64            1/1
  Running scriptlet: php74-php-devel-7.4.9~RC1-1.el8.remi.x86_64            1/1
  Verifying        : php74-php-devel-7.4.9~RC1-1.el8.remi.x86_64            1/1

Installed:
  php74-php-devel-7.4.9~RC1-1.el8.remi.x86_64

Complete!
[root@tutorialspots ~]# yum install php74-php-fpm
Last metadata expiration check: 3:30:40 ago on Sat 25 Jul 2020 01:10:51 PM CEST.
Dependencies resolved.
================================================================================
 Package          Arch   Version                                Repo       Size
================================================================================
Installing:
 php74-php-fpm    x86_64 7.4.9~RC1-1.el8.remi                   remi-test 1.6 M
Installing dependencies:
 httpd-filesystem noarch 2.4.37-21.module_el8.2.0+382+15b0afa8  AppStream  36 k
Enabling module streams:
 httpd                   2.4

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 1.6 M
Installed size: 6.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): httpd-filesystem-2.4.37-21.module_el8.2. 1.2 MB/s |  36 kB     00:00
(2/2): php74-php-fpm-7.4.9~RC1-1.el8.remi.x86_6 7.6 MB/s | 1.6 MB     00:00
--------------------------------------------------------------------------------
Total                                           6.1 MB/s | 1.6 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Running scriptlet: httpd-filesystem-2.4.37-21.module_el8.2.0+382+15b0af   1/2
  Installing       : httpd-filesystem-2.4.37-21.module_el8.2.0+382+15b0af   1/2
  Installing       : php74-php-fpm-7.4.9~RC1-1.el8.remi.x86_64              2/2
  Running scriptlet: php74-php-fpm-7.4.9~RC1-1.el8.remi.x86_64              2/2
  Verifying        : httpd-filesystem-2.4.37-21.module_el8.2.0+382+15b0af   1/2
  Verifying        : php74-php-fpm-7.4.9~RC1-1.el8.remi.x86_64              2/2

Installed:
  httpd-filesystem-2.4.37-21.module_el8.2.0+382+15b0afa8.noarch
  php74-php-fpm-7.4.9~RC1-1.el8.remi.x86_64

Complete!
[root@tutorialspots ~]# systemctl enable php74-php-fpm
Created symlink /etc/systemd/system/multi-user.target.wants/php74-php-fpm.service → /usr/lib/systemd/system/php74-php-fpm.service.
...

Done, verify installation success:

[root@tutorialspots ~]# php74 -v
PHP 7.4.9RC1 (cli) (built: Jul 21 2020 08:02:17) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

You can copy php74 to php

cp /usr/bin/php74 /usr/bin/php

Step 3:
You can install mariadb and some php extensions:

yum install -y mariadb-server php74-php-cli php74-php-fpm php74-php-gd php74-php-imap php74-php-intl php74-php-json php74-php-ldap php74-php-mbstring php74-php-mcrypt php74-php-mysqlnd php74-php-pdo php74-php-pear php74-php-pgsql php74-php-process php74-php-pspell php74-php-recode php74-php-soap php74-php-xml php74-php-xmlrpc postfix
yum install -y autoconf automake make openssl-devel unzip zip gcc
systemctl enable mariadb 
service mariadb start

Result:

[root@tutorialspots ~]# yum install -y mariadb-server php74-php-cli php74-php-fpm php74-php-gd php74-php-imap php74-php-intl php74-php-json php74-php-ldap php74-php-mbstring php74-php-mcrypt php74-php-mysqlnd php74-php-pdo php74-php-pear php74-php-pgsql php74-php-process php74-php-pspell php74-php-recode php74-php-soap php74-php-xml php74-php-xmlrpc postfix
Last metadata expiration check: 3:38:24 ago on Sat 25 Jul 2020 01:10:51 PM CEST.
Package php74-php-cli-7.4.9~RC1-1.el8.remi.x86_64 is already installed.
Package php74-php-fpm-7.4.9~RC1-1.el8.remi.x86_64 is already installed.
Package php74-php-json-7.4.9~RC1-1.el8.remi.x86_64 is already installed.
Dependencies resolved.
================================================================================
 Package                 Arch   Version                         Repo       Size
================================================================================
Installing:
 mariadb-server          x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6
                                                                AppStream  16 M
 php74-php-gd            x86_64 7.4.9~RC1-1.el8.remi            remi-test  89 k
 php74-php-imap          x86_64 7.4.9~RC1-1.el8.remi            remi-test  91 k
 php74-php-intl          x86_64 7.4.9~RC1-1.el8.remi            remi-test 197 k
 php74-php-ldap          x86_64 7.4.9~RC1-1.el8.remi            remi-test  90 k
 php74-php-mbstring      x86_64 7.4.9~RC1-1.el8.remi            remi-test 488 k
 php74-php-mysqlnd       x86_64 7.4.9~RC1-1.el8.remi            remi-test 195 k
 php74-php-pdo           x86_64 7.4.9~RC1-1.el8.remi            remi-test 126 k
 php74-php-pear          noarch 1:1.10.12-1.el8.remi            remi-safe 366 k
 php74-php-pecl-mcrypt   x86_64 1.0.3-1.el8.remi                remi-safe  28 k
 php74-php-pecl-recode   x86_64 1.0.0~DEV.20190723-4.el8.remi   remi-safe  15 k
 php74-php-pgsql         x86_64 7.4.9~RC1-1.el8.remi            remi-test 122 k
 php74-php-process       x86_64 7.4.9~RC1-1.el8.remi            remi-test  88 k
 php74-php-pspell        x86_64 7.4.9~RC1-1.el8.remi            remi-test  68 k
 php74-php-soap          x86_64 7.4.9~RC1-1.el8.remi            remi-test 181 k
 php74-php-xml           x86_64 7.4.9~RC1-1.el8.remi            remi-test 176 k
 php74-php-xmlrpc        x86_64 7.4.9~RC1-1.el8.remi            remi-test  94 k
 postfix                 x86_64 2:3.3.1-12.el8                  BaseOS    1.4 M
Installing dependencies:
 aspell                  x86_64 12:0.60.6.1-21.el8              AppStream 675 k
 libc-client             x86_64 2007f-24.el8                    epel      564 k
 libicu65                x86_64 65.1-1.el8.remi                 remi-safe 9.3 M
 libmcrypt               x86_64 2.5.8-26.el8                    epel      109 k
 libpq                   x86_64 12.1-3.el8                      AppStream 195 k
 mariadb                 x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6
                                                                AppStream 6.1 M
 mariadb-common          x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6
                                                                AppStream  62 k
 mariadb-connector-c     x86_64 3.0.7-1.el8                     AppStream 148 k
 mariadb-connector-c-config
                         noarch 3.0.7-1.el8                     AppStream  13 k
 mariadb-errmsg          x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6
                                                                AppStream 232 k
 oniguruma5php           x86_64 6.9.5+rev1-2.el8.remi           remi-safe 206 k
 perl-DBD-MySQL          x86_64 4.046-3.module_el8.1.0+203+e45423dc
                                                                AppStream 156 k
 perl-DBI                x86_64 1.641-3.module_el8.1.0+199+8f0a6bbd
                                                                AppStream 740 k
 psmisc                  x86_64 23.1-4.el8                      BaseOS    150 k
 recode                  x86_64 3.6-47.el8                      AppStream 724 k
Installing weak dependencies:
 mariadb-backup          x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6
                                                                AppStream 6.0 M
 mariadb-gssapi-server   x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6
                                                                AppStream  49 k
 mariadb-server-utils    x86_64 3:10.3.17-1.module_el8.1.0+257+48736ea6
                                                                AppStream 1.6 M
Enabling module streams:
 mariadb                        10.3
 perl                           5.26
 perl-DBD-MySQL                 4.046
 perl-DBI                       1.641

Transaction Summary
================================================================================
Install  36 Packages

Total download size: 47 M
Installed size: 224 M
Downloading Packages:
(1/36): libpq-12.1-3.el8.x86_64.rpm             3.9 MB/s | 195 kB     00:00
(2/36): mariadb-backup-10.3.17-1.module_el8.1.0  49 MB/s | 6.0 MB     00:00
(3/36): mariadb-common-10.3.17-1.module_el8.1.0 5.3 MB/s |  62 kB     00:00
(4/36): aspell-0.60.6.1-21.el8.x86_64.rpm       3.4 MB/s | 675 kB     00:00
(5/36): mariadb-connector-c-3.0.7-1.el8.x86_64.  13 MB/s | 148 kB     00:00
(6/36): mariadb-connector-c-config-3.0.7-1.el8. 1.2 MB/s |  13 kB     00:00
(7/36): mariadb-errmsg-10.3.17-1.module_el8.1.0  19 MB/s | 232 kB     00:00
(8/36): mariadb-gssapi-server-10.3.17-1.module_ 2.3 MB/s |  49 kB     00:00
(9/36): mariadb-10.3.17-1.module_el8.1.0+257+48  14 MB/s | 6.1 MB     00:00
(10/36): perl-DBD-MySQL-4.046-3.module_el8.1.0+ 4.4 MB/s | 156 kB     00:00
(11/36): mariadb-server-10.3.17-1.module_el8.1.  48 MB/s |  16 MB     00:00
(12/36): recode-3.6-47.el8.x86_64.rpm            32 MB/s | 724 kB     00:00
(13/36): perl-DBI-1.641-3.module_el8.1.0+199+8f 6.9 MB/s | 740 kB     00:00
(14/36): psmisc-23.1-4.el8.x86_64.rpm           5.5 MB/s | 150 kB     00:00
(15/36): mariadb-server-utils-10.3.17-1.module_ 4.3 MB/s | 1.6 MB     00:00
(16/36): libmcrypt-2.5.8-26.el8.x86_64.rpm      9.7 MB/s | 109 kB     00:00
(17/36): postfix-3.3.1-12.el8.x86_64.rpm         14 MB/s | 1.4 MB     00:00
(18/36): libc-client-2007f-24.el8.x86_64.rpm    7.0 MB/s | 564 kB     00:00
(19/36): oniguruma5php-6.9.5+rev1-2.el8.remi.x8 1.7 MB/s | 206 kB     00:00
(20/36): php74-php-pear-1.10.12-1.el8.remi.noar 2.6 MB/s | 366 kB     00:00
(21/36): php74-php-pecl-mcrypt-1.0.3-1.el8.remi 492 kB/s |  28 kB     00:00
(22/36): php74-php-pecl-recode-1.0.0~DEV.201907 271 kB/s |  15 kB     00:00
(23/36): php74-php-gd-7.4.9~RC1-1.el8.remi.x86_ 1.0 MB/s |  89 kB     00:00
(24/36): php74-php-imap-7.4.9~RC1-1.el8.remi.x8 1.2 MB/s |  91 kB     00:00
(25/36): php74-php-intl-7.4.9~RC1-1.el8.remi.x8 2.1 MB/s | 197 kB     00:00
(26/36): php74-php-ldap-7.4.9~RC1-1.el8.remi.x8 1.0 MB/s |  90 kB     00:00
(27/36): php74-php-mysqlnd-7.4.9~RC1-1.el8.remi 1.9 MB/s | 195 kB     00:00
(28/36): php74-php-mbstring-7.4.9~RC1-1.el8.rem 3.6 MB/s | 488 kB     00:00
(29/36): php74-php-pdo-7.4.9~RC1-1.el8.remi.x86 1.4 MB/s | 126 kB     00:00
(30/36): php74-php-pgsql-7.4.9~RC1-1.el8.remi.x 1.4 MB/s | 122 kB     00:00
(31/36): php74-php-process-7.4.9~RC1-1.el8.remi 1.1 MB/s |  88 kB     00:00
(32/36): php74-php-pspell-7.4.9~RC1-1.el8.remi. 755 kB/s |  68 kB     00:00
(33/36): libicu65-65.1-1.el8.remi.x86_64.rpm     12 MB/s | 9.3 MB     00:00
(34/36): php74-php-soap-7.4.9~RC1-1.el8.remi.x8 1.6 MB/s | 181 kB     00:00
(35/36): php74-php-xml-7.4.9~RC1-1.el8.remi.x86 1.5 MB/s | 176 kB     00:00
(36/36): php74-php-xmlrpc-7.4.9~RC1-1.el8.remi. 1.3 MB/s |  94 kB     00:00
--------------------------------------------------------------------------------
Total                                            28 MB/s |  47 MB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: mariadb-connector-c-3.0.7-1.el8.x86_64                 1/1
  Preparing        :                                                        1/1
  Installing       : mariadb-connector-c-config-3.0.7-1.el8.noarch         1/36
  Installing       : mariadb-common-3:10.3.17-1.module_el8.1.0+257+4873    2/36
  Installing       : mariadb-connector-c-3.0.7-1.el8.x86_64                3/36
  Installing       : php74-php-xml-7.4.9~RC1-1.el8.remi.x86_64             4/36
  Installing       : php74-php-pdo-7.4.9~RC1-1.el8.remi.x86_64             5/36
  Installing       : perl-DBI-1.641-3.module_el8.1.0+199+8f0a6bbd.x86_6    6/36
  Installing       : perl-DBD-MySQL-4.046-3.module_el8.1.0+203+e45423dc    7/36
  Installing       : mariadb-errmsg-3:10.3.17-1.module_el8.1.0+257+4873    8/36
  Installing       : php74-php-process-7.4.9~RC1-1.el8.remi.x86_64         9/36
  Installing       : oniguruma5php-6.9.5+rev1-2.el8.remi.x86_64           10/36
  Installing       : libicu65-65.1-1.el8.remi.x86_64                      11/36
  Installing       : libmcrypt-2.5.8-26.el8.x86_64                        12/36
  Installing       : libc-client-2007f-24.el8.x86_64                      13/36
  Installing       : psmisc-23.1-4.el8.x86_64                             14/36
  Installing       : mariadb-backup-3:10.3.17-1.module_el8.1.0+257+4873   15/36
  Installing       : mariadb-gssapi-server-3:10.3.17-1.module_el8.1.0+2   16/36
  Installing       : mariadb-server-utils-3:10.3.17-1.module_el8.1.0+25   17/36
  Running scriptlet: mariadb-server-3:10.3.17-1.module_el8.1.0+257+4873   18/36
  Installing       : mariadb-server-3:10.3.17-1.module_el8.1.0+257+4873   18/36
  Running scriptlet: mariadb-server-3:10.3.17-1.module_el8.1.0+257+4873   18/36
  Installing       : mariadb-3:10.3.17-1.module_el8.1.0+257+48736ea6.x8   19/36
  Installing       : recode-3.6-47.el8.x86_64                             20/36
  Running scriptlet: recode-3.6-47.el8.x86_64                             20/36
  Installing       : libpq-12.1-3.el8.x86_64                              21/36
  Installing       : aspell-12:0.60.6.1-21.el8.x86_64                     22/36
  Running scriptlet: aspell-12:0.60.6.1-21.el8.x86_64                     22/36
  Installing       : php74-php-pspell-7.4.9~RC1-1.el8.remi.x86_64         23/36
  Installing       : php74-php-pgsql-7.4.9~RC1-1.el8.remi.x86_64          24/36
  Installing       : php74-php-pecl-recode-1.0.0~DEV.20190723-4.el8.rem   25/36
  Installing       : php74-php-imap-7.4.9~RC1-1.el8.remi.x86_64           26/36
  Installing       : php74-php-pecl-mcrypt-1.0.3-1.el8.remi.x86_64        27/36
  Installing       : php74-php-intl-7.4.9~RC1-1.el8.remi.x86_64           28/36
  Installing       : php74-php-mbstring-7.4.9~RC1-1.el8.remi.x86_64       29/36
  Installing       : php74-php-pear-1:1.10.12-1.el8.remi.noarch           30/36
  Installing       : php74-php-mysqlnd-7.4.9~RC1-1.el8.remi.x86_64        31/36
  Installing       : php74-php-xmlrpc-7.4.9~RC1-1.el8.remi.x86_64         32/36
  Installing       : php74-php-soap-7.4.9~RC1-1.el8.remi.x86_64           33/36
  Installing       : php74-php-ldap-7.4.9~RC1-1.el8.remi.x86_64           34/36
  Installing       : php74-php-gd-7.4.9~RC1-1.el8.remi.x86_64             35/36
  Running scriptlet: postfix-2:3.3.1-12.el8.x86_64                        36/36
  Installing       : postfix-2:3.3.1-12.el8.x86_64                        36/36
  Running scriptlet: postfix-2:3.3.1-12.el8.x86_64                        36/36
  Running scriptlet: php74-php-pear-1:1.10.12-1.el8.remi.noarch           36/36
  Verifying        : aspell-12:0.60.6.1-21.el8.x86_64                      1/36
  Verifying        : libpq-12.1-3.el8.x86_64                               2/36
  Verifying        : mariadb-3:10.3.17-1.module_el8.1.0+257+48736ea6.x8    3/36
  Verifying        : mariadb-backup-3:10.3.17-1.module_el8.1.0+257+4873    4/36
  Verifying        : mariadb-common-3:10.3.17-1.module_el8.1.0+257+4873    5/36
  Verifying        : mariadb-connector-c-3.0.7-1.el8.x86_64                6/36
  Verifying        : mariadb-connector-c-config-3.0.7-1.el8.noarch         7/36
  Verifying        : mariadb-errmsg-3:10.3.17-1.module_el8.1.0+257+4873    8/36
  Verifying        : mariadb-gssapi-server-3:10.3.17-1.module_el8.1.0+2    9/36
  Verifying        : mariadb-server-3:10.3.17-1.module_el8.1.0+257+4873   10/36
  Verifying        : mariadb-server-utils-3:10.3.17-1.module_el8.1.0+25   11/36
  Verifying        : perl-DBD-MySQL-4.046-3.module_el8.1.0+203+e45423dc   12/36
  Verifying        : perl-DBI-1.641-3.module_el8.1.0+199+8f0a6bbd.x86_6   13/36
  Verifying        : recode-3.6-47.el8.x86_64                             14/36
  Verifying        : postfix-2:3.3.1-12.el8.x86_64                        15/36
  Verifying        : psmisc-23.1-4.el8.x86_64                             16/36
  Verifying        : libc-client-2007f-24.el8.x86_64                      17/36
  Verifying        : libmcrypt-2.5.8-26.el8.x86_64                        18/36
  Verifying        : libicu65-65.1-1.el8.remi.x86_64                      19/36
  Verifying        : oniguruma5php-6.9.5+rev1-2.el8.remi.x86_64           20/36
  Verifying        : php74-php-pear-1:1.10.12-1.el8.remi.noarch           21/36
  Verifying        : php74-php-pecl-mcrypt-1.0.3-1.el8.remi.x86_64        22/36
  Verifying        : php74-php-pecl-recode-1.0.0~DEV.20190723-4.el8.rem   23/36
  Verifying        : php74-php-gd-7.4.9~RC1-1.el8.remi.x86_64             24/36
  Verifying        : php74-php-imap-7.4.9~RC1-1.el8.remi.x86_64           25/36
  Verifying        : php74-php-intl-7.4.9~RC1-1.el8.remi.x86_64           26/36
  Verifying        : php74-php-ldap-7.4.9~RC1-1.el8.remi.x86_64           27/36
  Verifying        : php74-php-mbstring-7.4.9~RC1-1.el8.remi.x86_64       28/36
  Verifying        : php74-php-mysqlnd-7.4.9~RC1-1.el8.remi.x86_64        29/36
  Verifying        : php74-php-pdo-7.4.9~RC1-1.el8.remi.x86_64            30/36
  Verifying        : php74-php-pgsql-7.4.9~RC1-1.el8.remi.x86_64          31/36
  Verifying        : php74-php-process-7.4.9~RC1-1.el8.remi.x86_64        32/36
  Verifying        : php74-php-pspell-7.4.9~RC1-1.el8.remi.x86_64         33/36
  Verifying        : php74-php-soap-7.4.9~RC1-1.el8.remi.x86_64           34/36
  Verifying        : php74-php-xml-7.4.9~RC1-1.el8.remi.x86_64            35/36
  Verifying        : php74-php-xmlrpc-7.4.9~RC1-1.el8.remi.x86_64         36/36

Installed:
  aspell-12:0.60.6.1-21.el8.x86_64
  libc-client-2007f-24.el8.x86_64
  libicu65-65.1-1.el8.remi.x86_64
  libmcrypt-2.5.8-26.el8.x86_64
  libpq-12.1-3.el8.x86_64
  mariadb-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
  mariadb-backup-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
  mariadb-common-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
  mariadb-connector-c-3.0.7-1.el8.x86_64
  mariadb-connector-c-config-3.0.7-1.el8.noarch
  mariadb-errmsg-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
  mariadb-gssapi-server-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
  mariadb-server-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
  mariadb-server-utils-3:10.3.17-1.module_el8.1.0+257+48736ea6.x86_64
  oniguruma5php-6.9.5+rev1-2.el8.remi.x86_64
  perl-DBD-MySQL-4.046-3.module_el8.1.0+203+e45423dc.x86_64
  perl-DBI-1.641-3.module_el8.1.0+199+8f0a6bbd.x86_64
  php74-php-gd-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-imap-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-intl-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-ldap-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-mbstring-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-mysqlnd-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-pdo-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-pear-1:1.10.12-1.el8.remi.noarch
  php74-php-pecl-mcrypt-1.0.3-1.el8.remi.x86_64
  php74-php-pecl-recode-1.0.0~DEV.20190723-4.el8.remi.x86_64
  php74-php-pgsql-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-process-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-pspell-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-soap-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-xml-7.4.9~RC1-1.el8.remi.x86_64
  php74-php-xmlrpc-7.4.9~RC1-1.el8.remi.x86_64
  postfix-2:3.3.1-12.el8.x86_64
  psmisc-23.1-4.el8.x86_64
  recode-3.6-47.el8.x86_64

Complete!
...

Step 4 (optional): install opcache

yum install -y php74-php-opcache

Result:

[root@tutorialspots ~]# yum install -y php74-php-opcache
Last metadata expiration check: 3:52:25 ago on Sat 25 Jul 2020 01:10:51 PM CEST.
Dependencies resolved.
================================================================================
 Package               Arch       Version                   Repository     Size
================================================================================
Installing:
 php74-php-opcache     x86_64     7.4.9~RC1-1.el8.remi      remi-test     271 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 271 k
Installed size: 555 k
Downloading Packages:
php74-php-opcache-7.4.9~RC1-1.el8.remi.x86_64.r 2.0 MB/s | 271 kB     00:00
--------------------------------------------------------------------------------
Total                                           1.6 MB/s | 271 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : php74-php-opcache-7.4.9~RC1-1.el8.remi.x86_64          1/1
  Running scriptlet: php74-php-opcache-7.4.9~RC1-1.el8.remi.x86_64          1/1
  Verifying        : php74-php-opcache-7.4.9~RC1-1.el8.remi.x86_64          1/1

Installed:
  php74-php-opcache-7.4.9~RC1-1.el8.remi.x86_64

Complete!

Step 5: edit file /etc/opt/remi/php74/php-fpm.d/www.conf
Change:

listen = /var/opt/remi/php74/run/php-fpm/www.sock

To:

listen = 127.0.0.1:9000

Sample nginx.conf for PHP:

		location ~ \.php$ {
			fastcgi_split_path_info ^(.+\.php)(/.+)$;
			include /etc/nginx/fastcgi_params;
			fastcgi_pass 127.0.0.1:9000;
			fastcgi_index index.php;
			fastcgi_connect_timeout 250;
			fastcgi_send_timeout 250;
			fastcgi_read_timeout 250;
			fastcgi_buffer_size 256k;
			fastcgi_buffers 4 256k;
			fastcgi_busy_buffers_size 256k;
			fastcgi_temp_file_write_size 256k;
			fastcgi_intercept_errors on;
			fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
		}    

Leave a Reply