Red Hat Enterprise Linux 10 のEC2インスタンスを起動してみた

Red Hat Enterprise Linux 10 のEC2インスタンスを起動してみた

使用しようとしているミドルウェアがサポートしていることを確認した上で採用しよう
Clock Icon2025.06.06

Red Hat Enterprise Linux 10を使いたいな

こんにちは、のんピ(@non____97)です。

皆さんはRed Hat Enterprise Linux 10(以降RHEL 10)を使いたいなと思ったことはありますか? 私はあります。

構築のタイミング的に可能であれば少しでもEOLが長い、最新のOSを使いたいところです。

2025/5/20とつい先日、RHEL 10がリリースされました。

https://www.redhat.com/en/about/press-releases/red-hat-introduces-rhel-10

EC2インスタンスでも早く使いたいなと思っていると、5/30に早くも使えるようになっていました。

https://aws.amazon.com/about-aws/whats-new/2025/05/red-hat-enterprise-linux-aws/

しかも、ただのRHEL 10ではなく、Red Hat Enterprise Linux for AWS(RHEL for AWS)と呼称され、AWS CLIも使用できるような紹介がされていました。

Red Hat Enterprise Linux (RHEL) for AWS, starting with RHEL 10, is now generally available, combining Red Hat’s enterprise-grade Linux software with native AWS integration. RHEL for AWS is built to achieve optimum performance of RHEL running on AWS. This offering features pre-tuned images with AWS-specific performance profiles, built-in Amazon CloudWatch telemetry, integrated AWS Command Line Interface (CLI), image mode using container-native tooling, enhanced security from boot to runtime, and optimized networking with Elastic Network Adapter (ENA) support.

これは気になりますね。

以降RHEL 10および、RHEL for AWSについて紹介します。

Red Hat Enterprise Linux 10のサポート期限

まず、RHEL 10のサポート期限です。

537_RHEL_10_Life_Cycle_0525.png

抜粋 : Red Hat Enterprise Linux Life Cycle | Red Hat Customer Portal

ポイントを抜粋すると以下のとおりです。

  • フルサポート期限 : 2030/5/31
  • メンテナンスサポート期限 : 2035/5/31
  • ELS期限 : 2038/5/31

特にサポートのライフサイクルはRHEL 8とRHEL 9と変わりありません。偶数マイナーバージョンのみEUSの提供があるのも同じです。

パッケージごとのライフサイクルはOSサポートとは別です。

8からデフォルトでリポジトリはBaseOSとAppStreamの2つが設定されています。

BaseOSはOSサポートと同様のライフサイクルでサポートが適用されます。

AppStreamから提供されているパッケージについてはパッケージによってライフサイクルが設定されています。

具体的なパッケージごとのライフサイクルは以下情報を確認しましょう。

  • RHEL 10 Application Streams Release Life Cycle
  • RHEL 10 Full Life Application Streams Release Life Cycle
  • RHEL 10 Rolling Application Streams Release Life Cycle

https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle#rhel10_application_streams

「そもそもどのパッケージがどのリポジトリに含まれるか知りたい」という場合は以下Red Hat公式ドキュメントを確認しましょう。

https://docs.redhat.com/ja/documentation/red_hat_enterprise_linux/10/html/package_manifest/content#Repositories

Red Hat Enterprise Linux 9からRed Hat Enterprise Linux 10への変更点

RHEL 9とRHEL 10の変更点は以下で紹介されています。

https://docs.redhat.com/ja/documentation/red_hat_enterprise_linux/10/html/considerations_in_adopting_rhel_10/index

個人的にEC2インスタンスとして動作させる上で気になった点は以下のとおりです。

  • AppStreamsでモジュールコンテンツとしてパッケージが提供されなくなった
  • Grafanaのバージョンが9系から10系へ
  • プログラミングの言語
    • Python 3.12
    • Ruby 3.3
    • Node.js 22
    • Perl 5.40
    • PHP 8.3
  • Webサーバー
    • Apache HTTP Server 2.4.63
    • nginx 1.26
  • DB
    • MariaDB 10.11
    • MySQL 8.4
    • PostgreSQL 16
    • Valkey 8.0
  • Resilient Storage Add-OおよびGF2のサポート終了
    • 共有ストレージを用意するためには別のミドルウェアを用意する必要がある
  • 以下パッケージが含まれなくなる
    • sendmail
    • redis
  • AIツールであるRHEL Lightspeedを搭載したコマンドラインアシスタントが利用可能
  • ifcfg 形式のネットワーク設定ファイルのサポートが削除
  • dhclient ユーティリティーが削除
  • ブータブルコンテナイメージとして起動が可能 (Image mode for RHEL)

Image mode for RHELの説明は以下記事が分かりやすいです。

https://zenn.dev/orimanabu/articles/try-rhel-image-mode

Red Hat Enterprise Linux for AWSについて

続いて、Red Hat Enterprise Linux for AWSについてです。

RHEL for AWSはAWS向けにチューニングされたRHELのようです。

The power of Red Hat Enterprise Linux, optimized for AWS

Now available with Red Hat Enterprise Linux 10 and 9.6, Red Hat Enterprise Linux for AWS is optimized for integration with AWS services. Access the latest in Linux innovation with pre-tuned, ready-to-run images to simplify how you build, deploy, and manage AWS workloads. This offering allows you to monitor Red Hat Enterprise Linux within AWS resources and applications, as well as employ built-in management tools to speed operations.

Migrate your existing Red Hat Enterprise Linux subscription to the cloud or choose to pay-as-you-go to simplify the process for ephemeral instances. Red Hat Enterprise Linux for AWS also qualifies for Amazon Web Services Enterprise Discount Program (EDP) as well as Red Hat’s Hybrid Committed Spend program for procurement flexibility.

Red Hat Enterprise Linux for AWS

具体的には、Red Hat公式ブログにて、AWS CLIがプリインストールされていたり、OpenTelemetry Collectorを用いてCloudWatch Logsと連携をさせたりということが紹介されていました。

Integrated AWS tooling

RHEL for AWS includes native AWS integrations to make cloud operations more seamless. Features include:

  • AWS CLI (awscli2) is preinstalled for easy automation
  • CloudWatch integration allows you to view your RHEL instances alongside the rest of your AWS infrastructure
  • Performance and security settings are tailored specifically for AWS EC2 environments

These additions mean better visibility, stronger automation capabilities, and more efficient cloud operations right out of the box.

Introducing Red Hat Enterprise Linux for AWS: Optimized, integrated and available now

個人的にはAWS CLIがプリインストールされているのが嬉しいですね。

SSM Agentについては言及ありませんが、どうでしょうか。後ほど確認してみましょう。

EC2インスタンスの起動

所有者がAmazonのイメージから起動

それではRHEL 10のEC2インスタンスを起動させます。

起動に使用するOSイメージは以下の2パターンで試します。

  1. 所有者がAmazonのイメージ
  2. 所有者がRed Hatのイメージ

後者のパターンについてはAWS Marketplaceから従量課金で購入できるようになったため、かなり検証がしやすくなりました。

AWSで購入できるRHELサブスクリプションについては以下記事が非常に参考になります。

https://rheb.hatenablog.com/entry/202505-rhel-subscription-aws

まず、所有者がAmazonのイメージから起動します。

使用したイメージは以下のとおりです。

>  aws ec2 describe-images --image-ids ami-03a13a09a711d3871
{
    "Images": [
        {
            "PlatformDetails": "Red Hat Enterprise Linux",
            "UsageOperation": "RunInstances:0010",
            "BlockDeviceMappings": [
                {
                    "Ebs": {
                        "DeleteOnTermination": true,
                        "SnapshotId": "snap-0fa00a53cadcc1a6d",
                        "VolumeSize": 10,
                        "VolumeType": "gp3",
                        "Encrypted": false
                    },
                    "DeviceName": "/dev/sda1"
                }
            ],
            "Description": "Provided by Red Hat, Inc.",
            "EnaSupport": true,
            "Hypervisor": "xen",
            "ImageOwnerAlias": "amazon",
            "Name": "RHEL-10.0.0_HVM_GA-20250423-x86_64-0-Hourly2-GP3",
            "RootDeviceName": "/dev/sda1",
            "RootDeviceType": "ebs",
            "SriovNetSupport": "simple",
            "VirtualizationType": "hvm",
            "BootMode": "uefi-preferred",
            "DeprecationTime": "2027-05-07T14:49:56.000Z",
            "ImageId": "ami-03a13a09a711d3871",
            "ImageLocation": "amazon/RHEL-10.0.0_HVM_GA-20250423-x86_64-0-Hourly2-GP3",
            "State": "available",
            "OwnerId": "309956199498",
            "CreationDate": "2025-05-07T14:49:56.000Z",
            "Public": true,
            "Architecture": "x86_64",
            "ImageType": "machine"
        }
    ]
}

起動したEC2インスタンスにSSH接続して、AWS CLIとSSM Agentがプリインストールされているか確認しましょう。

$ which aws
/usr/bin/which: no aws in (/home/ec2-user/.local/bin:/home/ec2-user/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)

$ systemctl status amazon-ssm-agent
Unit amazon-ssm-agent.service could not be found.

はい、どちらもインストールされていません。

SSM Agentはしょうがないとして、AWS CLIがインストールされていないのが気になりますね。

どちらも手動でインストールしてみましょう。

$ sudo dnf install awscli
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.

Red Hat Enterprise Linux 10 Client Configuration                                                 26 kB/s | 1.6 kB     00:00
Dependencies resolved.
================================================================================================================================
 Package                             Architecture      Version                     Repository                              Size
================================================================================================================================
Installing:
 awscli2                             noarch            2.22.9-1.el10               rhel-10-appstream-rhui-rpms             14 M
Installing dependencies:
 python3-awscrt                      x86_64            0.20.2-5.el10               rhel-10-appstream-rhui-rpms            979 k
 python3-cffi                        x86_64            1.16.0-7.el10               rhel-10-baseos-rhui-rpms               312 k
 python3-colorama                    noarch            0.4.6-13.el10               rhel-10-appstream-rhui-rpms             76 k
 python3-cryptography                x86_64            43.0.0-4.el10               rhel-10-baseos-rhui-rpms               1.4 M
 python3-docutils                    noarch            0.20.1-5.el10               rhel-10-appstream-rhui-rpms            1.1 M
 python3-jmespath                    noarch            1.0.1-8.el10                rhel-10-appstream-rhui-rpms             62 k
 python3-ply                         noarch            3.11-25.el10                rhel-10-baseos-rhui-rpms               139 k
 python3-prompt-toolkit              noarch            3.0.41-5.el10               rhel-10-appstream-rhui-rpms            879 k
 python3-pycparser                   noarch            2.20-16.el10                rhel-10-baseos-rhui-rpms               162 k
 python3-ruamel-yaml                 noarch            0.18.5-5.el10               rhel-10-appstream-rhui-rpms            309 k
 python3-ruamel-yaml-clib            x86_64            0.2.7-8.el10                rhel-10-appstream-rhui-rpms            154 k
 python3-wcwidth                     noarch            0.2.6-6.el10                rhel-10-baseos-rhui-rpms                50 k
Installing weak dependencies:
 groff                               x86_64            1.23.0-10.el10              rhel-10-appstream-rhui-rpms            1.4 M

Transaction Summary
================================================================================================================================
Install  14 Packages

Total download size: 21 M
Installed size: 142 M
Is this ok [y/N]: y
Downloading Packages:
(1/14): python3-ruamel-yaml-clib-0.2.7-8.el10.x86_64.rpm                                        702 kB/s | 154 kB     00:00
.
.
(中略)
.
.
Installed products updated.

Installed:
  awscli2-2.22.9-1.el10.noarch                 groff-1.23.0-10.el10.x86_64           python3-awscrt-0.20.2-5.el10.x86_64
  python3-cffi-1.16.0-7.el10.x86_64            python3-colorama-0.4.6-13.el10.noarch python3-cryptography-43.0.0-4.el10.x86_64
  python3-docutils-0.20.1-5.el10.noarch        python3-jmespath-1.0.1-8.el10.noarch  python3-ply-3.11-25.el10.noarch
  python3-prompt-toolkit-3.0.41-5.el10.noarch  python3-pycparser-2.20-16.el10.noarch python3-ruamel-yaml-0.18.5-5.el10.noarch
  python3-ruamel-yaml-clib-0.2.7-8.el10.x86_64 python3-wcwidth-0.2.6-6.el10.noarch

Complete!

$ aws sts get-caller-identity
{
    "UserId": "AROA6KUFAVPUSSVRA3IZ4:i-04d1ad7f07543a906",
    "Account": "<AWSアカウントID>",
    "Arn": "arn:aws:sts::<AWSアカウントID>:assumed-role/AmazonSSMRoleForInstancesQuickSetup/i-04d1ad7f07543a906"
}

$ sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.

Last metadata expiration check: 0:01:19 ago on Fri Jun  6 08:22:03 2025.
amazon-ssm-agent.rpm                                                                             88 MB/s |  24 MB     00:00
Dependencies resolved.
================================================================================================================================
 Package                           Architecture            Version                          Repository                     Size
================================================================================================================================
Installing:
 amazon-ssm-agent                  x86_64                  3.3.2471.0-1                     @commandline                   24 M

Transaction Summary
================================================================================================================================
Install  1 Package

Total size: 24 M
Installed size: 113 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: amazon-ssm-agent-3.3.2471.0-1.x86_64                                                                   1/1
  Preparing        :                                                                                                        1/1
  Running scriptlet: amazon-ssm-agent-3.3.2471.0-1.x86_64                                                                   1/1
  Installing       : amazon-ssm-agent-3.3.2471.0-1.x86_64                                                                   1/1
  Running scriptlet: amazon-ssm-agent-3.3.2471.0-1.x86_64                                                                   1/1
Created symlink '/etc/systemd/system/multi-user.target.wants/amazon-ssm-agent.service''/etc/systemd/system/amazon-ssm-agent.service'.

Installed products updated.

Installed:
  amazon-ssm-agent-3.3.2471.0-1.x86_64

Complete!
$ systemctl status amazon-ssm-agent
● amazon-ssm-agent.service - amazon-ssm-agent
     Loaded: loaded (/etc/systemd/system/amazon-ssm-agent.service; enabled; preset: disabled)
     Active: active (running) since Fri 2025-06-06 08:23:25 UTC; 10s ago
 Invocation: fa220799c5544791b61215530e2b151b
   Main PID: 1483 (amazon-ssm-agen)
      Tasks: 17 (limit: 5076)
     Memory: 32.1M (peak: 32.5M)
        CPU: 537ms
     CGroup: /system.slice/amazon-ssm-agent.service
             ├─1483 /usr/bin/amazon-ssm-agent
             └─1673 /usr/bin/ssm-agent-worker

Jun 06 08:23:26 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:26.4805 INFO [EC2Identity] EC2 registratio>
Jun 06 08:23:26 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:26.4806 INFO [amazon-ssm-agent] Registrati>
Jun 06 08:23:26 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:26.4806 INFO [CredentialRefresher] credent>
Jun 06 08:23:26 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:26.4806 INFO [CredentialRefresher] Startin>
Jun 06 08:23:26 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:26.5208 INFO EC2RoleProvider Successfully >
Jun 06 08:23:26 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:26.5211 INFO [CredentialRefresher] Credent>
Jun 06 08:23:26 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:26.5213 INFO [CredentialRefresher] Next cr>
Jun 06 08:23:27 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:27.5386 INFO [amazon-ssm-agent] [LongRunni>
Jun 06 08:23:27 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:27.5389 INFO [amazon-ssm-agent] [LongRunni>
Jun 06 08:23:27 ip-10-20-3-143.ec2.internal amazon-ssm-agent[1483]: 2025-06-06 08:23:27.5391 INFO [amazon-ssm-agent] [LongRunni>
$

どちらも正常にインストールでき、動作もしています。

AWS Marketplaceから所有者がRed Hatのイメージから起動

Red Hat公式ブログを見ると、RHEL for AWSはAWS Marketplaceから使用可能と記載がありました。

Available now on AWS

RHEL for AWS is available today in the AWS Marketplace for North America and regions outside of EMEA (Red Hat Inc.), and for EMEA customers (Red Hat Ltd.), and can be used across a broad range of instance types for the latest performance and integration enhancements.

With RHEL for AWS, you can spend less time configuring your platform and more time building value for your business. This release reflects Red Hat's continued collaboration with AWS to provide enterprise-ready solutions tailored for today's cloud-native world.

Introducing Red Hat Enterprise Linux for AWS: Optimized, integrated and available now

もしかすると、RHEL for AWSなRHEL 10を使用するためには別途Marketplaceでサブスクライブが必要なのかもしれません。

試してみましょう。

AWS MarketplaceからRHEL for AWSのイメージを探します。

1.AWS_Marketplace__Red_Hat_Enterprise_Linux__RHEL__for_AWS.png

概要を展開すると、以下のような記載がありました。

RHEL for AWSは、AWS環境向けに特別に設計された、最適化されたRed Hat Enterprise Linux 製品です。これには、次のようなパフォーマンス、管理、セキュリティを合理化する組み込み機能と統合が含まれています。

  • 迅速で一貫したデプロイメントのための事前設定済みのAWS固有のパフォーマンスプロファイル
  • ネットワークパフォーマンスを向上させるためのエラスティック・ネットワーク・アダプター(ENA)のサポート
  • AWS CLI とCloudWatchテレメトリを統合して、シームレスなオブザーバビリティと管理を実現
  • ハイブリッド環境全体のプロアクティブな監視とインテリジェントな問題解決のための Red Hat Insights
  • クラウドネイティブ開発を簡素化し、攻撃対象領域を減らすための不変のイメージモードとコンテナネイティブツール
  • オプションの自動更新とロールバックにより、より迅速でリスクの少ない運用が可能
  • RHELを、信頼できるパートナーとツールの広範なエコシステムを備えた信頼できるAI基盤として活用してください。

RHEL for AWSと記載されているので期待大ですね。

購入オプションを表示をクリックします。

続いて、Accept Termsをクリックします。

2.Subscribe to this software.png

Continue to Configurationをクリックします。

3.Continue to Configuration.png

CPUアーキテクチャやOSバージョン、リージョンを選択して、Continue to Launchをクリックします。

4.Configure this software.png

EC2のコンソールで起動したかったので、Choose ActionでLaunch through EC2を選択して、Launchをクリックします。

5.Launch this software.png

あとは通常のEC2インスタンス起動と同じです。

6.EC2インスタンスの起動.png

使用したイメージは以下のとおりです。

>  aws ec2 describe-images --image-ids ami-06ad5ef505e8f5ca0
{
    "Images": [
        {
            "PlatformDetails": "Linux/UNIX",
            "UsageOperation": "RunInstances",
            "BlockDeviceMappings": [
                {
                    "Ebs": {
                        "DeleteOnTermination": true,
                        "SnapshotId": "snap-076fbd023b0533623",
                        "VolumeSize": 10,
                        "VolumeType": "gp3",
                        "Encrypted": false
                    },
                    "DeviceName": "/dev/sda1"
                }
            ],
            "Description": "Provided by Red Hat, Inc.",
            "EnaSupport": true,
            "Hypervisor": "xen",
            "ImageOwnerAlias": "aws-marketplace",
            "Name": "RHEL-EC2-10.0_HVM-20250511-x86_64-0-6b2625ac-e9ca-4d9a-a34f-63dc75a4d497",
            "RootDeviceName": "/dev/sda1",
            "RootDeviceType": "ebs",
            "SriovNetSupport": "simple",
            "VirtualizationType": "hvm",
            "BootMode": "uefi-preferred",
            "DeprecationTime": "2027-05-15T18:05:53.000Z",
            "SourceImageId": "ami-0c880401d77077946",
            "SourceImageRegion": "us-east-1",
            "ImageId": "ami-06ad5ef505e8f5ca0",
            "ImageLocation": "aws-marketplace/RHEL-EC2-10.0_HVM-20250511-x86_64-0-6b2625ac-e9ca-4d9a-a34f-63dc75a4d497",
            "State": "available",
            "OwnerId": "679593333241",
            "CreationDate": "2025-05-15T18:05:53.000Z",
            "Public": true,
            "ProductCodes": [
                {
                    "ProductCodeId": "6cd5fxzrad0cu2j23p692xytz",
                    "ProductCodeType": "marketplace"
                }
            ],
            "Architecture": "x86_64",
            "ImageType": "machine"
        }
    ]
}

二つのイメージの違いは以下のとおりです。

>  diff -u ami-03a13a09a711d3871.log ami-06ad5ef505e8f5ca0.log
--- ami-03a13a09a711d3871.log 2025-06-06 17:36:10
+++ ami-06ad5ef505e8f5ca0.log 2025-06-06 17:36:23
@@ -1,15 +1,14 @@
->  aws ec2 describe-images --image-ids ami-03a13a09a711d3871
-Enter MFA code for arn:aws:iam::482842011168:mfa/cm-yamamoto.ryota:
+>  aws ec2 describe-images --image-ids ami-06ad5ef505e8f5ca0
 {
     "Images": [
         {
-            "PlatformDetails": "Red Hat Enterprise Linux",
-            "UsageOperation": "RunInstances:0010",
+            "PlatformDetails": "Linux/UNIX",
+            "UsageOperation": "RunInstances",
             "BlockDeviceMappings": [
                 {
                     "Ebs": {
                         "DeleteOnTermination": true,
-                        "SnapshotId": "snap-0fa00a53cadcc1a6d",
+                        "SnapshotId": "snap-076fbd023b0533623",
                         "VolumeSize": 10,
                         "VolumeType": "gp3",
                         "Encrypted": false
@@ -20,20 +19,28 @@
             "Description": "Provided by Red Hat, Inc.",
             "EnaSupport": true,
             "Hypervisor": "xen",
-            "ImageOwnerAlias": "amazon",
-            "Name": "RHEL-10.0.0_HVM_GA-20250423-x86_64-0-Hourly2-GP3",
+            "ImageOwnerAlias": "aws-marketplace",
+            "Name": "RHEL-EC2-10.0_HVM-20250511-x86_64-0-6b2625ac-e9ca-4d9a-a34f-63dc75a4d497",
             "RootDeviceName": "/dev/sda1",
             "RootDeviceType": "ebs",
             "SriovNetSupport": "simple",
             "VirtualizationType": "hvm",
             "BootMode": "uefi-preferred",
-            "DeprecationTime": "2027-05-07T14:49:56.000Z",
-            "ImageId": "ami-03a13a09a711d3871",
-            "ImageLocation": "amazon/RHEL-10.0.0_HVM_GA-20250423-x86_64-0-Hourly2-GP3",
+            "DeprecationTime": "2027-05-15T18:05:53.000Z",
+            "SourceImageId": "ami-0c880401d77077946",
+            "SourceImageRegion": "us-east-1",
+            "ImageId": "ami-06ad5ef505e8f5ca0",
+            "ImageLocation": "aws-marketplace/RHEL-EC2-10.0_HVM-20250511-x86_64-0-6b2625ac-e9ca-4d9a-a34f-63dc75a4d497",
             "State": "available",
-            "OwnerId": "309956199498",
-            "CreationDate": "2025-05-07T14:49:56.000Z",
+            "OwnerId": "679593333241",
+            "CreationDate": "2025-05-15T18:05:53.000Z",
             "Public": true,
+            "ProductCodes": [
+                {
+                    "ProductCodeId": "6cd5fxzrad0cu2j23p692xytz",
+                    "ProductCodeType": "marketplace"
+                }
+            ],
             "Architecture": "x86_64",
             "ImageType": "machine"
         }

起動したEC2インスタンスにSSH接続して、AWS CLIとSSM Agentがプリインストールされているか確認しましょう。

$ which aws
/usr/bin/which: no aws in (/home/ec2-user/.local/bin:/home/ec2-user/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)

$ systemctl status amazon-ssm-agent
Unit amazon-ssm-agent.service could not be found.

はい、どちらもインストールされていません。

Red Hat公式ブログで紹介されていたAWS CLIのプリインストールがされていないようなので、ちょっと困惑ですね。

もしかすると、私の検証が早すぎたのかもしれません。

その他具体的に「この設定がこのようにチューニングされている」や「これがインストールされている」といった情報はなく、個人的にはRHEL for AWS独自要素の実感はありませんでした。

普通にRHEL 10として使用する程度で捉えておくと良い感覚を持ちました。

なお、Marketplaceでサブスクライブしているため、こちらはEC2インスタンスの料金とは別立てでRHELの利用料金がかかります。

具体的には以下のように、Red Hat Enterprise Linuxとして、AWS Marketplace hourly software usage|us-east-1|t3.smallのように請求されます。

7.AWS Marketplace hourly software usage|us-east-1|t3.small.png

それに伴い、OSサポートもRed Hatサポートにしてもらうことになります。

OS探検

OSバージョン

せっかくなので、OS探検をします。

確認に使用するEC2インスタンスはAWS Marketplaceでサブスクライブした所有者がRed Hatのイメージから起動したものです。

まずはOSバージョンです。

$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="10.0 (Coughlan)"
ID="rhel"
ID_LIKE="centos fedora"
VERSION_ID="10.0"
PLATFORM_ID="platform:el10"
PRETTY_NAME="Red Hat Enterprise Linux 10.0 (Coughlan)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:10::baseos"
HOME_URL="https://www.redhat.com/"
VENDOR_NAME="Red Hat"
VENDOR_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/10"
BUG_REPORT_URL="https://issues.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 10"
REDHAT_BUGZILLA_PRODUCT_VERSION=10.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="10.0"

$ cat /etc/redhat-release
Red Hat Enterprise Linux release 10.0 (Coughlan)

カーネルバージョン

カーネルバージョンの確認です。

$ cat /proc/version
Linux version 6.12.0-55.9.1.el10_0.x86_64 (mockbuild@d9479e82fd7a4a249c8265aa7a184d55) (gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7), GNU ld version 2.41-53.el10) #1 SMP PREEMPT_DYNAMIC Tue Mar 25 09:14:09 EDT 2025

$ uname -a
Linux ip-10-20-0-22.ec2.internal 6.12.0-55.9.1.el10_0.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 25 09:14:09 EDT 2025 x86_64 GNU/Linux

ちなみに、RHEL 9のkernelは5.14.0です。

シェル

使用できるシェルの確認です。

$ echo $SHELL
/bin/bash

$ cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash

安定のbashです。

参照しているリポジトリ

参照しているリポジトリの確認です。

$ sudo dnf repolist -v
Loaded plugins: amazon-id, builddep, changelog, config-manager, copr, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, system-upgrade, uploadprofile
Updating Subscription Management repositories.
DNF version: 4.20.0
cachedir: /var/cache/dnf
Red Hat Enterprise Linux 10 for x86_64 - AppStream from RHUI (RPMs)                              23 MB/s | 2.7 MB     00:00
Red Hat Enterprise Linux 10 for x86_64 - BaseOS from RHUI (RPMs)                                 45 MB/s | 6.1 MB     00:00
Red Hat Enterprise Linux 10 Client Configuration                                                 19 kB/s | 1.6 kB     00:00
Repo-id            : rhel-10-appstream-rhui-rpms
Repo-name          : Red Hat Enterprise Linux 10 for x86_64 - AppStream from RHUI (RPMs)
Repo-revision      : 1749139276
Repo-updated       : Thu Jun  5 16:01:16 2025
Repo-pkgs          : 5008
Repo-available-pkgs: 5008
Repo-size          : 8.5 G
Repo-mirrors       : https://rhui.us-east-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel10/rhui/10/x86_64/appstream/os
Repo-baseurl       : https://rhui.us-east-1.aws.ce.redhat.com/pulp/content/content/dist/rhel10/rhui/10/x86_64/appstream/os (0
                   : more)
Repo-expire        : 172800 second(s) (last: Fri Jun  6 08:56:49 2025)
Repo-filename      : /etc/yum.repos.d/redhat-rhui.repo

Repo-id            : rhel-10-baseos-rhui-rpms
Repo-name          : Red Hat Enterprise Linux 10 for x86_64 - BaseOS from RHUI (RPMs)
Repo-revision      : 1749042239
Repo-updated       : Wed Jun  4 13:03:59 2025
Repo-pkgs          : 1056
Repo-available-pkgs: 1056
Repo-size          : 2.8 G
Repo-mirrors       : https://rhui.us-east-1.aws.ce.redhat.com/pulp/mirror/content/dist/rhel10/rhui/10/x86_64/baseos/os
Repo-baseurl       : https://rhui.us-east-1.aws.ce.redhat.com/pulp/content/content/dist/rhel10/rhui/10/x86_64/baseos/os (0 more)
Repo-expire        : 172800 second(s) (last: Fri Jun  6 08:56:49 2025)
Repo-filename      : /etc/yum.repos.d/redhat-rhui.repo

Repo-id            : rhui-client-config-server-10
Repo-name          : Red Hat Enterprise Linux 10 Client Configuration
Repo-revision      : 1748888052
Repo-updated       : Mon Jun  2 18:14:12 2025
Repo-pkgs          : 4
Repo-available-pkgs: 4
Repo-size          : 129 k
Repo-mirrors       : https://rhui.us-east-1.aws.ce.redhat.com/pulp/mirror/protected/rhui-client-config/rhel/server/10/x86_64/os
Repo-baseurl       : https://rhui.us-east-1.aws.ce.redhat.com/pulp/content/protected/rhui-client-config/rhel/server/10/x86_64/os
                   : (0 more)
Repo-expire        : 172800 second(s) (last: Fri Jun  6 08:56:50 2025)
Repo-filename      : /etc/yum.repos.d/redhat-rhui-client-config.repo
Total packages: 6068

「いつもの」という感覚です。

特にAWS専用のリポジトリは設定されていません。

起動しているサービス

起動しているサービスを確認します。

$ systemctl list-unit-files --type=service --state=enabled
UNIT FILE                          STATE   PRESET
audit-rules.service                enabled enabled
auditd.service                     enabled enabled
chronyd.service                    enabled enabled
cloud-config.service               enabled enabled
cloud-final.service                enabled enabled
cloud-init-local.service           enabled enabled
cloud-init.service                 enabled enabled
crond.service                      enabled enabled
dbus-broker.service                enabled enabled
fips-crypto-policy-overlay.service enabled enabled
getty@.service                     enabled enabled
insights-client-boot.service       enabled enabled
irqbalance.service                 enabled enabled
kdump.service                      enabled enabled
lvm2-monitor.service               enabled enabled
mdmonitor.service                  enabled enabled
NetworkManager-dispatcher.service  enabled enabled
NetworkManager-wait-online.service enabled enabled
NetworkManager.service             enabled enabled
nm-cloud-setup.service             enabled disabled
rhsmcertd.service                  enabled enabled
rsyslog.service                    enabled enabled
selinux-autorelabel-mark.service   enabled enabled
sshd.service                       enabled enabled
sssd.service                       enabled enabled
systemd-confext.service            enabled enabled
systemd-network-generator.service  enabled enabled
systemd-pstore.service             enabled enabled
systemd-sysext.service             enabled enabled
tuned.service                      enabled enabled
udisks2.service                    enabled enabled

31 unit files listed.

現在使用しているポート

現在使用しているポート一覧です。

$ sudo ss -antup
Netid State  Recv-Q Send-Q     Local Address:Port     Peer Address:Port  Process
udp   ESTAB  0      0        10.20.0.22%ens5:68          10.20.0.1:67     users:(("NetworkManager",pid=774,fd=24))
udp   UNCONN 0      0              127.0.0.1:323           0.0.0.0:*      users:(("chronyd",pid=742,fd=5))
udp   UNCONN 0      0                  [::1]:323              [::]:*      users:(("chronyd",pid=742,fd=6))
tcp   LISTEN 0      128              0.0.0.0:22            0.0.0.0:*      users:(("sshd",pid=1182,fd=7))
tcp   ESTAB  0      292           10.20.0.22:22     104.28.236.107:31521  users:(("sshd-session",pid=1723,fd=4),("sshd-session",pid=1702,fd=4))
tcp   LISTEN 0      128                 [::]:22               [::]:*      users:(("sshd",pid=1182,fd=8))

マウントしている領域

各種マウントしている領域を確認します。

$ cat /etc/fstab
UUID=b884efea-9e58-4f9d-b109-482bde11c078 / xfs defaults 0 0
UUID=7B77-95E7 /boot/efi vfat defaults,uid=0,gid=0,umask=077,shortname=winnt 0 2

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p3  9.8G  1.7G  8.1G  18% /
devtmpfs        4.0M     0  4.0M   0% /dev
tmpfs           824M   84K  824M   1% /dev/shm
efivarfs        128K  3.8K  120K   4% /sys/firmware/efi/efivars
tmpfs           330M  4.7M  325M   2% /run
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
/dev/nvme0n1p2  200M  8.4M  192M   5% /boot/efi
tmpfs           1.0M     0  1.0M   0% /run/credentials/serial-getty@ttyS0.service
tmpfs           1.0M     0  1.0M   0% /run/credentials/getty@tty1.service
tmpfs           165M  4.0K  165M   1% /run/user/1000

Red Hat Enterprise Linux Lightspeedの実行

せっかくなのでRed Hat Enterprise Linux Lightspeedを試してみましょう。

以下Red Hat公式ドキュメントを参考にやってみます。

https://docs.redhat.com/ja/documentation/red_hat_enterprise_linux/10/html/interacting_with_the_command-line_assistant_powered_by_rhel_lightspeed/index

使い方は非常に簡単です。

dnfでインストールします。

$ sudo dnf install command-line-assistant
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:21 ago on Fri Jun  6 09:40:56 2025.
Dependencies resolved.
=====================================================================================================
 Package                           Arch      Version            Repository                      Size
=====================================================================================================
Installing:
 command-line-assistant            noarch    0.3.1-3.el10_0     rhel-10-appstream-rhui-rpms    248 k
Installing dependencies:
 command-line-assistant-selinux    noarch    0.3.1-3.el10_0     rhel-10-appstream-rhui-rpms     26 k
 python3-dasbus                    noarch    1.7-8.el10         rhel-10-appstream-rhui-rpms    128 k
 python3-greenlet                  x86_64    3.0.3-5.el10       rhel-10-appstream-rhui-rpms    268 k
 python3-sqlalchemy                x86_64    2.0.26-6.el10      rhel-10-appstream-rhui-rpms    3.6 M
 python3-typing-extensions         noarch    4.9.0-6.el10       rhel-10-baseos-rhui-rpms        81 k

Transaction Summary
=====================================================================================================
Install  6 Packages

Total download size: 4.4 M
Installed size: 25 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): python3-greenlet-3.0.3-5.el10.x86_64.rpm                      1.5 MB/s | 268 kB     00:00
.
.
(中略)
.
.
Installed products updated.

Installed:
  command-line-assistant-0.3.1-3.el10_0.noarch  command-line-assistant-selinux-0.3.1-3.el10_0.noarch
  python3-dasbus-1.7-8.el10.noarch              python3-greenlet-3.0.3-5.el10.x86_64
  python3-sqlalchemy-2.0.26-6.el10.x86_64       python3-typing-extensions-4.9.0-6.el10.noarch

Complete!

cコマンドがインストールされることを確認します。

$ which c
/usr/bin/c

$ c --help
usage: c [--debug] [-h] [-v] {chat,feedback,history,shell} ...

The Command Line Assistant powered by RHEL Lightspeed is an optional generative AI assistant
available within the RHEL command line interface.

positional arguments:
  {chat,feedback,history,shell}
    chat                Command to ask a question to the LLM.
    feedback            Submit feedback about Command Line Assistant responses and interactions.
    history             Manage Conversation History
    shell               Manage shell integrations

options:
  --debug               Enable debug logging information
  -h, --help            Show this help message and exit.
  -v, --version         Show program version

Red Hat公式ドキュメントに則って、Pythonのインストール方法を尋ねてみます。

$ c "How to install python?"
⁺₊+ Asking RHEL Lightspeed
This feature uses AI technology. Do not include any personal information or other sensitive
information in your input. Interactions may be used to improve Red Hat's products or services.
────────────────────────────────────────────────────────────────────────

To install Python on Red Hat Enterprise Linux (RHEL) 9, you can use the dnf package manager. Here are the steps:

1. Open a terminal.
2. Update the package list by running:
   ``
   sudo dnf update -y
   `
3. Install Python 3.9, which is the default version in RHEL 9, by executing:
   `
   sudo dnf install python3 -y
   ``

This command will install Python 3.9 along with its dependencies.

If you need to install a different version of Python 3, you can do so by specifying the version number. For example, to install Python 3.10, use:
Snippet ────────────────
sudo dnf install python3.10 -y
────────────────────────

Remember, additional Python 3 versions are distributed through the AppStream repository in minor RHEL 9 releases and can be installed in parallel with Python 3.9 without affecting the default version.

For more information, you can refer to the official Red Hat documentation on Python in RHEL 9.

────────────────────────────────────────────────────────────────────────
Always review AI-generated content prior to use.

はい、Pythonのインストール方法を教えてくれました。

日本語に対応しているかも確認してみましょう。

$ c "日本語で対応できますか?"
⁺₊+ Asking RHEL Lightspeed
────────────────────────────────────────────────────────────────────────

はい、日本語でお手伝いできます。Red Hat Enterprise Linux (RHEL) 8 および 9 で ja_JP.SJIS ロケールの設定についてのご質問があれば、お気軽にお尋ねください。

例えば、ja_JP.SJIS ロケールを RHEL 8 および 9 で設定する方法は以下の通りです。

1. glibc-locale-source パッケージをインストールします。
   ``
   # yum install glibc-locale-source
   `

2. キャラクター・マップを作成します。
   `
   # localedef -f SHIFT_JIS -i ja_JP ja_JP.SJIS
   `
   このコマンドで、非 ASCII 互換性に関する警告が表示される可能性があります。

3. SJIS 環境を設定します。
   `
   # LANG=ja_JP.SJIS
   `

4. 再起動後にロケール設定を維持するために、/etc/sysconfig/i18n ファイルを編集します。
   ja_JP.SJIS を SUPPORTED 行に追加します。

これらの手順が RHEL 7 以前のバージョンでは異なる場合があります。詳細については、How to preserve custom locales across glibc-* updates? (https://access.redhat.com/solutions/1335353) をご覧ください。

さらに、RHEL 8 および 9 環境で、ja_JP.ujis ロケールがインストールされていない問題を解決するために、glibc-all-langpacks パッケージをインストールする必要があることがあります。この問題は、glibc-langpack-ja パッケージが必要なすべてのロケールデータを含まないために発生します。

問題を診断するには、locale -a コマンドを使用して利用可能なロケールを確認し、rpm -q glibc-langpack-ja コマンドを使用して、glibc-langpack-ja パッケージのインストールを確認できます。

locale -a` コマンドの出力に ja_JP.ujis が表示されない場合、問題が発生していることを示しています。詳細については、How to resolve missing ja_JP.ujis locale in RHEL 8 and 9? (https://access.redhat.com/solutions/7087265) をご覧ください。

ご質問やサポートが必要な場合は、お気軽にお尋ねください。

────────────────────────────────────────────────────────────────────────
Always review AI-generated content prior to use.

なんとできました。これはありがたいですね。

現在AWS CLIがインストールされているか確認してみましょう。

$ c "AWS CLIは現在インストールされていますか?"
⁺₊+ Asking RHEL Lightspeed
────────────────────────────────────────────────────────────────────────

The AWS CLI is currently installed?

To check if the AWS CLI is installed on your Red Hat Enterprise Linux system, you can use the following command in your terminal:

Snippet ────────────────
aws --version
────────────────────────

If the AWS CLI is installed, this command will display the version information. If it's not installed, you'll receive an error message indicating that the command is not found.

If it's not installed, you can install it using the dnf command:

Snippet ────────────────
sudo dnf install awscli
────────────────────────

After installation, verify it again with the aws --version command.

For more information on configuring the AWS CLI, refer to the official AWS documentation (https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html#cli-quick-configuration).

────────────────────────────────────────────────────────────────────────
Always review AI-generated content prior to use.

インストールされているか確認するコマンドの提示のみで、実際にインストールされているかの確認はしてくれませんでした。コンテキストとしてファイルシステムを見てくれる訳ではなさそうです。

これはFAQにも記載されていました。

コマンドラインアシスタントはどのようなシステム情報に直接アクセスできますか?

コマンドラインアシスタントは、システムの情報に直接アクセスすることはできません。たとえば、コマンドラインアシスタントに "how much free memory does this system have?" (このシステムには空きメモリーがどれくらいあるか) などの質問をしても、コマンドラインアシスタントはシステムから直接この情報を収集することはできません。代わりに、コマンドラインアシスタントでは、システムの空きメモリー量を表示するコマンドを確認できます。次のようなさまざまな方法を使用して、コマンドラインアシスタントに情報を提供できます。

第8章 ユーザーデータのセキュリティーに関するよくある質問 | RHEL Lightspeed を搭載したコマンドラインアシスタントとの対話 | Red Hat Enterprise Linux | 10 | Red Hat Documentation

また、機微な情報の入力は避けるようにと注意書きがありました。

  • 個人情報
  • ビジネス上の重要な情報
  • 機密情報
  • システムデータ情報

第4章 RHEL システムでの RHEL Lightspeed を搭載したコマンドラインアシスタントの使用 | RHEL Lightspeed を搭載したコマンドラインアシスタントとの対話 | Red Hat Enterprise Linux | 10 | Red Hat Documentation

オプトアウト設定を探してみたのですが、見つけることはできませんでした。

RHEL Lightspeedくんに聞いても、提供がないと回答がありました。

$ c "RHEL Lightspeedのオプトアウト設定はありますか?"
⁺₊+ Asking RHEL Lightspeed
────────────────────────────────────────────────────────────────────────

RHEL Lightspeedのオプトアウト設定はありますか?

RHEL Lightspeedは、Red Hatによって提供されるAIツールであり、ユーザーのプライバシーやデータの使用に関するオプトアウト設定は提供されていません。RHEL Lightspeedは、Red Hatの製品やサービスの使用に関する情報を提供し、サポートを提供する目的で設計されています。

ただし、RHELの一般的な設定に関しては、以下の手順で、システムのログレベルを調整して、RHELシステムのログレベルを低く設定することで、プライバシーを保護することができます。

1. ターミナルを開き、root権限でアクセスします。

2. /etc/rsyslog.confファイルを編集します。

[bash] Snippet ────────────────
sudo nano /etc/rsyslog.conf
────────────────────────

3. 以下の行を見つけます。

[bash] Snippet ────────────────
# Stop sending some types of syslog messages
*.=info;mail.none;authpriv.none;cron.none;mail.info;authpriv.info;cron.info /dev/null
────────────────────────

4. これらの行をコメントアウトします。

[bash] Snippet ────────────────
# *.=info;mail.none;authpriv.none;cron.none;mail.info;authpriv.info;cron.info /dev/null
────────────────────────

5. ファイルを保存して閉じます。

6. Rsyslogサービスを再起動します。

[bash] Snippet ────────────────
sudo systemctl restart rsyslog
────────────────────────

これらの設定は、システムログレベルを低く設定することで、プライバシーを保護するのに役立ちます。ただし、これらはRHEL Lightspeedのオプトアウト設定ではありません。

RHEL Lightspeedに関する最新情報や詳細については、Red Hatの公式ドキュメントやサポートチームにお問い合わせください。

────────────────────────────────────────────────────────────────────────
Always review AI-generated content prior to use.

あくまでRHELに関する一般的な情報を質問したり、明示的にログファイルを渡してトラブルシューティングをしてもらったりという用途で使うのが良さそうです。

使用しようとしているミドルウェアがサポートしていることを確認した上で採用しよう

Red Hat Enterprise Linux 10 のEC2インスタンスを起動してみました。

結論、RHEL for AWSと称されていますが、従来のAWSから提供されているイメージとどのような差があるのか具体的な内容を確認することはできませんでした。

「具体的にこの設定がこうなっているよ」とご存知の方がいらっしゃれば教えてください。

また、RHEL 10はリリーされてまもないということで、使用しようとしているミドルウェアがサポートしていないことも十分考えられます。使用する前には事前に使用予定のソフトウェアのシステム要件を確認しましょう。

ちなみに以下については2025/6/6時点でRHEL 10の言及はありませんでした。

本番利用する場合は、ドキュメントに明記されてから使用するのが安心だと思います。

この記事が誰かの助けになれば幸いです。

以上、クラウド事業本部 コンサルティング部の のんピ(@non____97)でした!

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.