提供:あわWiki
移動先: 案内検索

ヘルプ:PHP 7.4 Remi's RPM repository をアップデート(CentOS8)

メインページ > ヘルプ:目次 > ヘルプ:自宅サーバー構築(CentOS8)  > PHP 7.4 Remi's RPM repository をアップデート(CentOS8)

  • 自宅サーバーで、動作確認しています。導入される方は自己責任で行ってください。
  • 導入済みの PHP 7.4 Remi's RPM repository を、アップデートする。
  • dnf用リポジトリ追加(CentOS8)を導入済みとします。

アップデート

有効になっている PHP のバージョンを確認

[root@host4 ~]# dnf module list php
CentOS-8 - AppStream
Name           Stream                 Profiles                             Summary                         
php            7.2 [d]                common [d], devel, minimal           PHP scripting language          
php            7.3                    common [d], devel, minimal           PHP scripting language          

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name           Stream                 Profiles                             Summary                         
php            remi-7.2               common [d], devel, minimal           PHP scripting language          
php            remi-7.3               common [d], devel, minimal           PHP scripting language          
php            remi-7.4 [e]           common [d], devel, minimal           PHP scripting language          
php            remi-8.0               common [d], devel, minimal           PHP scripting language          

ヒント: [d]efault, [e]nabled, [x]disabled, [i]nstalled

remi-7.4 [e] に、なっていることを確認する。

Stream切り替え

remi-7.4 [e] が、変わっている場合のみ実行する。

[root@host4 ~]# dnf module reset php

[root@host4 ~]# dnf module enable php:remi-7.4

アップデート実行

[root@host4 ~]# dnf module update php:remi-7.4

インストール済みパッケージ確認

[root@host4 ~]# rpm -qa | grep php
php-opcache-7.4.11-1.el8.remi.x86_64
php-7.4.11-1.el8.remi.x86_64
php-pecl-xdebug-2.9.8-1.el8.remi.7.4.x86_64
php-common-7.4.11-1.el8.remi.x86_64
php-sodium-7.4.11-1.el8.remi.x86_64
php-process-7.4.11-1.el8.remi.x86_64
php-cli-7.4.11-1.el8.remi.x86_64
oniguruma5php-6.9.5+rev1-3.el8.remi.x86_64
php-mysqlnd-7.4.11-1.el8.remi.x86_64
php-fedora-autoloader-1.0.1-2.el8.remi.noarch
php-pecl-apcu-5.1.19-1.el8.remi.7.4.x86_64
php-pdo-7.4.11-1.el8.remi.x86_64
php-fpm-7.4.11-1.el8.remi.x86_64
php-mbstring-7.4.11-1.el8.remi.x86_64
php-pecl-mcrypt-1.0.3-1.el8.remi.7.4.x86_64
php-gd-7.4.11-1.el8.remi.x86_64
php-pear-1.10.12-2.el8.remi.noarch
php-json-7.4.11-1.el8.remi.x86_64
php-gmp-7.4.11-1.el8.remi.x86_64
php-xml-7.4.11-1.el8.remi.x86_64
php-devel-7.4.11-1.el8.remi.x86_64

php-fpmの再起動

[root@host4 ~]# systemctl restart php-fpm

Webサーバー再起動

[root@host4 ~]# systemctl restart httpd

phpバージョン確認

[root@host4 ~]# php -v
PHP 7.4.11 (cli) (built: Sep 29 2020 10:17:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.11, Copyright (c), by Zend Technologies
    with Xdebug v2.9.8, Copyright (c) 2002-2020, by Derick Rethans