差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン最新のリビジョン両方とも次のリビジョン | ||
ja:documentation:07_technical_annexes:18_php_8 [2022/06/10 22:39] – [Upgrading from PHP 7 to PHP 8] junichi | ja:documentation:07_technical_annexes:18_php_8 [2023/03/01 08:09] – [CentOS 7] junichi | ||
---|---|---|---|
行 5: | 行 5: | ||
[[ja: | [[ja: | ||
- | ===== Prerequisites | + | ===== 前提条件 |
* Open a terminal window with the **root** | * Open a terminal window with the **root** | ||
+ | |||
+ | * **root** ユーザでターミナルウィンドウを開き、次のコマンドを入力します。 | ||
+ | |||
< | < | ||
行 15: | 行 18: | ||
You will get an answer similar to the following: | You will get an answer similar to the following: | ||
+ | |||
+ | 次のような応答が得られます。 | ||
< | < | ||
行 25: | 行 30: | ||
* Perform a data backup procedure. See " | * Perform a data backup procedure. See " | ||
+ | * データバックアップ手順を実施します。詳細は、[[: | ||
+ | |||
===== CentOS 7 ===== | ===== CentOS 7 ===== | ||
* Configure the repositories: | * Configure the repositories: | ||
+ | |||
+ | * リポジトリを設定します。 | ||
< | < | ||
行 40: | 行 49: | ||
* Install PHP 8 and its dependencies: | * Install PHP 8 and its dependencies: | ||
+ | * PHP 8 とその依存ファイルをインストールします。 | ||
< | < | ||
yum install -y \ | yum install -y \ | ||
行 45: | 行 55: | ||
| | ||
| | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | systemctl restart httpd | ||
</ | </ | ||
行 50: | 行 65: | ||
* Verify the version installed with: | * Verify the version installed with: | ||
+ | * インストールされたバージョンを確認します。 | ||
< | < | ||
php --version | php --version | ||
行 57: | 行 73: | ||
You will get an answer similar to the following: | 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 ) | PHP 8.0.19 (cli) (built: May 10 2022 08:07:35) ( NTS gcc x86_64 ) | ||
行 63: | 行 80: | ||
</ | </ | ||
+ | |||
+ | ===== RHEL 7 ===== | ||
+ | |||
+ | <WRAP center round tip 75%> | ||
+ | |||
+ | To upgrade to PHP 8 in RHEL 7 [[https:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 75%> | ||
+ | |||
+ | RHEL 7 で PHP 8 にアップグレードするには、[[https:// | ||
+ | |||
+ | </ | ||
===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== | ===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== | ||
行 68: | 行 99: | ||
* Configure the repositories: | * Configure the repositories: | ||
- | < | + | * リポジトリを設定します。 |
+ | < | ||
dnf module reset php -y | dnf module reset php -y | ||
dnf module enable php: | dnf module enable php: | ||
行 76: | 行 108: | ||
* Install PHP: | * Install PHP: | ||
- | < | + | * PHP をインストールします。 |
+ | < | ||
dnf install -y php php-fpm | dnf install -y php php-fpm | ||
行 83: | 行 116: | ||
* Install dependencies: | * Install dependencies: | ||
- | < | + | * 依存ファイルをインストールします。 |
+ | < | ||
dnf install -y \ | dnf install -y \ | ||
| | ||
行 91: | 行 125: | ||
</ | </ | ||
+ | |||
+ | * Restart php-fpm | ||
+ | |||
+ | * php-ftm を再起動します。 | ||
+ | |||
+ | <code bash> | ||
+ | systemctl restart php-fpm | ||
+ | </ | ||
+ | |||
* Verify the version installed: | * Verify the version installed: | ||
- | < | + | * インストールしたバージョンを確認します。 |
+ | < | ||
php --version | php --version | ||
行 100: | 行 144: | ||
You will get an answer similar to the following: | You will get an answer similar to the following: | ||
+ | |||
+ | 次のような応答が得られます。 | ||
< | < |