2020
12
Nov

IT技術, サーバ

PHP7.3から7.4にバージョンアップした話

忘備録
WordPressのサイトヘルス画面にphp7.3が古いと警告表示があった。
7.3が古いとは・・・個人サーバなので気楽に7.4にバージョンアップしてみた。
その時の作業メモを記載する。

現在のリポジトリの確認
[root@alpha ~]# yum repolist all |grep php
remi-php54 Remi's PHP 5.4 RPM repositor disabled
remi-php55 Remi's PHP 5.5 RPM repositor disabled
remi-php55-debuginfo/x86_64 Remi's PHP 5.5 RPM repositor disabled
remi-php56 Remi's PHP 5.6 RPM repositor disabled
remi-php56-debuginfo/x86_64 Remi's PHP 5.6 RPM repositor disabled
remi-php70 Remi's PHP 7.0 RPM repositor disabled
remi-php70-debuginfo/x86_64 Remi's PHP 7.0 RPM repositor disabled
remi-php70-test Remi's PHP 7.0 test RPM repo disabled
remi-php70-test-debuginfo/x86_64 Remi's PHP 7.0 test RPM repo disabled
remi-php71 Remi's PHP 7.1 RPM repositor disabled
remi-php71-debuginfo/x86_64 Remi's PHP 7.1 RPM repositor disabled
remi-php71-test Remi's PHP 7.1 test RPM repo disabled
remi-php71-test-debuginfo/x86_64 Remi's PHP 7.1 test RPM repo disabled
remi-php72 Remi's PHP 7.2 RPM repositor disabled
remi-php72-debuginfo/x86_64 Remi's PHP 7.2 RPM repositor disabled
remi-php72-test Remi's PHP 7.2 test RPM repo disabled
remi-php72-test-debuginfo/x86_64 Remi's PHP 7.2 test RPM repo disabled
!remi-php73 Remi's PHP 7.3 RPM repositor disabled
remi-php73-debuginfo/x86_64 Remi's PHP 7.3 RPM repositor disabled
remi-php73-test Remi's PHP 7.3 test RPM repo disabled
remi-php73-test-debuginfo/x86_64 Remi's PHP 7.3 test RPM repo disabled
remi-php74 Remi's PHP 7.4 RPM repositor disabled
remi-php74-debuginfo/x86_64 Remi's PHP 7.4 RPM repositor disabled
remi-php74-test Remi's PHP 7.4 test RPM repo disabled
remi-php74-test-debuginfo/x86_64 Remi's PHP 7.4 test RPM repo disabled
remi-php80 Remi's PHP 8.0 RPM repositor disabled
remi-php80-debuginfo/x86_64 Remi's PHP 8.0 RPM repositor disabled
remi-php80-test Remi's PHP 8.0 test RPM repo disabled
remi-php80-test-debuginfo/x86_64 Remi's PHP 8.0 test RPM repo disabled


設定されていないので、7.4リポジトリを有効化
vi /etc/yum.repos.d/remi-php74.repo
[remi-php74]
enabled=0

enabled=1

PHP7.3削除
[root@alpha ~]# yum remove php php-*



Removed:
php.x86_64 0:7.3.12-1.el7.remi
php-cli.x86_64 0:7.3.12-1.el7.remi
php-common.x86_64 0:7.3.12-1.el7.remi
php-gd.x86_64 0:7.3.12-1.el7.remi
php-json.x86_64 0:7.3.12-1.el7.remi
php-mbstring.x86_64 0:7.3.12-1.el7.remi
php-mysqlnd.x86_64 0:7.3.12-1.el7.remi
php-pdo.x86_64 0:7.3.12-1.el7.remi
php-pecl-mcrypt.x86_64 0:1.0.3-1.el7.remi.7.3
php-pecl-mysql.x86_64 0:1.0.0-0.20.20180226.647c933.el7.remi.7.3
php-pecl-zip.x86_64 0:1.16.1-1.el7.remi.7.3
php-xml.x86_64 0:7.3.12-1.el7.remi
php-xmlrpc.x86_64 0:7.3.12-1.el7.remi
Dependency Removed:
php73-pecl-imagick.x86_64 0:3.4.4-3.el7.ius
Complete!



PHP7.4インストール
[root@alpha ~]# yum install php php-common php-gd php-mbstring php-pdo php-mysqlnd php-xml php-mcrypt php-pgsql php-pear php-imap
Installed:
php.x86_64 0:7.4.12-1.el7.remi
php-common.x86_64 0:7.4.12-1.el7.remi
php-gd.x86_64 0:7.4.12-1.el7.remi
php-imap.x86_64 0:7.4.12-1.el7.remi
php-mbstring.x86_64 0:7.4.12-1.el7.remi
php-mysqlnd.x86_64 0:7.4.12-1.el7.remi
php-pdo.x86_64 0:7.4.12-1.el7.remi
php-pear.noarch 1:1.10.12-2.el7.remi
php-pecl-mcrypt.x86_64 0:1.0.3-1.el7.remi.7.4
php-pgsql.x86_64 0:7.4.12-1.el7.remi
php-xml.x86_64 0:7.4.12-1.el7.remi
Dependency Installed:
libc-client.x86_64 0:2007f-16.el7
libsodium.x86_64 0:1.0.18-1.el7
php-cli.x86_64 0:7.4.12-1.el7.remi
php-fedora-autoloader.noarch 0:1.0.1-2.el7
php-json.x86_64 0:7.4.12-1.el7.remi
php-process.x86_64 0:7.4.12-1.el7.remi
php-sodium.x86_64 0:7.4.12-1.el7.remi
postgresql-libs.x86_64 0:9.2.24-4.el7_8
Complete!

apache再起動
[root@alpha ~]# systemctl restart httpd

ツール⇒サイトヘルスを見ると2件改善推奨あり。
オプションのモジュールzipがインストールされていないか、無効化されています。
[root@alpha etc]# yum install php-pecl-zip

“オプションのモジュール imagick がインストールされていないか、無効化されています。”
[root@alpha etc]# yum install php-imagick



 

コメント

  1. この記事へのコメントはありません。

  1. この記事へのトラックバックはありません。