CentOS7でphp7.4をインストールしようとして躓いた話

# 修正
2024-12-10 にMarkdownの記述を変更

# はじめに
私はプログラミングが全く分からない人間なのですが、このままではいけないと思い、PHPを勉強することにしました。その第一歩として環境構築を行い、CentOS 7にPHP 7.4をインストールしようとしましたが、そこで早速つまずいてしまいました。
このようなことでつまずく方はあまりいないかもしれませんが、もし同じような状況の方がいた場合に参考になればと思い、また自分自身のアウトプットの練習として、この記事を書いてみることにしました。

## なんでphp7.4をインストールしようとした？
参考にした書籍がphp7を使用したものであり、CentOS7で標準で提供されているphpのバージョンが5.4だったため、Remiリポジトリを利用することにしたが、せっかくなので最新のphp7.4をインストールしてみようと思った。


# サーバ環境
```
# cat /etc/centos-release
CentOS Linux release 7.7.1908 (Core)
```

# 環境構築
## epel-release インストール
Remiリポジトリをインストールするために必要なためインストールする

```
# yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                      Arch                                   Version                               Repository                              Size
========================================================================================================================================================================
Installing:
 epel-release                                 noarch                                 7-11                                  extras                                  15 k

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

Total download size: 15 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm                                                                                                                     |  15 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                                                                                                             1/1
  Verifying  : epel-release-7-11.noarch                                                                                                                             1/1

Installed:
  epel-release.noarch 0:7-11

Complete!
```

# #Remiリポジトリインストール
```
# rpm -ivh http://ftp.riken.jp/Linux/remi/enterprise/remi-release-7.rpm
Retrieving http://ftp.riken.jp/Linux/remi/enterprise/remi-release-7.rpm
warning: /var/tmp/rpm-tmp.jMjNxd: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:remi-release-7.7-1.el7.remi      ################################# [100%]
```

## php確認
```
# yum list php*
<省略>
php73-zephir.noarch                                                                     0.10.16-1.el7.remi                                                    remi-safe
php74-build.x86_64                                                                      1.0-1.el7.remi                                                        remi-safe
php74-php.x86_64                                                                        7.4.1-1.el7.remi                                                      remi-safe
php74-php-ast.x86_64                                                                    1.0.5-1.el7.remi                                                      remi-safe
php74-php-bcmath.x86_64                                                                 7.4.1-1.el7.remi                                                      remi-safe
php74-php-brotli.x86_64                                                                 0.7.0-4.el7.remi                                                      remi-safe
php74-php-componere.x86_64                                                              3.1.1-1.el7.remi                                                      remi-safe
php74-php-dba.x86_64                                                                    7.4.1-1.el7.remi                                                      remi-safe
php74-php-dbg.x86_64                                                                    7.4.1-1.el7.remi                                                      remi-safe
php74-php-devel.x86_64                                                                  7.4.1-1.el7.remi                                                      remi-safe
php74-php-embedded.x86_64                                                               7.4.1-1.el7.remi                                                      remi-safe
php74-php-enchant.x86_64                                                                7.4.1-1.el7.remi                                                      remi-safe
php74-php-ffi.x86_64                                                                    7.4.1-1.el7.remi                                                      remi-safe
php74-php-fpm.x86_64                                                                    7.4.1-1.el7.remi                                                      remi-safe
php74-php-gd.x86_64                                                                     7.4.1-1.el7.remi                                                      remi-safe
php74-php-gmp.x86_64                                                                    7.4.1-1.el7.remi                                                      remi-safe
php74-php-horde-horde-lz4.x86_64                                                        1.0.10-7.el7.remi                                                     remi-safe
php74-php-imap.x86_64                                                                   7.4.1-1.el7.remi                                                      remi-safe
php74-php-intl.x86_64                                                                   7.4.1-1.el7.remi                                                      remi-safe
php74-php-ldap.x86_64                                                                   7.4.1-1.el7.remi                                                      remi-safe
php74-php-libvirt.x86_64                                                                0.5.4-5.el7.remi                                                      remi-safe
php74-php-libvirt-doc.noarch                                                            0.5.4-5.el7.remi                                                      remi-safe
php74-php-litespeed.x86_64                                                              7.4.1-1.el7.remi                                                      remi-safe
php74-php-lz4.x86_64                                                                    0.3.6-2.el7.remi                                                      remi-safe
php74-php-maxminddb.x86_64                                                              1.6.0-1.el7.remi                                                      remi-safe
php74-php-mbstring.x86_64                                                               7.4.1-1.el7.remi                                                      remi-safe
php74-php-mysqlnd.x86_64                                                                7.4.1-1.el7.remi                                                      remi-safe
php74-php-oci8.x86_64                                                                   7.4.1-1.el7.remi                                                      remi-safe
php74-php-odbc.x86_64                                                                   7.4.1-1.el7.remi                                                      remi-safe
php74-php-opcache.x86_64                                                                7.4.1-1.el7.remi                                                      remi-safe
php74-php-pdo.x86_64                                                                    7.4.1-1.el7.remi                                                      remi-safe
php74-php-pdo-dblib.x86_64                                                              7.4.1-1.el7.remi                                                      remi-safe
php74-php-pdo-firebird.x86_64                                                           7.4.1-1.el7.remi                                                      remi-safe
php74-php-pear.noarch                                                                   1:1.10.10-4.el7.remi                                                  remi-safe
php74-php-pecl-ahocorasick.x86_64                                                       0.0.7-3.el7.remi                                                      remi-safe
php74-php-pecl-amqp.x86_64                                                              1.9.4-9.el7.remi                                                      remi-safe
php74-php-pecl-apcu.x86_64                                                              5.1.18-1.el7.remi                                                     remi-safe
php74-php-pecl-apcu-bc.x86_64                                                           1.0.5-3.el7.remi                                                      remi-safe
php74-php-pecl-apcu-devel.x86_64                                                        5.1.18-1.el7.remi                                                     remi-safe
php74-php-pecl-apfd.x86_64                                                              1.0.1-13.el7.remi                                                     remi-safe
php74-php-pecl-base58.x86_64                                                            0.1.4-3.el7.remi                                                      remi-safe
php74-php-pecl-bitset.x86_64                                                            3.0.1-4.el7.remi                                                      remi-safe
php74-php-pecl-cassandra.x86_64                                                         1.3.2-8.el7.remi                                                      remi-safe
php74-php-pecl-cmark.x86_64                                                             1.2.0-3.el7.remi                                                      remi-safe
php74-php-pecl-couchbase2.x86_64                                                        2.6.1-2.el7.remi                                                      remi-safe
php74-php-pecl-crypto.x86_64                                                            0.3.1-9.el7.remi                                                      remi-safe
php74-php-pecl-datadog-trace.x86_64                                                     0.37.0-1.el7.remi                                                     remi-safe
php74-php-pecl-dbase.x86_64                                                             7.0.1-1.el7.remi                                                      remi-safe
php74-php-pecl-decimal.x86_64                                                           1.3.0-3.el7.remi                                                      remi-safe
php74-php-pecl-dio.x86_64                                                               0.1.0-8.el7.remi                                                      remi-safe
php74-php-pecl-druid.x86_64                                                             1.0.0-5.el7.remi                                                      remi-safe
php74-php-pecl-ds.x86_64                                                                1.2.9-2.el7.remi                                                      remi-safe
php74-php-pecl-eio.x86_64                                                               2.0.4-5.el7.remi                                                      remi-safe
php74-php-pecl-env.x86_64                                                               0.2.1-8.el7.remi                                                      remi-safe
php74-php-pecl-ev.x86_64                                                                1.0.8-1.el7.remi                                                      remi-safe
php74-php-pecl-event.x86_64                                                             2.5.3-3.el7.remi                                                      remi-safe
php74-php-pecl-fann.x86_64                                                              1.1.1-14.el7.remi                                                     remi-safe
php74-php-pecl-gearman.x86_64                                                           2.0.6-1.el7.remi                                                      remi-safe
php74-php-pecl-gender.x86_64                                                            1.1.0-14.el7.remi                                                     remi-safe
php74-php-pecl-geoip.x86_64                                                             1.1.1-11.el7.remi                                                     remi-safe
php74-php-pecl-geospatial.x86_64                                                        0.2.1-2.el7.remi                                                      remi-safe
php74-php-pecl-gmagick.x86_64                                                           2.0.5~RC1-6.el7.remi                                                  remi-safe
php74-php-pecl-gnupg.x86_64                                                             1.4.0-9.el7.remi                                                      remi-safe
php74-php-pecl-grpc.x86_64                                                              1.26.0-1.el7.remi                                                     remi-safe
php74-php-pecl-handlebars.x86_64                                                        0.8.3-2.el7.remi                                                      remi-safe
php74-php-pecl-hdr-histogram.x86_64                                                     0.3.0-10.el7.remi                                                     remi-safe
php74-php-pecl-hprose.x86_64                                                            1.6.8-3.el7.remi                                                      remi-safe
php74-php-pecl-hrtime.x86_64                                                            0.6.0-7.el7.remi                                                      remi-safe
php74-php-pecl-http.x86_64                                                              3.2.3-1.el7.remi                                                      remi-safe
php74-php-pecl-http-devel.x86_64                                                        3.2.3-1.el7.remi                                                      remi-safe
php74-php-pecl-http-message.x86_64                                                      0.2.1-1.el7.remi                                                      remi-safe
php74-php-pecl-http-message-devel.x86_64                                                0.2.1-1.el7.remi                                                      remi-safe
php74-php-pecl-igbinary.x86_64                                                          3.1.0-1.el7.remi                                                      remi-safe
php74-php-pecl-igbinary-devel.x86_64                                                    3.1.0-1.el7.remi                                                      remi-safe
php74-php-pecl-imagick.x86_64                                                           3.4.4-6.el7.remi                                                      remi-safe
php74-php-pecl-imagick-devel.x86_64                                                     3.4.4-6.el7.remi                                                      remi-safe
php74-php-pecl-inotify.x86_64                                                           2.0.0-10.el7.remi                                                     remi-safe
php74-php-pecl-interbase.x86_64                                                         1.0.0~DEV.20190523-4.el7.remi                                         remi-safe
php74-php-pecl-ip2location.x86_64                                                       8.0.1-5.el7.remi                                                      remi-safe
php74-php-pecl-json-post.x86_64                                                         1.0.1-12.el7.remi                                                     remi-safe
php74-php-pecl-krb5.x86_64                                                              1.1.2-8.el7.remi                                                      remi-safe
php74-php-pecl-krb5-devel.x86_64                                                        1.1.2-8.el7.remi                                                      remi-safe
php74-php-pecl-leveldb.x86_64                                                           0.2.1-6.el7.remi                                                      remi-safe
php74-php-pecl-lua.x86_64                                                               2.0.6-3.el7.remi                                                      remi-safe
php74-php-pecl-luasandbox.x86_64                                                        3.0.3-4.el7.remi                                                      remi-safe
php74-php-pecl-lzf.x86_64                                                               1.6.7-3.el7.remi                                                      remi-safe
php74-php-pecl-mailparse.x86_64                                                         3.0.4-1.el7.remi                                                      remi-safe
php74-php-pecl-mcrypt.x86_64                                                            1.0.3-1.el7.remi                                                      remi-safe
php74-php-pecl-memcache.x86_64                                                          4.0.5.2-1.el7.remi                                                    remi-safe
php74-php-pecl-memcached.x86_64                                                         3.1.5-1.el7.remi                                                      remi-safe
php74-php-pecl-memprof.x86_64                                                           2.0.0-6.el7.remi                                                      remi-safe
php74-php-pecl-mogilefs.x86_64                                                          0.9.3.1-10.el7.remi                                                   remi-safe
php74-php-pecl-mongodb.x86_64                                                           1.6.1-1.el7.remi                                                      remi-safe
php74-php-pecl-mosquitto.x86_64                                                         0.4.0-7.el7.remi                                                      remi-safe
php74-php-pecl-msgpack.x86_64                                                           2.1.0~beta1-1.el7.remi                                                remi-safe
php74-php-pecl-msgpack-devel.x86_64                                                     2.1.0~beta1-1.el7.remi                                                remi-safe
php74-php-pecl-mustache.x86_64                                                          0.9.1-1.el7.remi                                                      remi-safe
php74-php-pecl-mysql.x86_64                                                             1.0.0-0.23.20190415.d7643af.el7.remi                                  remi-safe
php74-php-pecl-mysql-xdevapi.x86_64                                                     8.0.19-1.el7.remi                                                     remi-safe
php74-php-pecl-mysqlnd-azure.x86_64                                                     1.0.2-1.el7.remi                                                      remi-safe
php74-php-pecl-nsq.x86_64                                                               3.5.0-1.el7.remi                                                      remi-safe
php74-php-pecl-oauth.x86_64                                                             2.0.4-1.el7.remi                                                      remi-safe
php74-php-pecl-opencensus.x86_64                                                        0.2.2-5.el7.remi                                                      remi-safe
php74-php-pecl-parle.x86_64                                                             0.8.1-8.el7.remi                                                      remi-safe
php74-php-pecl-pcov.x86_64                                                              1.0.6-2.el7.remi                                                      remi-safe
php74-php-pecl-pdflib.x86_64                                                            4.1.3-1.el7.remi                                                      remi-safe
php74-php-pecl-pq.x86_64                                                                2.1.5-4.el7.remi                                                      remi-safe
php74-php-pecl-propro.x86_64                                                            2.1.0-5.el7.remi                                                      remi-safe
php74-php-pecl-propro-devel.x86_64                                                      2.1.0-5.el7.remi                                                      remi-safe
php74-php-pecl-protobuf.x86_64                                                          3.11.2-1.el7.remi                                                     remi-safe
php74-php-pecl-psr.x86_64                                                               0.7.0-2.el7.remi                                                      remi-safe
php74-php-pecl-psr-devel.x86_64                                                         0.7.0-2.el7.remi                                                      remi-safe
php74-php-pecl-radius.x86_64                                                            1.4.0-0.7.b1.el7.remi                                                 remi-safe
php74-php-pecl-raphf.x86_64                                                             2.0.1-1.el7.remi                                                      remi-safe
php74-php-pecl-raphf-devel.x86_64                                                       2.0.1-1.el7.remi                                                      remi-safe
php74-php-pecl-rar.x86_64                                                               4.0.0-6.el7.remi                                                      remi-safe
php74-php-pecl-rdkafka.x86_64                                                           3.1.2-2.el7.remi                                                      remi-safe
php74-php-pecl-rdkafka4.x86_64                                                          4.0.2-1.el7.remi                                                      remi-safe
php74-php-pecl-redis4.x86_64                                                            4.3.0-3.el7.remi                                                      remi-safe
php74-php-pecl-redis5.x86_64                                                            5.1.1-1.el7.remi                                                      remi-safe
php74-php-pecl-rpminfo.x86_64                                                           0.2.1-5.el7.remi                                                      remi-safe
php74-php-pecl-rrd.x86_64                                                               2.0.1-7.el7.remi                                                      remi-safe
php74-php-pecl-runkit7.x86_64                                                           3.1.0~a1-1.el7.remi                                                   remi-safe
php74-php-pecl-scoutapm.x86_64                                                          1.0.2-1.el7.remi                                                      remi-safe
php74-php-pecl-scrypt.x86_64                                                            1.4.2-8.el7.remi                                                      remi-safe
php74-php-pecl-sdl.x86_64                                                               2.3.0-1.el7.remi                                                      remi-safe
php74-php-pecl-seasclick.x86_64                                                         0.1.0-3.el7.remi                                                      remi-safe
php74-php-pecl-seaslog.x86_64                                                           2.1.0-1.el7.remi                                                      remi-safe
php74-php-pecl-selinux.x86_64                                                           0.4.2-2.el7.remi                                                      remi-safe
php74-php-pecl-skywalking.x86_64                                                        3.2.4-1.el7.remi                                                      remi-safe
php74-php-pecl-solr2.x86_64                                                             2.5.0-3.el7.remi                                                      remi-safe
php74-php-pecl-ssdeep.x86_64                                                            1.1.0-5.el7.remi                                                      remi-safe
php74-php-pecl-ssh2.x86_64                                                              1.2-1.el7.remi                                                        remi-safe
php74-php-pecl-stats.x86_64                                                             2.0.3-8.el7.remi                                                      remi-safe
php74-php-pecl-stomp.x86_64                                                             2.0.2-5.el7.remi                                                      remi-safe
php74-php-pecl-svm.x86_64                                                               0.2.3-2.el7.remi                                                      remi-safe
php74-php-pecl-svn.x86_64                                                               2.0.3-1.el7.remi                                                      remi-safe
php74-php-pecl-swoole4.x86_64                                                           4.4.14-1.el7.remi                                                     remi-safe
php74-php-pecl-sync.x86_64                                                              1.1.1-6.el7.remi                                                      remi-safe
php74-php-pecl-taint.x86_64                                                             2.0.6-1.el7.remi                                                      remi-safe
php74-php-pecl-tcpwrap.x86_64                                                           1.2.0-5.el7.remi                                                      remi-safe
php74-php-pecl-termbox.x86_64                                                           0.1.3-8.el7.remi                                                      remi-safe
php74-php-pecl-timecop.x86_64                                                           1.2.10-9.el7.remi                                                     remi-safe
php74-php-pecl-trader.x86_64                                                            0.5.0-5.el7.remi                                                      remi-safe
php74-php-pecl-translit.x86_64                                                          0.6.3-4.el7.remi                                                      remi-safe
php74-php-pecl-uopz.x86_64                                                              6.1.1-1.el7.remi                                                      remi-safe
php74-php-pecl-uploadprogress.x86_64                                                    1.0.3.1-20.el7.remi                                                   remi-safe
php74-php-pecl-uuid.x86_64                                                              1.1.0-1.el7.remi                                                      remi-safe
php74-php-pecl-uv.x86_64                                                                0.2.4-3.el7.remi                                                      remi-safe
php74-php-pecl-varnish.x86_64                                                           1.2.4-4.el7.remi                                                      remi-safe
php74-php-pecl-vips.x86_64                                                              1.0.10-2.el7.remi                                                     remi-safe
php74-php-pecl-vld.x86_64                                                               0.17.0-1.el7.remi                                                     remi-safe
php74-php-pecl-wddx.x86_64                                                              1.0.0~DEV.20190320-6.el7.remi                                         remi-safe
php74-php-pecl-xattr.x86_64                                                             1.3.0-8.el7.remi                                                      remi-safe
php74-php-pecl-xdebug.x86_64                                                            2.9.0-1.el7.remi                                                      remi-safe
php74-php-pecl-xdiff.x86_64                                                             2.0.1-7.el7.remi                                                      remi-safe
php74-php-pecl-xhprof.x86_64                                                            2.1.4-1.el7.remi                                                      remi-safe
php74-php-pecl-xlswriter.x86_64                                                         1.3.3.2-2.el7.remi                                                    remi-safe
php74-php-pecl-xmldiff.x86_64                                                           1.1.2-14.el7.remi                                                     remi-safe
php74-php-pecl-xmldiff-devel.x86_64                                                     1.1.2-14.el7.remi                                                     remi-safe
php74-php-pecl-xxtea.x86_64                                                             1.0.11-8.el7.remi                                                     remi-safe
php74-php-pecl-yac.x86_64                                                               2.0.3-1.el7.remi                                                      remi-safe
php74-php-pecl-yaconf.x86_64                                                            1.0.8-1.el7.remi                                                      remi-safe
php74-php-pecl-yaconf-devel.x86_64                                                      1.0.8-1.el7.remi                                                      remi-safe
php74-php-pecl-yaf.x86_64                                                               3.0.9-1.el7.remi                                                      remi-safe
php74-php-pecl-yaml.x86_64                                                              2.0.4-4.el7.remi                                                      remi-safe
php74-php-pecl-yar.x86_64                                                               2.0.7-1.el7.remi                                                      remi-safe
php74-php-pecl-yaz.x86_64                                                               1.2.3-3.el7.remi                                                      remi-safe
php74-php-pecl-zip.x86_64                                                               1.15.5-1.el7.remi                                                     remi-safe
php74-php-pecl-zmq.x86_64                                                               1.1.3-10.el7.remi                                                     remi-safe
php74-php-pggi.x86_64                                                                   0.4.1-1.el7.remi                                                      remi-safe
php74-php-pgsql.x86_64                                                                  7.4.1-1.el7.remi                                                      remi-safe
php74-php-phalcon4.x86_64                                                               4.0.2-1.el7.remi                                                      remi-safe
php74-php-phpiredis.x86_64                                                              1.0.0-13.el7.remi                                                     remi-safe
php74-php-pinba.x86_64                                                                  1.1.1-6.el7.remi                                                      remi-safe
php74-php-process.x86_64                                                                7.4.1-1.el7.remi                                                      remi-safe
php74-php-pspell.x86_64                                                                 7.4.1-1.el7.remi                                                      remi-safe
php74-php-recode.x86_64                                                                 7.4.0~alpha3-12.el7.remi                                              remi-safe
php74-php-smbclient.x86_64                                                              1.0.0-4.el7.remi                                                      remi-safe
php74-php-snappy.x86_64                                                                 0.1.9-4.el7.remi                                                      remi-safe
php74-php-snmp.x86_64                                                                   7.4.1-1.el7.remi                                                      remi-safe
php74-php-snuffleupagus.x86_64                                                          0.5.0-1.el7.remi                                                      remi-safe
php74-php-soap.x86_64                                                                   7.4.1-1.el7.remi                                                      remi-safe
php74-php-sodium.x86_64                                                                 7.4.1-1.el7.remi                                                      remi-safe
php74-php-sqlsrv.x86_64                                                                 5.7.1~preview-1.el7.remi                                              remi-safe
php74-php-tidy.x86_64                                                                   7.4.1-1.el7.remi                                                      remi-safe
php74-php-wkhtmltox.x86_64                                                              0.3.2-0.5.20171112.fecc9af.el7.remi                                   remi-safe
php74-php-xml.x86_64                                                                    7.4.1-1.el7.remi                                                      remi-safe
php74-php-xmlrpc.x86_64                                                                 7.4.1-1.el7.remi                                                      remi-safe
php74-php-zephir-parser.x86_64                                                          1.3.3-1.el7.remi                                                      remi-safe
php74-php-zephir-parser-devel.x86_64                                                    1.3.3-1.el7.remi                                                      remi-safe
php74-php-zstd.x86_64                                                                   0.7.7-1.el7.remi                                                      remi-safe
php74-scldevel.x86_64                                                                   1.0-1.el7.remi                                                        remi-safe
php74-unit-php.x86_64                                                                   1.14.0-1.el7.remi                                                     remi-safe
php74-uwsgi-plugin-php.x86_64                                                           2.0.17.1-3.el7.remi                                                   remi-safe
php74-xhprof.noarch                                                                     2.1.4-1.el7.remi                                                      remi-safe
php74-zephir.noarch                                                                     0.10.16-1.el7.remi                                                    remi-safe
```
php7.4があるようなのでphp7.4をインストールしようと考える。

## httpd+php7.4+mariadb インストール
```
# yum install httpd mariadb-server php74
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-90.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-90.el7.centos for package: httpd-2.4.6-90.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-90.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-90.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-90.el7.centos.x86_64
---> Package mariadb-server.x86_64 1:5.5.64-1.el7 will be installed
--> Processing Dependency: mariadb(x86-64) = 1:5.5.64-1.el7 for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(DBI) for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: 1:mariadb-server-5.5.64-1.el7.x86_64
---> Package php74.x86_64 0:1.0-1.el7.remi will be installed
--> Processing Dependency: php74-runtime(x86-64) = 1.0-1.el7.remi for package: php74-1.0-1.el7.remi.x86_64
--> Processing Dependency: php74-runtime for package: php74-1.0-1.el7.remi.x86_64
--> Processing Dependency: php74-php-common(x86-64) for package: php74-1.0-1.el7.remi.x86_64
--> Processing Dependency: php74-php-cli(x86-64) for package: php74-1.0-1.el7.remi.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-5.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-90.el7.centos will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
---> Package mariadb.x86_64 1:5.5.64-1.el7 will be installed
---> Package perl-DBD-MySQL.x86_64 0:4.023-6.el7 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
---> Package php74-php-cli.x86_64 0:7.4.1-1.el7.remi will be installed
---> Package php74-php-common.x86_64 0:7.4.1-1.el7.remi will be installed
--> Processing Dependency: php74-php-json(x86-64) = 7.4.1-1.el7.remi for package: php74-php-common-7.4.1-1.el7.remi.x86_64
---> Package php74-runtime.x86_64 0:1.0-1.el7.remi will be installed
--> Processing Dependency: /usr/sbin/semanage for package: php74-runtime-1.0-1.el7.remi.x86_64
--> Processing Dependency: environment-modules for package: php74-runtime-1.0-1.el7.remi.x86_64
--> Processing Dependency: scl-utils for package: php74-runtime-1.0-1.el7.remi.x86_64
--> Running transaction check
---> Package environment-modules.x86_64 0:3.2.10-10.el7 will be installed
--> Processing Dependency: libtcl8.5.so()(64bit) for package: environment-modules-3.2.10-10.el7.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: environment-modules-3.2.10-10.el7.x86_64
---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch
---> Package php74-php-json.x86_64 0:7.4.1-1.el7.remi will be installed
---> Package policycoreutils-python.x86_64 0:2.5-33.el7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libselinux-python for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
---> Package scl-utils.x86_64 0:20130529-19.el7 will be installed
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
---> Package libX11.x86_64 0:1.6.7-2.el7 will be installed
--> Processing Dependency: libX11-common >= 1.6.7-2.el7 for package: libX11-1.6.7-2.el7.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-2.el7.x86_64
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
---> Package libselinux-python.x86_64 0:2.5-14.1.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
---> Package tcl.x86_64 1:8.5.13-8.el7 will be installed
--> Running transaction check
---> Package libX11-common.noarch 0:1.6.7-2.el7 will be installed
---> Package libxcb.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.13-1.el7.x86_64
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
--> Running transaction check
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                          Arch                            Version                                      Repository                          Size
========================================================================================================================================================================
Installing:
 httpd                                            x86_64                          2.4.6-90.el7.centos                          base                               2.7 M
 mariadb-server                                   x86_64                          1:5.5.64-1.el7                               base                                11 M
 php74                                            x86_64                          1.0-1.el7.remi                               remi-safe                          2.4 k
Installing for dependencies:
 apr                                              x86_64                          1.4.8-5.el7                                  base                               103 k
 apr-util                                         x86_64                          1.5.2-6.el7                                  base                                92 k
 audit-libs-python                                x86_64                          2.8.5-4.el7                                  base                                76 k
 checkpolicy                                      x86_64                          2.5-8.el7                                    base                               295 k
 environment-modules                              x86_64                          3.2.10-10.el7                                base                               107 k
 httpd-tools                                      x86_64                          2.4.6-90.el7.centos                          base                                91 k
 libX11                                           x86_64                          1.6.7-2.el7                                  base                               607 k
 libX11-common                                    noarch                          1.6.7-2.el7                                  base                               164 k
 libXau                                           x86_64                          1.0.8-2.1.el7                                base                                29 k
 libaio                                           x86_64                          0.3.109-13.el7                               base                                24 k
 libcgroup                                        x86_64                          0.41-21.el7                                  base                                66 k
 libselinux-python                                x86_64                          2.5-14.1.el7                                 base                               235 k
 libsemanage-python                               x86_64                          2.5-14.el7                                   base                               113 k
 libxcb                                           x86_64                          1.13-1.el7                                   base                               214 k
 mailcap                                          noarch                          2.1.41-2.el7                                 base                                31 k
 mariadb                                          x86_64                          1:5.5.64-1.el7                               base                               8.7 M
 perl-Compress-Raw-Bzip2                          x86_64                          2.061-3.el7                                  base                                32 k
 perl-Compress-Raw-Zlib                           x86_64                          1:2.061-4.el7                                base                                57 k
 perl-DBD-MySQL                                   x86_64                          4.023-6.el7                                  base                               140 k
 perl-DBI                                         x86_64                          1.627-4.el7                                  base                               802 k
 perl-IO-Compress                                 noarch                          2.061-2.el7                                  base                               260 k
 perl-Net-Daemon                                  noarch                          0.48-5.el7                                   base                                51 k
 perl-PlRPC                                       noarch                          0.2020-14.el7                                base                                36 k
 php74-php-cli                                    x86_64                          7.4.1-1.el7.remi                             remi-safe                          3.4 M
 php74-php-common                                 x86_64                          7.4.1-1.el7.remi                             remi-safe                          677 k
 php74-php-json                                   x86_64                          7.4.1-1.el7.remi                             remi-safe                           71 k
 php74-runtime                                    x86_64                          1.0-1.el7.remi                               remi-safe                          1.1 M
 policycoreutils-python                           x86_64                          2.5-33.el7                                   base                               457 k
 python-IPy                                       noarch                          0.75-6.el7                                   base                                32 k
 scl-utils                                        x86_64                          20130529-19.el7                              base                                24 k
 setools-libs                                     x86_64                          3.3.8-4.el7                                  base                               620 k
 tcl                                              x86_64                          1:8.5.13-8.el7                               base                               1.9 M

Transaction Summary
========================================================================================================================================================================
Install  3 Packages (+32 Dependent packages)

Total download size: 35 M
Installed size: 153 M
Is this ok [y/d/N]: y
Downloading packages:
(1/35): apr-1.4.8-5.el7.x86_64.rpm                                                                                                               | 103 kB  00:00:00
(2/35): apr-util-1.5.2-6.el7.x86_64.rpm                                                                                                          |  92 kB  00:00:01
(3/35): audit-libs-python-2.8.5-4.el7.x86_64.rpm                                                                                                 |  76 kB  00:00:01
(4/35): checkpolicy-2.5-8.el7.x86_64.rpm                                                                                                         | 295 kB  00:00:00
(5/35): httpd-tools-2.4.6-90.el7.centos.x86_64.rpm                                                                                               |  91 kB  00:00:00
(6/35): environment-modules-3.2.10-10.el7.x86_64.rpm                                                                                             | 107 kB  00:00:00
(7/35): httpd-2.4.6-90.el7.centos.x86_64.rpm                                                                                                     | 2.7 MB  00:00:00
(8/35): libXau-1.0.8-2.1.el7.x86_64.rpm                                                                                                          |  29 kB  00:00:00
(9/35): libaio-0.3.109-13.el7.x86_64.rpm                                                                                                         |  24 kB  00:00:00
(10/35): libX11-common-1.6.7-2.el7.noarch.rpm                                                                                                    | 164 kB  00:00:00
(11/35): libX11-1.6.7-2.el7.x86_64.rpm                                                                                                           | 607 kB  00:00:00
(12/35): libcgroup-0.41-21.el7.x86_64.rpm                                                                                                        |  66 kB  00:00:00
(13/35): mailcap-2.1.41-2.el7.noarch.rpm                                                                                                         |  31 kB  00:00:00
(14/35): libsemanage-python-2.5-14.el7.x86_64.rpm                                                                                                | 113 kB  00:00:00
(15/35): libselinux-python-2.5-14.1.el7.x86_64.rpm                                                                                               | 235 kB  00:00:00
(16/35): libxcb-1.13-1.el7.x86_64.rpm                                                                                                            | 214 kB  00:00:00
(17/35): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm                                                                                          |  32 kB  00:00:00
(18/35): perl-DBD-MySQL-4.023-6.el7.x86_64.rpm                                                                                                   | 140 kB  00:00:00
(19/35): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm                                                                                           |  57 kB  00:00:00
(20/35): perl-Net-Daemon-0.48-5.el7.noarch.rpm                                                                                                   |  51 kB  00:00:00
(21/35): perl-IO-Compress-2.061-2.el7.noarch.rpm                                                                                                 | 260 kB  00:00:00
(22/35): perl-PlRPC-0.2020-14.el7.noarch.rpm                                                                                                     |  36 kB  00:00:00
(23/35): mariadb-server-5.5.64-1.el7.x86_64.rpm                                                                                                  |  11 MB  00:00:00
(24/35): perl-DBI-1.627-4.el7.x86_64.rpm                                                                                                         | 802 kB  00:00:00
warning: /var/cache/yum/x86_64/7/remi-safe/packages/php74-1.0-1.el7.remi.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 00f97f56: NOKEY13 MB/s |  24 MB  00:00:00 ETA
Public key for php74-1.0-1.el7.remi.x86_64.rpm is not installed
(25/35): php74-1.0-1.el7.remi.x86_64.rpm                                                                                                         | 2.4 kB  00:00:00
(26/35): mariadb-5.5.64-1.el7.x86_64.rpm                                                                                                         | 8.7 MB  00:00:00
(27/35): php74-php-common-7.4.1-1.el7.remi.x86_64.rpm                                                                                            | 677 kB  00:00:00
(28/35): php74-php-json-7.4.1-1.el7.remi.x86_64.rpm                                                                                              |  71 kB  00:00:00
(29/35): php74-php-cli-7.4.1-1.el7.remi.x86_64.rpm                                                                                               | 3.4 MB  00:00:00
(30/35): php74-runtime-1.0-1.el7.remi.x86_64.rpm                                                                                                 | 1.1 MB  00:00:00
(31/35): scl-utils-20130529-19.el7.x86_64.rpm                                                                                                    |  24 kB  00:00:00
(32/35): python-IPy-0.75-6.el7.noarch.rpm                                                                                                        |  32 kB  00:00:00
(33/35): setools-libs-3.3.8-4.el7.x86_64.rpm                                                                                                     | 620 kB  00:00:00
(34/35): policycoreutils-python-2.5-33.el7.x86_64.rpm                                                                                            | 457 kB  00:00:00
(35/35): tcl-8.5.13-8.el7.x86_64.rpm                                                                                                             | 1.9 MB  00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   9.2 MB/s |  35 MB  00:00:03
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Importing GPG key 0x00F97F56:
 Userid     : "Remi Collet <RPMS@FamilleCollet.com>"
 Fingerprint: 1ee0 4cce 88a4 ae4a a29a 5df5 004e 6f47 00f9 7f56
 Package    : remi-release-7.7-1.el7.remi.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : apr-1.4.8-5.el7.x86_64                                                                                                                              1/35
  Installing : apr-util-1.5.2-6.el7.x86_64                                                                                                                         2/35
  Installing : httpd-tools-2.4.6-90.el7.centos.x86_64                                                                                                              3/35
  Installing : libcgroup-0.41-21.el7.x86_64                                                                                                                        4/35
  Installing : libXau-1.0.8-2.1.el7.x86_64                                                                                                                         5/35
  Installing : libxcb-1.13-1.el7.x86_64                                                                                                                            6/35
  Installing : libselinux-python-2.5-14.1.el7.x86_64                                                                                                               7/35
  Installing : audit-libs-python-2.8.5-4.el7.x86_64                                                                                                                8/35
  Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                                                         9/35
  Installing : libsemanage-python-2.5-14.el7.x86_64                                                                                                               10/35
  Installing : setools-libs-3.3.8-4.el7.x86_64                                                                                                                    11/35
  Installing : libaio-0.3.109-13.el7.x86_64                                                                                                                       12/35
  Installing : libX11-common-1.6.7-2.el7.noarch                                                                                                                   13/35
  Installing : libX11-1.6.7-2.el7.x86_64                                                                                                                          14/35
  Installing : python-IPy-0.75-6.el7.noarch                                                                                                                       15/35
  Installing : 1:mariadb-5.5.64-1.el7.x86_64                                                                                                                      16/35
  Installing : scl-utils-20130529-19.el7.x86_64                                                                                                                   17/35
  Installing : perl-Net-Daemon-0.48-5.el7.noarch                                                                                                                  18/35
  Installing : checkpolicy-2.5-8.el7.x86_64                                                                                                                       19/35
  Installing : policycoreutils-python-2.5-33.el7.x86_64                                                                                                           20/35
  Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                                                         21/35
  Installing : perl-IO-Compress-2.061-2.el7.noarch                                                                                                                22/35
  Installing : perl-PlRPC-0.2020-14.el7.noarch                                                                                                                    23/35
  Installing : perl-DBI-1.627-4.el7.x86_64                                                                                                                        24/35
  Installing : perl-DBD-MySQL-4.023-6.el7.x86_64                                                                                                                  25/35
  Installing : mailcap-2.1.41-2.el7.noarch                                                                                                                        26/35
  Installing : 1:tcl-8.5.13-8.el7.x86_64                                                                                                                          27/35
  Installing : environment-modules-3.2.10-10.el7.x86_64                                                                                                           28/35
  Installing : php74-runtime-1.0-1.el7.remi.x86_64                                                                                                                29/35
  Installing : php74-php-json-7.4.1-1.el7.remi.x86_64                                                                                                             30/35
  Installing : php74-php-common-7.4.1-1.el7.remi.x86_64                                                                                                           31/35
  Installing : php74-php-cli-7.4.1-1.el7.remi.x86_64                                                                                                              32/35
  Installing : php74-1.0-1.el7.remi.x86_64                                                                                                                        33/35
  Installing : httpd-2.4.6-90.el7.centos.x86_64                                                                                                                   34/35
  Installing : 1:mariadb-server-5.5.64-1.el7.x86_64                                                                                                               35/35
  Verifying  : 1:tcl-8.5.13-8.el7.x86_64                                                                                                                           1/35
  Verifying  : perl-IO-Compress-2.061-2.el7.noarch                                                                                                                 2/35
  Verifying  : php74-php-common-7.4.1-1.el7.remi.x86_64                                                                                                            3/35
  Verifying  : mailcap-2.1.41-2.el7.noarch                                                                                                                         4/35
  Verifying  : httpd-tools-2.4.6-90.el7.centos.x86_64                                                                                                              5/35
  Verifying  : environment-modules-3.2.10-10.el7.x86_64                                                                                                            6/35
  Verifying  : httpd-2.4.6-90.el7.centos.x86_64                                                                                                                    7/35
  Verifying  : apr-1.4.8-5.el7.x86_64                                                                                                                              8/35
  Verifying  : php74-php-cli-7.4.1-1.el7.remi.x86_64                                                                                                               9/35
  Verifying  : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                                                         10/35
  Verifying  : checkpolicy-2.5-8.el7.x86_64                                                                                                                       11/35
  Verifying  : perl-Net-Daemon-0.48-5.el7.noarch                                                                                                                  12/35
  Verifying  : scl-utils-20130529-19.el7.x86_64                                                                                                                   13/35
  Verifying  : 1:mariadb-5.5.64-1.el7.x86_64                                                                                                                      14/35
  Verifying  : php74-runtime-1.0-1.el7.remi.x86_64                                                                                                                15/35
  Verifying  : python-IPy-0.75-6.el7.noarch                                                                                                                       16/35
  Verifying  : libX11-1.6.7-2.el7.x86_64                                                                                                                          17/35
  Verifying  : libX11-common-1.6.7-2.el7.noarch                                                                                                                   18/35
  Verifying  : libxcb-1.13-1.el7.x86_64                                                                                                                           19/35
  Verifying  : perl-DBI-1.627-4.el7.x86_64                                                                                                                        20/35
  Verifying  : libaio-0.3.109-13.el7.x86_64                                                                                                                       21/35
  Verifying  : setools-libs-3.3.8-4.el7.x86_64                                                                                                                    22/35
  Verifying  : policycoreutils-python-2.5-33.el7.x86_64                                                                                                           23/35
  Verifying  : libsemanage-python-2.5-14.el7.x86_64                                                                                                               24/35
  Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                                                                        25/35
  Verifying  : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                                                        26/35
  Verifying  : audit-libs-python-2.8.5-4.el7.x86_64                                                                                                               27/35
  Verifying  : php74-php-json-7.4.1-1.el7.remi.x86_64                                                                                                             28/35
  Verifying  : perl-PlRPC-0.2020-14.el7.noarch                                                                                                                    29/35
  Verifying  : libselinux-python-2.5-14.1.el7.x86_64                                                                                                              30/35
  Verifying  : libXau-1.0.8-2.1.el7.x86_64                                                                                                                        31/35
  Verifying  : perl-DBD-MySQL-4.023-6.el7.x86_64                                                                                                                  32/35
  Verifying  : php74-1.0-1.el7.remi.x86_64                                                                                                                        33/35
  Verifying  : 1:mariadb-server-5.5.64-1.el7.x86_64                                                                                                               34/35
  Verifying  : libcgroup-0.41-21.el7.x86_64                                                                                                                       35/35

Installed:
  httpd.x86_64 0:2.4.6-90.el7.centos                      mariadb-server.x86_64 1:5.5.64-1.el7                      php74.x86_64 0:1.0-1.el7.remi

Dependency Installed:
  apr.x86_64 0:1.4.8-5.el7                              apr-util.x86_64 0:1.5.2-6.el7                           audit-libs-python.x86_64 0:2.8.5-4.el7
  checkpolicy.x86_64 0:2.5-8.el7                        environment-modules.x86_64 0:3.2.10-10.el7              httpd-tools.x86_64 0:2.4.6-90.el7.centos
  libX11.x86_64 0:1.6.7-2.el7                           libX11-common.noarch 0:1.6.7-2.el7                      libXau.x86_64 0:1.0.8-2.1.el7
  libaio.x86_64 0:0.3.109-13.el7                        libcgroup.x86_64 0:0.41-21.el7                          libselinux-python.x86_64 0:2.5-14.1.el7
  libsemanage-python.x86_64 0:2.5-14.el7                libxcb.x86_64 0:1.13-1.el7                              mailcap.noarch 0:2.1.41-2.el7
  mariadb.x86_64 1:5.5.64-1.el7                         perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7            perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7
  perl-DBD-MySQL.x86_64 0:4.023-6.el7                   perl-DBI.x86_64 0:1.627-4.el7                           perl-IO-Compress.noarch 0:2.061-2.el7
  perl-Net-Daemon.noarch 0:0.48-5.el7                   perl-PlRPC.noarch 0:0.2020-14.el7                       php74-php-cli.x86_64 0:7.4.1-1.el7.remi
  php74-php-common.x86_64 0:7.4.1-1.el7.remi            php74-php-json.x86_64 0:7.4.1-1.el7.remi                php74-runtime.x86_64 0:1.0-1.el7.remi
  policycoreutils-python.x86_64 0:2.5-33.el7            python-IPy.noarch 0:0.75-6.el7                          scl-utils.x86_64 0:20130529-19.el7
  setools-libs.x86_64 0:3.3.8-4.el7                     tcl.x86_64 1:8.5.13-8.el7

Complete!
```

## httpd.conf 修正
index.php が使える様に修正する

```
# diff -u ./old/httpd.conf.org httpd.conf
--- ./old/httpd.conf.org        2019-08-06 22:44:34.000000000 +0900
+++ httpd.conf  2020-01-15 03:07:52.566074490 +0900
@@ -161,7 +161,7 @@
 # is requested.
 #
 <IfModule dir_module>
-    DirectoryIndex index.html
+    DirectoryIndex index.php index.html
 </IfModule>
```

## httpd起動
httpd を起動させる

```
# systemctl start httpd.service
```

## 確認

```
# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-01-15 03:08:21 JST; 3min 13s ago
     Docs: man:httpd(8)
           man:apachectl(8)
 Main PID: 1449 (httpd)
   Status: "Total requests: 2; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           tq1449 /usr/sbin/httpd -DFOREGROUND
           tq1450 /usr/sbin/httpd -DFOREGROUND
           tq1451 /usr/sbin/httpd -DFOREGROUND
           tq1452 /usr/sbin/httpd -DFOREGROUND
           tq1453 /usr/sbin/httpd -DFOREGROUND
           tq1454 /usr/sbin/httpd -DFOREGROUND
           mq1541 /usr/sbin/httpd -DFOREGROUND
```

## Web閲覧確認
確認用のindex.php を作成

```
vim /var/www/html/index.php
```

中身

```
<?php
phpinfo();
?>
```

index.php にアクセスするが真っ白いページが表示されてphpinfoの内容がでてこない。
access_log, error_log をみてもおかしいログはなし。

# 原因調査
Webでphpのインストール方法を検索してみると、apacheにphpモジュールがロードされている
のを確認する方法があったので確認

```
# httpd -M |grep php
#
```
ロードされてなかった。

よくわからないので、CentOS7 標準のphpをインストールしてみる

```
# yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.iij.ad.jp
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-46.1.el7_7 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-46.1.el7_7 for package: php-5.4.16-46.1.el7_7.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.4.16-46.1.el7_7 for package: php-5.4.16-46.1.el7_7.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:5.4.16-46.1.el7_7 will be installed
---> Package php-common.x86_64 0:5.4.16-46.1.el7_7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-46.1.el7_7.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                 Arch                                Version                                         Repository                            Size
========================================================================================================================================================================
Installing:
 php                                     x86_64                              5.4.16-46.1.el7_7                               updates                              1.4 M
Installing for dependencies:
 libzip                                  x86_64                              0.10.1-8.el7                                    base                                  48 k
 php-cli                                 x86_64                              5.4.16-46.1.el7_7                               updates                              2.7 M
 php-common                              x86_64                              5.4.16-46.1.el7_7                               updates                              565 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 4.7 M
Installed size: 17 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): libzip-0.10.1-8.el7.x86_64.rpm                                                                                                            |  48 kB  00:00:00
(2/4): php-5.4.16-46.1.el7_7.x86_64.rpm                                                                                                          | 1.4 MB  00:00:00
(3/4): php-common-5.4.16-46.1.el7_7.x86_64.rpm                                                                                                   | 565 kB  00:00:00
(4/4): php-cli-5.4.16-46.1.el7_7.x86_64.rpm                                                                                                      | 2.7 MB  00:00:01
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   3.4 MB/s | 4.7 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libzip-0.10.1-8.el7.x86_64                                                                                                                           1/4
  Installing : php-common-5.4.16-46.1.el7_7.x86_64                                                                                                                  2/4
  Installing : php-cli-5.4.16-46.1.el7_7.x86_64                                                                                                                     3/4
  Installing : php-5.4.16-46.1.el7_7.x86_64                                                                                                                         4/4
  Verifying  : php-common-5.4.16-46.1.el7_7.x86_64                                                                                                                  1/4
  Verifying  : php-cli-5.4.16-46.1.el7_7.x86_64                                                                                                                     2/4
  Verifying  : libzip-0.10.1-8.el7.x86_64                                                                                                                           3/4
  Verifying  : php-5.4.16-46.1.el7_7.x86_64                                                                                                                         4/4

Installed:
  php.x86_64 0:5.4.16-46.1.el7_7

Dependency Installed:
  libzip.x86_64 0:0.10.1-8.el7                      php-cli.x86_64 0:5.4.16-46.1.el7_7                      php-common.x86_64 0:5.4.16-46.1.el7_7

Complete!
```


確認

```
# httpd -M |grep php
 php5_module (shared)
```

httpd再起動後、index.php を見るとphpinfoの内容が表示されたのでモジュールがロードされていないことが原因だと判断。

モジュールがどのパッケージからインストールされているか確認

```
# rpm -qf /etc/httpd/conf.modules.d/10-php.conf
php-5.4.16-46.1.el7_7.x86_64
```

php7.4を確認

```
# rpm -ql php74-1.0-1.el7.remi.x86_64
(contains no files)
```
何もインストールされていない。

どのリポジトリからインストールされたのか確認

```
# yum info php74-1.0-1.el7.remi.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.iij.ad.jp
Installed Packages
Name        : php74
Arch        : x86_64
Version     : 1.0
Release     : 1.el7.remi
Size        : 0.0
Repo        : installed
From repo   : remi-safe
Summary     : Package that installs PHP 7.4
License     : GPLv2+
Description : This is the main package for php74 Software Collection,
            : that install PHP 7.4 language.
```

yum で有効なリポジトリを確認

```
# yum repolist enabled
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.iij.ad.jp
repo id                                                          repo name                                                                                        status
base/7/x86_64                                                    CentOS-7 - Base                                                                                  10,097
epel/x86_64                                                      Extra Packages for Enterprise Linux 7 - x86_64                                                   13,509
extras/7/x86_64                                                  CentOS-7 - Extras                                                                                   307
remi-safe                                                        Safe Remi's RPM repository for Enterprise Linux 7 - x86_64                                        3,669
updates/7/x86_64                                                 CentOS-7 - Updates                                                                                1,010
zabbix/x86_64                                                    Zabbix Official Repository - x86_64                                                                 417
zabbix-non-supported/x86_64                                      Zabbix Official Repository non-supported - x86_64                                                     4
repolist: 29,013

```

そもそもRemiリポジトリってどのリポジトリがインストールされたのか確認

```
# rpm -ql remi-release
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi2017
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi2018
/etc/pki/rpm-gpg/RPM-GPG-KEY-remi2019
/etc/yum.repos.d/remi-glpi91.repo
/etc/yum.repos.d/remi-glpi92.repo
/etc/yum.repos.d/remi-glpi93.repo
/etc/yum.repos.d/remi-glpi94.repo
/etc/yum.repos.d/remi-modular.repo
/etc/yum.repos.d/remi-php54.repo
/etc/yum.repos.d/remi-php70.repo
/etc/yum.repos.d/remi-php71.repo
/etc/yum.repos.d/remi-php72.repo
/etc/yum.repos.d/remi-php73.repo
/etc/yum.repos.d/remi-php74.repo
/etc/yum.repos.d/remi-safe.repo
/etc/yum.repos.d/remi.repo
```
今更結構あることに気づく
php7.4 はremi-php74.repoをからインストールするのではないかと思いremi-php74.repoを有効にしてremi-safe.repoを無効にする

```
# diff -u /etc/yum.repos.d/old/remi-safe.repo.org /etc/yum.repos.d/remi-safe.repo
--- /etc/yum.repos.d/old/remi-safe.repo.org     2019-09-06 15:31:54.000000000 +0900
+++ /etc/yum.repos.d/remi-safe.repo     2020-01-15 03:23:28.405219753 +0900
@@ -7,7 +7,7 @@
 #baseurl=http://rpms.remirepo.net/enterprise/7/safe/$basearch/
 #mirrorlist=https://rpms.remirepo.net/enterprise/7/safe/httpsmirror
 mirrorlist=http://cdn.remirepo.net/enterprise/7/safe/mirror
-enabled=1
+enabled=0
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

# diff -u /etc/yum.repos.d/old/remi-php74.repo.org /etc/yum.repos.d/remi-php74.repo
--- /etc/yum.repos.d/old/remi-php74.repo.org    2019-09-06 15:31:54.000000000 +0900
+++ /etc/yum.repos.d/remi-php74.repo    2020-01-15 03:24:06.687726309 +0900
@@ -6,7 +6,7 @@
 #baseurl=http://rpms.remirepo.net/enterprise/7/php74/$basearch/
 #mirrorlist=https://rpms.remirepo.net/enterprise/7/php74/httpsmirror
 mirrorlist=http://cdn.remirepo.net/enterprise/7/php74/mirror
-enabled=0
+enabled=1
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

```

ついでに、CentOSのBaseリポジトリから phpを除外しておく

```
 diff -u /etc/yum.repos.d/old/CentOS-Base.repo.org /etc/yum.repos.d/CentOS-Base.repo
--- /etc/yum.repos.d/old/CentOS-Base.repo.org   2019-09-05 22:05:40.000000000 +0900
+++ /etc/yum.repos.d/CentOS-Base.repo   2020-01-15 03:27:20.265297812 +0900
@@ -16,6 +16,7 @@
 #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+exclude=php*

 #released updates
 [updates]
@@ -24,6 +25,7 @@
 #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
+exclude=php*
```

インストールしていた php をアンインストールする

```
# for i in `rpm -qa |grep php`; do yum -y remove $i; done

```

php7.4を改めてインストールする

```
# yum install php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: www.ftp.ne.jp
 * extras: ftp.iij.ad.jp
 * remi-php74: ftp.riken.jp
 * updates: ftp.iij.ad.jp
base                                                                                                                                             | 3.6 kB  00:00:00
extras                                                                                                                                           | 2.9 kB  00:00:00
updates                                                                                                                                          | 2.9 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:7.4.1-1.el7.remi will be installed
--> Processing Dependency: php-cli(x86-64) = 7.4.1-1.el7.remi for package: php-7.4.1-1.el7.remi.x86_64
--> Processing Dependency: php-common(x86-64) = 7.4.1-1.el7.remi for package: php-7.4.1-1.el7.remi.x86_64
--> Running transaction check
---> Package php-cli.x86_64 0:7.4.1-1.el7.remi will be installed
---> Package php-common.x86_64 0:7.4.1-1.el7.remi will be installed
--> Processing Dependency: php-json(x86-64) = 7.4.1-1.el7.remi for package: php-common-7.4.1-1.el7.remi.x86_64
--> Running transaction check
---> Package php-json.x86_64 0:7.4.1-1.el7.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
 Package                                Arch                               Version                                         Repository                              Size
========================================================================================================================================================================
Installing:
 php                                    x86_64                             7.4.1-1.el7.remi                                remi-php74                             3.4 M
Installing for dependencies:
 php-cli                                x86_64                             7.4.1-1.el7.remi                                remi-php74                             5.1 M
 php-common                             x86_64                             7.4.1-1.el7.remi                                remi-php74                             1.1 M
 php-json                               x86_64                             7.4.1-1.el7.remi                                remi-php74                              68 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 9.7 M
Installed size: 41 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): php-7.4.1-1.el7.remi.x86_64.rpm                                                                                                           | 3.4 MB  00:00:00
(2/4): php-common-7.4.1-1.el7.remi.x86_64.rpm                                                                                                    | 1.1 MB  00:00:00
(3/4): php-cli-7.4.1-1.el7.remi.x86_64.rpm                                                                                                       | 5.1 MB  00:00:00
(4/4): php-json-7.4.1-1.el7.remi.x86_64.rpm                                                                                                      |  68 kB  00:00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                    12 MB/s | 9.7 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php-json-7.4.1-1.el7.remi.x86_64                                                                                                                     1/4
  Installing : php-common-7.4.1-1.el7.remi.x86_64                                                                                                                   2/4
  Installing : php-cli-7.4.1-1.el7.remi.x86_64                                                                                                                      3/4
  Installing : php-7.4.1-1.el7.remi.x86_64                                                                                                                          4/4
  Verifying  : php-common-7.4.1-1.el7.remi.x86_64                                                                                                                   1/4
  Verifying  : php-cli-7.4.1-1.el7.remi.x86_64                                                                                                                      2/4
  Verifying  : php-json-7.4.1-1.el7.remi.x86_64                                                                                                                     3/4
  Verifying  : php-7.4.1-1.el7.remi.x86_64                                                                                                                          4/4

Installed:
  php.x86_64 0:7.4.1-1.el7.remi

Dependency Installed:
  php-cli.x86_64 0:7.4.1-1.el7.remi                     php-common.x86_64 0:7.4.1-1.el7.remi                     php-json.x86_64 0:7.4.1-1.el7.remi

Complete!

```

モジュール確認

```
# httpd -M |grep php
 php7_module (shared)
```

モジュールを読み込ませるため httpdを再起動

```
# systemctl restart httpd.service
```

Web閲覧すると phpinfo の内容が表示された

# おわりに
- CentOS7でphp7を使用するならRemiリポジトリを使用するというのは知っていたが具体的にどうやるのか知らなかった事に気づかされた。
- remi-safeリポジトリにあるパッケージはどういった場合に使用するのか調べないといけない。