php7.3にアップデート

wordpressのPHPバージョンアップの忠告が出たので、前回のphp7.1からphp7.3にアップデートした。

◇既存のインストールを確認
%> rpm -qa | grep rem
%> yum list installed |grep php

◇削除
%> yum remove -y php-*
読み込んだプラグイン:fastestmirror, langpacks
依存性の解決をしています
–> トランザクションの確認を実行しています。
—> パッケージ php.x86_64 0:7.1.33-8.el7.remi を 削除
・・・
–> 依存性解決を終了しました。

依存性を解決しました
・・・
削除中:
・・・
トランザクションの要約
=============================================
削除 19 パッケージ

インストール容量: 51 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
削除中 : 1:php-pear-1.10.12-1.el7.remi.noarch 1/19
・・・
警告: /etc/php.ini は /etc/php.ini.rpmsave として保存されました。
※↑後の「extension=imagick.so」の追加するときに、以前追加したときのバックアップファイルとして保存される。
・・・

削除しました:
・・・
完了しました!

◇削除されなかったものを確認
%> rpm -qa | grep rem
remi-release-7.7-2.el7.remi.noarch
libicu62-62.2-1.el7.remi.x86_64
gd-last-2.3.0-2.el7.remi.x86_64
libwebp7-1.0.3-1.el7.remi.x86_64

◇残りを削除
%> yum erase remi-release-7.7-2.el7.remi.noarch libicu62-62.2-1.el7.remi.x86_64 gd-last-2.3.0-2.el7.remi.x86_64 libwebp7-1.0.3-1.el7.remi.x86_64
・・・
完了しました!

◇php7.3でインストール
参考:https://www.suzu6.net/posts/152-centos7-php-73/

%> rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
%> yum -y install –enablerepo=epel,remi,remi-php73 php php-devel php-mbstring php-pdo php-gd php-xml php-pecl-mcrypt php-gmp php-mysqlnd php-opcache php-pecl-apcu php-intl php-pear php-bcmath

◇#WordPressのサイトヘルスでimagickのインストールを指摘されたため追加。
参考:http://bashalog.c-brains.jp/17/10/17-121319.php
※php7.3インストール対応済み: php-devel …下の①の実行でphpizeがないって言われないように、インストールが必要。
%> yum -y install ImageMagick-devel …下の①の実行で必要なImageMagickをインストール
%> pecl install imagick    …①imagickインストール
%> vi /etc/php.ini #php.iniに”extension=imagick.so”を追加する。
%> systemctl restart httpd.service #再起動

◇バージョンの確認
%> php -v
PHP 7.3.20 (cli) (built: Jul 7 2020 07:53:49) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.20, Copyright (c) 1998-2018 Zend Technologies

%> rpm -qa | grep php
php-pear-1.10.12-1.el7.remi.noarch
php-intl-7.3.20-1.el7.remi.x86_64
php-pdo-7.3.20-1.el7.remi.x86_64
php-gmp-7.3.20-1.el7.remi.x86_64
php-cli-7.3.20-1.el7.remi.x86_64
php-pecl-mcrypt-1.0.3-1.el7.remi.7.3.x86_64
php-mysqlnd-7.3.20-1.el7.remi.x86_64
php-process-7.3.20-1.el7.remi.x86_64
php-mbstring-7.3.20-1.el7.remi.x86_64
php-pecl-apcu-5.1.18-1.el7.remi.7.3.x86_64
php-common-7.3.20-1.el7.remi.x86_64
oniguruma5php-6.9.5+rev1-2.el7.remi.x86_64
php-devel-7.3.20-1.el7.remi.x86_64
php-xml-7.3.20-1.el7.remi.x86_64
php-bcmath-7.3.20-1.el7.remi.x86_64
php-fedora-autoloader-1.0.1-2.el7.remi.noarch
php-opcache-7.3.20-1.el7.remi.x86_64
php-json-7.3.20-1.el7.remi.x86_64
php-7.3.20-1.el7.remi.x86_64
php-gd-7.3.20-1.el7.remi.x86_64

%> rpm -qa | grep rem
php-pear-1.10.12-1.el7.remi.noarch
php-intl-7.3.20-1.el7.remi.x86_64
gd-last-2.3.0-2.el7.remi.x86_64
remi-release-7.7-2.el7.remi.noarch
php-pdo-7.3.20-1.el7.remi.x86_64
php-gmp-7.3.20-1.el7.remi.x86_64
php-cli-7.3.20-1.el7.remi.x86_64
libicu62-62.2-1.el7.remi.x86_64
php-pecl-mcrypt-1.0.3-1.el7.remi.7.3.x86_64
libwebp7-1.0.3-1.el7.remi.x86_64
php-mysqlnd-7.3.20-1.el7.remi.x86_64
php-process-7.3.20-1.el7.remi.x86_64
php-mbstring-7.3.20-1.el7.remi.x86_64
php-pecl-apcu-5.1.18-1.el7.remi.7.3.x86_64
php-common-7.3.20-1.el7.remi.x86_64
oniguruma5php-6.9.5+rev1-2.el7.remi.x86_64
php-devel-7.3.20-1.el7.remi.x86_64
php-xml-7.3.20-1.el7.remi.x86_64
php-bcmath-7.3.20-1.el7.remi.x86_64
php-fedora-autoloader-1.0.1-2.el7.remi.noarch
php-opcache-7.3.20-1.el7.remi.x86_64
php-json-7.3.20-1.el7.remi.x86_64
php-7.3.20-1.el7.remi.x86_64
php-gd-7.3.20-1.el7.remi.x86_64

UNIX

Posted by 伊藤 輝樹