PHP 7.4 : インストール2021/08/02 |
PHP 7.4 をインストールします。
|
|
[1] | 現在、有効になっている PHP のバージョンを確認してインストールします。 |
[root@dlp ~]# dnf module list php Rocky Linux 8 - AppStream Name Stream Profiles Summary php 7.2 [d] common [d], devel, minimal PHP scripting language php 7.3 [e] common [d], devel, minimal PHP scripting language php 7.4 common [d], devel, minimal PHP scripting language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled # 他バージョンが有効な場合は一旦リセットして有効バージョンを切り替え [root@dlp ~]# dnf module -y reset php [root@dlp ~]# dnf module -y enable php:7.4
# PHP 7.4 を指定してインストール [root@dlp ~]# dnf module -y install php:7.4/common Dependencies resolved. ================================================================================ Package Architecture Version Repository Size ================================================================================ Enabling module streams: php 7.4 Transaction Summary ================================================================================ Complete! [root@dlp ~]# dnf module -y install php:7.4/common Last metadata expiration check: 0:38:49 ago on Mon 02 Aug 2021 11:02:46 AM JST. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Upgrading: php-cli x86_64 7.4.6-4.module+el8.4.0+415+e936cba3 appstream 3.1 M php-common x86_64 7.4.6-4.module+el8.4.0+415+e936cba3 appstream 694 k php-fpm x86_64 7.4.6-4.module+el8.4.0+415+e936cba3 appstream 1.6 M php-json x86_64 7.4.6-4.module+el8.4.0+415+e936cba3 appstream 73 k php-mbstring x86_64 7.4.6-4.module+el8.4.0+415+e936cba3 appstream 482 k php-xml x86_64 7.4.6-4.module+el8.4.0+415+e936cba3 appstream 173 k Installing module profiles: php/common Transaction Summary ================================================================================ Upgrade 6 Packages ..... .....[root@dlp ~]# php -v PHP 7.4.6 (cli) (built: May 12 2020 08:09:15) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies # テストスクリプトを作成して動作確認 [root@dlp ~]# echo "<?php echo 'PHP 7.4 Test Page'.\"\n\"; ?>" > php_test.php [root@dlp ~]# php php_test.php PHP 7.4 Test Page |
Sponsored Link |
|