Red Hat® Enterprise Linux® 8にphp 7.3をインストールしてみました。
3.2. リポジトリー
https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html/8.0_release_notes/repositories
Red Hat Enterprise Linux 8 は、2 つのメインリポジトリーで配布されています。
・BaseOS
・AppStream
基本的な RHEL インストールにはどちらのリポジトリーも必要で、すべての RHEL サブスクリプションで利用できます。
Red Hat Enterprise Linux 8 向けパッケージの一覧
https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html-single/package_manifest/index
この一覧を見るとAppStreamモジュールでphp 7.2と7.3がインストールできそうです。
環境
・Red Hat Enterprise Linux release 8.2 (Ootpa)
・Kernel 4.18.0-193.14.3.el8_2.x86_64
・Red Hat Developer Subscription
- デフォルトでインストールされるのはphp 7.2
- php 7.3をインストール
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
[root@rhel8 ~]# dnf info php Updating Subscription Management repositories. Available Packages Name : php Version : 7.2.24 Release : 1.module+el8.2.0+4601+7c76a223 Architecture : x86_64 Size : 1.5 M Source : php-7.2.24-1.module+el8.2.0+4601+7c76a223.src.rpm Repository : rhel-8-for-x86_64-appstream-rpms Summary : PHP scripting language for creating dynamic web sites URL : http://www.php.net/ License : PHP and Zend and BSD and MIT and ASL 1.0 Description : PHP is an HTML-embedded scripting language. PHP attempts to make : it easy for developers to write dynamically generated web pages. : PHP also offers built-in database integration for several : commercial and non-commercial database management systems, so : writing a database-enabled webpage with PHP is fairly simple. The : most common use of PHP coding is probably as a replacement for : CGI scripts. : : The php package contains the module (often referred to as : mod_php) which adds support for the PHP language to Apache HTTP : Server. |
4.4. 例: アプリケーションのデフォルト以外のストリームのインストール
https://access.redhat.com/documentation/ja-jp/red_hat_enterprise_linux/8/html/installing_managing_and_removing_user-space_components/example-installing-a-non-default-stream-of-an-application_installing-rhel-8-content
1 2 3 4 5 6 7 8 |
[root@rhel8 ~]# dnf module list php Updating Subscription Management repositories. Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) Name Stream Profiles Summary php 7.2 [d] common [d], devel, minimal PHP scripting language php 7.3 common [d], devel, minimal PHP scripting language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
[root@rhel8 ~]# dnf module install php:7.3 Updating Subscription Management repositories. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing group/module packages: php-cli x86_64 7.3.5-5.module+el8.1.0+4560+e0eee7d6 rhel-8-for-x86_64-appstream-rpms 3.0 M php-common x86_64 7.3.5-5.module+el8.1.0+4560+e0eee7d6 rhel-8-for-x86_64-appstream-rpms 663 k php-fpm x86_64 7.3.5-5.module+el8.1.0+4560+e0eee7d6 rhel-8-for-x86_64-appstream-rpms 1.6 M php-json x86_64 7.3.5-5.module+el8.1.0+4560+e0eee7d6 rhel-8-for-x86_64-appstream-rpms 73 k php-mbstring x86_64 7.3.5-5.module+el8.1.0+4560+e0eee7d6 rhel-8-for-x86_64-appstream-rpms 610 k php-xml x86_64 7.3.5-5.module+el8.1.0+4560+e0eee7d6 rhel-8-for-x86_64-appstream-rpms 188 k Installing dependencies: httpd-filesystem noarch 2.4.37-21.module+el8.2.0+5008+cca404a3 rhel-8-for-x86_64-appstream-rpms 36 k nginx-filesystem noarch 1:1.14.1-9.module+el8.0.0+4108+af250afe rhel-8-for-x86_64-appstream-rpms 24 k Installing module profiles: php/common Enabling module streams: httpd 2.4 nginx 1.14 php 7.3 Transaction Summary ================================================================================ Install 8 Packages Total download size: 6.2 M Installed size: 25 M Is this ok [y/N]: y Downloading Packages: (1/8): nginx-filesystem-1.14.1-9.module+el8.0.0 5.4 kB/s | 24 kB 00:04 (2/8): php-json-7.3.5-5.module+el8.1.0+4560+e0e 16 kB/s | 73 kB 00:04 (3/8): php-common-7.3.5-5.module+el8.1.0+4560+e 142 kB/s | 663 kB 00:04 (4/8): php-xml-7.3.5-5.module+el8.1.0+4560+e0ee 717 kB/s | 188 kB 00:00 (5/8): php-fpm-7.3.5-5.module+el8.1.0+4560+e0ee 3.8 MB/s | 1.6 MB 00:00 (6/8): php-cli-7.3.5-5.module+el8.1.0+4560+e0ee 6.2 MB/s | 3.0 MB 00:00 (7/8): php-mbstring-7.3.5-5.module+el8.1.0+4560 3.3 MB/s | 610 kB 00:00 (8/8): httpd-filesystem-2.4.37-21.module+el8.2. 217 kB/s | 36 kB 00:00 -------------------------------------------------------------------------------- Total 1.2 MB/s | 6.2 MB 00:05 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : php-common-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_ 1/8 Running scriptlet: httpd-filesystem-2.4.37-21.module+el8.2.0+5008+cca40 2/8 Installing : httpd-filesystem-2.4.37-21.module+el8.2.0+5008+cca40 2/8 Running scriptlet: nginx-filesystem-1:1.14.1-9.module+el8.0.0+4108+af25 3/8 Installing : nginx-filesystem-1:1.14.1-9.module+el8.0.0+4108+af25 3/8 Installing : php-fpm-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 4/8 Running scriptlet: php-fpm-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 4/8 Installing : php-json-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 5/8 Installing : php-cli-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 6/8 Installing : php-xml-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 7/8 Installing : php-mbstring-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x8 8/8 Running scriptlet: php-mbstring-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x8 8/8 Running scriptlet: php-fpm-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 8/8 Verifying : nginx-filesystem-1:1.14.1-9.module+el8.0.0+4108+af25 1/8 Verifying : php-json-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 2/8 Verifying : php-common-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_ 3/8 Verifying : php-cli-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 4/8 Verifying : php-fpm-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 5/8 Verifying : php-xml-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 6/8 Verifying : php-mbstring-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x8 7/8 Verifying : httpd-filesystem-2.4.37-21.module+el8.2.0+5008+cca40 8/8 Installed products updated. Installed: httpd-filesystem-2.4.37-21.module+el8.2.0+5008+cca404a3.noarch nginx-filesystem-1:1.14.1-9.module+el8.0.0+4108+af250afe.noarch php-cli-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 php-common-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 php-fpm-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 php-json-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 php-mbstring-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 php-xml-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64 Complete! |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
[root@rhel8 ~]# php -v PHP 7.3.5 (cli) (built: Apr 30 2019 08:37:17) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.5, Copyright (c) 1998-2018 Zend Technologies [root@rhel8 ~]# dnf module list php Updating Subscription Management repositories. Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) Name Stream Profiles Summary php 7.2 [d] common [d], devel, minimal PHP scripting language php 7.3 [e] common [d] [i], devel, minimal PHP scripting language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled [root@rhel8 ~]# dnf info php Updating Subscription Management repositories. Available Packages Name : php Version : 7.3.5 Release : 5.module+el8.1.0+4560+e0eee7d6 Architecture : x86_64 Size : 1.5 M Source : php-7.3.5-5.module+el8.1.0+4560+e0eee7d6.src.rpm Repository : rhel-8-for-x86_64-appstream-rpms Summary : PHP scripting language for creating dynamic web sites URL : http://www.php.net/ License : PHP and Zend and BSD and MIT and ASL 1.0 and NCSA Description : PHP is an HTML-embedded scripting language. PHP attempts to make : it easy for developers to write dynamically generated web pages. : PHP also offers built-in database integration for several : commercial and non-commercial database management systems, so : writing a database-enabled webpage with PHP is fairly simple. The : most common use of PHP coding is probably as a replacement for : CGI scripts. : : The php package contains the module (often referred to as : mod_php) which adds support for the PHP language to Apache HTTP : Server. |
Module Command
https://dnf.readthedocs.io/en/latest/command_ref.html#module-command