差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| ja:documentation:07_technical_annexes:18_php_8 [2023/02/15 06:49] – [Rocky Linux 8/AlmaLinux 8/RHEL 8] junichi | ja:documentation:07_technical_annexes:18_php_8 [2026/09/07 04:27] (現在) – 削除 - 外部編集 (不明な日付) 127.0.0.1 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== PHP 7 から PHP 8 へのアップグレード ====== | ||
| - | |||
| - | {{indexmenu_n> | ||
| - | |||
| - | [[ja: | ||
| - | |||
| - | ===== 前提条件 ===== | ||
| - | |||
| - | * Open a terminal window with the **root** | ||
| - | |||
| - | * **root** ユーザでターミナルウィンドウを開き、次のコマンドを入力します。 | ||
| - | |||
| - | < | ||
| - | |||
| - | php --version | ||
| - | |||
| - | </ | ||
| - | |||
| - | You will get an answer similar to the following: | ||
| - | |||
| - | 次のような応答が得られます。 | ||
| - | |||
| - | < | ||
| - | PHP 7.4.29 (cli) (built: Apr 12 2022 10:55:38) ( NTS ) | ||
| - | Copyright (c) The PHP Group | ||
| - | Zend Engine v3.4.0, Copyright (c) Zend Technologies | ||
| - | |||
| - | </ | ||
| - | |||
| - | * Perform a data backup procedure. See " | ||
| - | |||
| - | * データバックアップ手順を実施します。詳細は、[[: | ||
| - | |||
| - | ===== CentOS 7 ===== | ||
| - | |||
| - | * Configure the repositories: | ||
| - | |||
| - | * リポジトリを設定します。 | ||
| - | < | ||
| - | |||
| - | yum -y install https:// | ||
| - | yum -y install https:// | ||
| - | yum -y install yum-utils | ||
| - | yum-config-manager --disable ' | ||
| - | yum-config-manager --enable remi-php80 | ||
| - | |||
| - | </ | ||
| - | |||
| - | * Install PHP 8 and its dependencies: | ||
| - | |||
| - | * PHP 8 とその依存ファイルをインストールします。 | ||
| - | < | ||
| - | yum install -y \ | ||
| - | php php-mcrypt php-cli php-gd php-curl php-mysql \ | ||
| - | | ||
| - | | ||
| - | |||
| - | </ | ||
| - | |||
| - | < | ||
| - | systemctl restart httpd | ||
| - | |||
| - | </ | ||
| - | |||
| - | * Verify the version installed with: | ||
| - | |||
| - | * インストールされたバージョンを確認します。 | ||
| - | < | ||
| - | php --version | ||
| - | |||
| - | </ | ||
| - | |||
| - | You will get an answer similar to the following: | ||
| - | |||
| - | 次のような応答が得られます。 | ||
| - | < | ||
| - | PHP 8.0.19 (cli) (built: May 10 2022 08:07:35) ( NTS gcc x86_64 ) | ||
| - | Copyright (c) The PHP Group | ||
| - | Zend Engine v4.0.19, Copyright (c) Zend Technologies | ||
| - | |||
| - | </ | ||
| - | |||
| - | ===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== | ||
| - | |||
| - | * Configure the repositories: | ||
| - | |||
| - | * リポジトリを設定します。 | ||
| - | <code bash> | ||
| - | dnf module reset php -y | ||
| - | dnf module enable php: | ||
| - | |||
| - | </ | ||
| - | |||
| - | * Install PHP: | ||
| - | |||
| - | * PHP をインストールします。 | ||
| - | <code bash> | ||
| - | dnf install -y php php-fpm | ||
| - | |||
| - | </ | ||
| - | |||
| - | * Install dependencies: | ||
| - | |||
| - | * 依存ファイルをインストールします。 | ||
| - | <code bash> | ||
| - | dnf install -y \ | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | </ | ||
| - | |||
| - | * Restart php-fpm | ||
| - | |||
| - | * php-ftm を再起動します。 | ||
| - | |||
| - | <code bash> | ||
| - | systemctl restart php-fpm | ||
| - | </ | ||
| - | |||
| - | |||
| - | * Verify the version installed: | ||
| - | |||
| - | * インストールしたバージョンを確認します。 | ||
| - | <code bash> | ||
| - | php --version | ||
| - | |||
| - | </ | ||
| - | |||
| - | You will get an answer similar to the following: | ||
| - | |||
| - | 次のような応答が得られます。 | ||
| - | |||
| - | < | ||
| - | PHP 8.0.19 (cli) (built: May 10 2022 08:07:35) ( NTS gcc x86_64 ) | ||
| - | Copyright (c) The PHP Group | ||
| - | Zend Engine v4.0.19, Copyright (c) Zend Technologies | ||
| - | |||
| - | </ | ||
| - | |||
| - | [[ja: | ||
| - | |||