RHEL7以降のGUIでユーザが初回ログインした際のようこそ画面を消す

RHEL7やRHEL8をGUIつきでインストールすると、各ユーザがログインした際に、gnome-initial-setupコマンドが自動起動し、以下の様な表示を行う。

これは設定をすすめればいいだけではあるんだけど、めんどくさい。

Solaris 7以降でも似たような感じで登録要求画面が表示されてたけど、所定の空ファイルを置くことで表示しないようにできたけど、RHELでもできるかな?と調べて見た。

githubにあるgnome-initial-setupのソースコードを調べていくと、HACKINGに情報を発見。


gnome-initial-setup also has a session mode which activates gnome-initial-setup when a user first logs in. The gnome-initial-setup-first-login.desktop in the
xdg autostart directory utilises gnome-session to check if the user has a
gnome-initial-setup-done file in their XDG_CONFIG_DIR if they don’t
gnome-initial-setup will launch with pages that are suitable for a
non-privileged user and on exiting will write the done file.

各ユーザの環境変数 XDG_CONFIG_DIR で定義されたディレクトリ内に「gnome-initial-setup-done」というファイルがあれば良い、ということ。

しかし、Oracle Linux 8で確認してみると XDG_CONFIG_DIRは定義されていない。

XDG_CONFIG_DIR の定義について調べると「XDG Base Directory Specification」に記載があった。

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

定義されていない場合は、各ユーザのホームディレクトリ内にある「.config」となるとのこと。

つまり「~/.config/gnome-initial-setup-done」というファイルを作れば良い、ということになる。

というわけで「touch ~/.config/gnome-initial-setup-done」を実行することで、gnome-initial-setupの起動をさせないようにできた。


ここまでで紹介した手順は各ユーザ単位で表示させなくする設定。

全体として表示させなくする設定が無いかを確認。

先ほども参照したHACKINGのgnome-initial-setup-doneの話の直前に情報がいくつか。

/etc/gdm/custom.confの[daemon]セクションに「InitialSetupEnable=True」と書くとgnome-initial-setupが起動する、ということなので、逆に「InitialSetupEnable=False」と書けばいいのかと試してみたけど、ダメでした。

InitialSetupEnable 関連で検索して「Bug 1226819 – gnome-initial-setup cannot be disabled, forces user creation」を発見。

ユーザを作成する際に初期配置するファイルを置く「/etc/skel」ディレクトリ内に「.config/gnome-initial-setup-done」ファイルを作っちゃえばいいんじゃん?という話が・・・確かに!( mkdir -p /etc/skel/.config && touch /etc/skel/.config/gnome-initial-setup-done を実行する)

他に書かれている/etc/xdg/autostart/gnome-initial-setup-copy-worker.desktop と /etc/xdg/autostart/gnome-initial-setup-first-login.desktop ファイルを削除する、というのは若干いきすぎた対応な気がするので、こちらはどうなのかな・・・


その後、RedHatのナレッジに「RHEL7 の初期インストール後の実行から gnome-initial-setup を無効にする」というのがあり対処方法が記されている、と聞きました。

ユーザ毎の対処方法は上で書いた手法でした。システム全体手法は上記では書いてない方法をとっていました。詳細についてはURLを見てください。

DELL PowerEdgeサーバにLinuxを入れる際の追加ソフト

2024/09/24 全面改定
2021/12/20 修正
2021/01/09 修正
2019/01/09 初版

DELL PowerEdgeサーバにLinuxをインストールする際に、DELLが配布しているソフトウェアレポジトリ Dell Linux repository がある。

以前は、Dell System Update (DSU)OpenManage Server Administrator (OMSA) をインストールする、ということになっていたが、2024年になりOMSAは終了(2027年までサポートは続くけど)し、iDRACとOS側にインストールするiDRAC Service Module(iSM)で代替されることとなった。

上記ドキュメント群から触れられていないがLinux OS側からiDRACの操作を行うための「Linux向けDell iDRACツール」というのもリリースされている。(racadmとIPMItools)

このため、手順としては下記となるようだ。

1) レポジトリ登録

Dell Linux Yum Repository に記載の下記コマンドを実行して、シェルスクリプトダウンロード

curl -O https://linux.dell.com/repo/hardware/dsu/bootstrap.cgi

ダウンロードしたシェルスクリプトを実行

bash bootstrap.cgi

サーバとOSに応じたレポジトリが設定される

ただ https://linux.dell.com/repo/hardware/dsu/os_dependent/ を見ると、対応しているのは RHEL8_64, R64 HEL9_64, SLES15_64 の3つだけのようなのでそれ以外のディストリビューションでは、手動でファイルを作った方がいいのかもしれない

スクリプトからみると、RHEL9系だったら下記で行けるのかな?

[DELL_independent]
name=DELL_independent
baseurl=https://linux.dell.com/repo/hardware/dsu/os_independent/
gpgcheck=0
enabled=1

[DELL_dependent]
name=DELL_dependent
baseurl=https://linux.dell.com/repo/hardware/dsu/os_dependent/RHEL9_64/
gpgcheck=0
enabled=1

2) DSUインストール

Dell Linux Yum Repository に記載の下記コマンドを実行してdsuをインストール

yum install dell-system-update

3) 各PowerEdgeのサポートページのダウンロードから「Linux用Dell iDRAC Service Module」を入手しインストール

Linux用Dell iDRAC Service Module は、例えば2024/09/24時点では「Linux用Dell iDRAC Service Module、v5.3.1.0」(OM-iSM-Dell-Web-LX-5310-3503_A00.tar.gz)もしくは「OS DUP用Dell iDRAC Service Moduleインストーラー、v5.3.1.0」(Systems-Management_Application_7152M_LN64_5.3.1.0_A00.BIN)をインストールした後に、「Linux用Dell iDRAC Service Module (iSM)ホットフィックス306929」(SysMgmt_iSM-Hotfix306929_A00.tar.gz)を適用することが最新であるようだ。

4) 各PowerEdgeのサポートページのダウンロードから「Linux向けDell iDRACツール」を入手しインストール

例えば2024/09/24時点では「Linux向けDell iDRACツール、v11.2.0.0」(Dell-iDRACTools-Web-LX-11.2.0.0-213_A00.tar.gz) から racadmコマンドと、IPMItoolsをインストールできる。

5) DELL系RAIDの管理コマンド perccli

すべてのDell HBA/PERCコントローラー用PERCCLIユーティリティー(Linux向け)」(PERCCLI_7.211.0_Linux.tar.gz) により、PERC RAIDを管理するperccliコマンドをインストールできる。


以下は2019年/2021年記載のものをアーカイブのために残している


DELL PowerEdgeサーバにRedHat Enterprise Linux (RHEL)やCentOSをインストールする場合、OSインストール後に、DELL用の管理ソフトウェア OMSAとシステムアップデートツール DSUをインストールする。

RHEL/CentOS系の手順

Dell EMC System Update (DSU)」用のYUMレポジトリを登録し、その後、「OpenManage Server Administrator」をインストールする形となるので、以下の様な流れとなる。

  1. レポジトリ登録
  2. DSUインストール
  3. OSMAインストール
  4. DTKをインストール DTKは現状必須ではない模様
  5. dsuを使ってfirmware類をアップデート

上記を実施するためのコマンド群は以下の様な形となる。

2021年1月時点での手順 ( 2021/12/20修正 )

# curl -O https://linux.dell.com/repo/hardware/dsu/bootstrap.cgi
# bash bootstrap.cgi
# yum install dell-system-update
# yum install srvadmin-all
# dsu --apply-upgrades --non-interactive

syscfgとraidcfgはracadmコマンドに統合された。

RAIDのvdisk構成を見るのであれば「racadm storage get vdisks -o」などとなる。

2019年1月時点での旧手順

# curl -s http://linux.dell.com/repo/hardware/dsu/bootstrap.cgi | bash
# yum install dell-system-update
# yum install srvadmin-all
# yum install syscfg raidcfg
# dsu --apply-upgrades --non-interactive

上記手順はインターネット接続環境にある場合のもので、接続出来ない環境で行う場合は手順が変わる

オフラインで行いたい場合は「tarballをダウンロードしてインストール」「rsyncでミラーレポジトリを作る」と「ISOを作る」から選択する。

tarballは「Dell EMC OpenManage Server Administrator 9.1.0」から入手することができる・・・ただ、2019/01/09時点ではDSUレポジトリからインストールすると9.2.0になるので若干遅れている。

rsyncの場合は「rsync -avHz linux.dell.com::repo/hardware .」でコピーしてくる。

ISOをつくる場合は「dsucreateiso」をダウンロードして実行する。事前に「yum install mkisofs」でmkisofsをインストールしておく必要はある。

また、標準状態だと/tmpにダウンロードしてきたファイル群を置いた上で、そこで展開も行うので十分な容量を確保しておく必要がある。もしくは「–workspace=/ディレクトリ」で作業領域を指定する

[root@rhelserver7 dsu]# mkdir tmp
[root@rhelserver7 dsu]# ./dsucreateiso  --workspace=`pwd`/tmp
Log file:/var/log/dsucreateiso.log
Downloading: ftp://ftp.dell.com/sysman/DSUPlugins.tar
Invalid dellbootplugin location: ftp://downloads.dell.com/FOLDER05328537M/1/dellbootplugin.tar.gz
Downloading: https://downloads.dell.com/FOLDER05328537M/1/dellbootplugin.tar.gz
Extracting dellbootplugin: dellbootplugin.tar.gz
Downloading: https://downloads.dell.com/catalog/Catalog.gz
Extracting catalog: Catalog.gz
Parsing Catalog File...

Ubuntuの手順

Ubuntu 20.04の場合もほぼ手順で設定するが、若干の細工が必要となる

2021/12/20にPower Edge R650にインストールした際のメモつきで記載する。

1. DELL System Update (DSU)のインストール

DELL PowerEdgeのfirmware周りをアップデートできるDELL System Update(dsu)はlibssl1.0.0を必要とするのだが、Ubuntu 20.04の標準レポジトリには含まれていない。このため、実行すると下記のエラーが表示される。

root@ubuntu:~# dsu
dsu: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
root@ubuntu:~#

対処方法は「DELL EMC System Update Version 1.9.1.0 User’s Guide」掲載のUbuntu 16.04(xenial)レポジトリから持ってこれるようにする、というもの

1.1. libssl1.0.0インストール

/etc/apt/sources.list.d/for-dsu.list というファイルを作成し、下記の内容で記述する。

deb http://security.ubuntu.com/ubuntu xenial-security main

上記実施後「apt update」でレポジトリ情報を更新したあと、「apt install libssl1.0.0」でインストールする。

1.2. dsuを入手

2021/12/20時点では文書000130590「Dell EMC System Update(DSU)」からリンクされている「Dell EMC System Update、v.1.9.2.0」が最新。

ダウンロードするものは「Red Hat Linux用更新パッケージ」の Systems-Management_Application_5C2CW_LN64_1.9.2.0_A00.BIN

個別ダウンロードの説明には Ubuntu 20.04 LTSといった記載はないが、下部にある「サポート対象のオペレーションシステム」には含まれている。

1.3. DSUのインストール

ダウンロードしたファイルに実行権限を与えてインストールする。

root@ubuntu:~# chmod a+x /usr/local/src/Systems-Management_Application_5C2CW_LN64_1.9.2.0_A00.BIN
root@ubuntu:~# /usr/local/src/Systems-Management_Application_5C2CW_LN64_1.9.2.0_A00.BIN
Collecting inventory...
.
Running validation...

DELL System Update

No version of this Update Package is currently installed.
Software application name: DSU
Package version: 1.9.2.0


Continue? Y/N:y
Executing update...
WARNING: DO NOT STOP THIS PROCESS OR INSTALL OTHER PRODUCTS WHILE UPDATE IS IN PROGRESS.
THESE ACTIONS MAY CAUSE YOUR SYSTEM TO BECOME UNSTABLE!
.
DELL EMC System Update installed successfully.
The update completed successfully.
root@ubuntu:~#

1.4. DSUによるアップデート

dsuコマンドはインターネット接続して最新のfirmwareカタログおよびfirmware実体をダウンロードします。

アップデートは「dsu」で行います。

「dsu –apply-upgrades –non-interactive」で実行すると対象となるものをすべて適用する形となります。

今回は確認しながら進めるため「dsu」をオプションなしで実行しました。

root@ubuntu:~# dsu
DELL EMC System Update 1.9.2.0
Copyright (C) 2014 -- 2021 DELL EMC Proprietary.
Do you want to import public key(s) on the system (Y/N)? : y
Import Public Key(s)
Importing key 1019CED6 is successful
Importing key 23B66A9D is successful
Importing key 34D8786F is successful
Importing key 46770C59 is successful
Downloading the Index catalog
Extracting /usr/libexec/dell_dup/CatalogIndex.gz
Reading the Index catalog
Downloading the catalog
Extracting /usr/libexec/dell_dup/Catalog.gz
Reading the catalog ...
Fetching invcol_8YPK7_LN64_21_12_200_1196_A00 ...
Verifying inventory collector installation
Trying to connect using https
Fetching invcol_8YPK7_LN64_21_12_200_1196_A00.BIN ...
Getting System Inventory ...
Determining Applicable Updates ...

|--------DELL EMC System Update-----------|
[ ] represents 'not selected'
[*] represents 'selected'
[-] represents 'Component already at repository version (can be selected only if -e option is used)'
Choose:  q - Quit without update, c to Commit, <number> - To Select/Deselect, a - Select All, n - Select None
[-]1 BIOS
Current Version : 1.3.8 Same as : 1.3.8, Criticality : Recommended, Type : BIOS

[ ]2 SEP Firmware, BayID: 1
Current Version : 3.56 Upgrade to : 3.57, Criticality : Optional, Type : Firmware

[-]3 Firmware for  - Disk 0 of PERC H755 Front Controller 0
Current Version : BA08 Same as : BA08, Criticality : Recommended, Type : Firmware

[-]4 Firmware for  - Disk 1 of PERC H755 Front Controller 0
Current Version : BA08 Same as : BA08, Criticality : Recommended, Type : Firmware

[-]5 Firmware for  - Disk 2 of PERC H755 Front Controller 0
Current Version : BA08 Same as : BA08, Criticality : Recommended, Type : Firmware

[-]6 Firmware for  - Disk 3 of PERC H755 Front Controller 0
Current Version : BA08 Same as : BA08, Criticality : Recommended, Type : Firmware

[ ]7 PERC H755 Front Controller 0 Firmware
Current Version : 52.16.1-4074 Upgrade to : 52.16.1-4158, Criticality : Urgent, Type : Firmware

[-]8 NetXtreme BCM5720 Gigabit Ethernet PCIe (eno8403)
Current Version : 21.81.3 Same as : 21.81.3, Criticality : Optional, Type : Firmware

[-]9 NetXtreme BCM5720 Gigabit Ethernet PCIe (eno8303)
Current Version : 21.81.3 Same as : 21.81.3, Criticality : Optional, Type : Firmware

[-]10 Intel(R) Ethernet 10G 2P X710-T2L-t OCP
Current Version : 20.5.13 Same as : 20.5.13, Criticality : Recommended, Type : Firmware

[-]11 Intel(R) Ethernet Network Adapter X710-TL
Current Version : 20.5.13 Same as : 20.5.13, Criticality : Recommended, Type : Firmware

[-]12 Intel(R) Ethernet 10G 2P X710-T2L-t Adapter
Current Version : 20.5.13 Same as : 20.5.13, Criticality : Recommended, Type : Firmware

[ ]13  iDRAC
Current Version : 5.00.10.10 Upgrade to : 5.00.20.00, Criticality : Recommended, Type : Firmware

[ ]14 NVMePCISSD Model Number: Dell Ent NVMe v2 AGN MU U.2 3.2TB
Current Version : 2.0.0 Upgrade to : 2.2.0, Criticality : Recommended, Type : Firmware

[-]15 Dell 64 Bit uEFI Diagnostics, version 4301, 4301A61, 4301.62
Current Version : 4301A61 Same as : 4301A61, Criticality : Optional, Type : Application

[-]16 Dell OS Driver Pack, 21.07.07, A00
Current Version : 21.07.07 Same as : 21.07.07, Criticality : Optional, Type : Application

[-]17 Dell EMC iDRAC Service Module Embedded Package v4.1.0.0, A00
Current Version : 4.1.0.0 Same as : 4.1.0.0, Criticality : Recommended, Type : Application

Enter your choice : 

firmwareの現状が表示されて、選択肢入力となります。

基本的には必要なもの全てに適用するため「a」を入力します。

Enter your choice : a

|--------DELL EMC System Update-----------|
[ ] represents 'not selected'
[*] represents 'selected'
[-] represents 'Component already at repository version (can be selected only if -e option is used)'
Choose:  q - Quit without update, c to Commit, <number> - To Select/Deselect, a - Select All, n - Select None
[-]1 BIOS
Current Version : 1.3.8 Same as : 1.3.8, Criticality : Recommended, Type : BIOS

[*]2 SEP Firmware, BayID: 1
Current Version : 3.56 Upgrade to : 3.57, Criticality : Optional, Type : Firmware

[-]3 Firmware for  - Disk 0 of PERC H755 Front Controller 0
Current Version : BA08 Same as : BA08, Criticality : Recommended, Type : Firmware

[-]4 Firmware for  - Disk 1 of PERC H755 Front Controller 0
Current Version : BA08 Same as : BA08, Criticality : Recommended, Type : Firmware

[-]5 Firmware for  - Disk 2 of PERC H755 Front Controller 0
Current Version : BA08 Same as : BA08, Criticality : Recommended, Type : Firmware

[-]6 Firmware for  - Disk 3 of PERC H755 Front Controller 0
Current Version : BA08 Same as : BA08, Criticality : Recommended, Type : Firmware

[*]7 PERC H755 Front Controller 0 Firmware
Current Version : 52.16.1-4074 Upgrade to : 52.16.1-4158, Criticality : Urgent, Type : Firmware

[-]8 NetXtreme BCM5720 Gigabit Ethernet PCIe (eno8403)
Current Version : 21.81.3 Same as : 21.81.3, Criticality : Optional, Type : Firmware

[-]9 NetXtreme BCM5720 Gigabit Ethernet PCIe (eno8303)
Current Version : 21.81.3 Same as : 21.81.3, Criticality : Optional, Type : Firmware

[-]10 Intel(R) Ethernet 10G 2P X710-T2L-t OCP
Current Version : 20.5.13 Same as : 20.5.13, Criticality : Recommended, Type : Firmware

[-]11 Intel(R) Ethernet Network Adapter X710-TL
Current Version : 20.5.13 Same as : 20.5.13, Criticality : Recommended, Type : Firmware

[-]12 Intel(R) Ethernet 10G 2P X710-T2L-t Adapter
Current Version : 20.5.13 Same as : 20.5.13, Criticality : Recommended, Type : Firmware

[*]13  iDRAC
Current Version : 5.00.10.10 Upgrade to : 5.00.20.00, Criticality : Recommended, Type : Firmware

[*]14 NVMePCISSD Model Number: Dell Ent NVMe v2 AGN MU U.2 3.2TB
Current Version : 2.0.0 Upgrade to : 2.2.0, Criticality : Recommended, Type : Firmware

[-]15 Dell 64 Bit uEFI Diagnostics, version 4301, 4301A61, 4301.62
Current Version : 4301A61 Same as : 4301A61, Criticality : Optional, Type : Application

[-]16 Dell OS Driver Pack, 21.07.07, A00
Current Version : 21.07.07 Same as : 21.07.07, Criticality : Optional, Type : Application

[-]17 Dell EMC iDRAC Service Module Embedded Package v4.1.0.0, A00
Current Version : 4.1.0.0 Same as : 4.1.0.0, Criticality : Recommended, Type : Application

Enter your choice : 

そうするとインストールが必要なものについては「[*]」という表示に変わります。

インストールするものを選択したら「c」と入力し、ダウンロードと適用を開始します。

Enter your choice : c
Trying to connect using https
Fetching iDRAC-with-Lifecycle-Controller_Firmware_19C2M_LN64_5.00.20.00_A00 ...
Trying to connect using https
Fetching iDRAC-with-Lifecycle-Controller_Firmware_19C2M_LN64_5.00.20.00_A00.BIN ...
Trying to connect using https
Fetching SAS-RAID_Firmware_6MTTK_LN64_52.16.1-4158_A05_01 ...
Trying to connect using https
Fetching SAS-RAID_Firmware_6MTTK_LN64_52.16.1-4158_A05_01.BIN ...
Trying to connect using https
Fetching Express-Flash-PCIe-SSD_Firmware_FJK0C_LN64_2.2.0_A01 ...
Trying to connect using https
Fetching Express-Flash-PCIe-SSD_Firmware_FJK0C_LN64_2.2.0_A01.BIN ...
Trying to connect using https
Fetching Firmware_TKKM5_LN64_3.57_A00 ...
Trying to connect using https
Fetching Firmware_TKKM5_LN64_3.57_A00.BIN ...
Installing iDRAC-with-Lifecycle-Controller_Firmware_19C2M_LN64_5.00.20.00_A00
Installed successfully
Installing SAS-RAID_Firmware_6MTTK_LN64_52.16.1-4158_A05_01
Installed successfully
Installing Express-Flash-PCIe-SSD_Firmware_FJK0C_LN64_2.2.0_A01
Installed successfully
Installing Firmware_TKKM5_LN64_3.57_A00
Installed successfully
Please restart the system for successful update(s) to take effect
Done! Please run 'dsu --inventory' to check the inventory
Exiting DSU!
root@ubuntu:~#

1.5. 再起動

firmwareは再起動時に適用されるため、再起動します。

1.6. 確認

root@ubuntu:~# dsu --inventory
DELL EMC System Update 1.9.2.0
Copyright (C) 2014 -- 2021 DELL EMC Proprietary.
Downloading the Index catalog
Extracting /usr/libexec/dell_dup/CatalogIndex.gz
Reading the Index catalog
Downloading the catalog
Extracting /usr/libexec/dell_dup/Catalog.gz
Reading the catalog ...
Verifying inventory collector installation
Trying to connect using https
Fetching invcol_8YPK7_LN64_21_12_200_1196_A00.BIN ...
Getting System Inventory ...

1. BIOS, BIOS  ( Version : 1.3.8 )

2. FRMW, Power Supply  ( Version : 00.2A.2A )

3. FRMW, Power Supply  ( Version : 00.2A.2A )

4. FRMW, SEP Firmware, BayID: 1  ( Version : 3.57 )

5. FRMW, Firmware for  - Disk 0 of PERC H755 Front Controller 0    ( Version : BA08 )

6. FRMW, Firmware for  - Disk 1 of PERC H755 Front Controller 0    ( Version : BA08 )

7. FRMW, Firmware for  - Disk 2 of PERC H755 Front Controller 0    ( Version : BA08 )

8. FRMW, Firmware for  - Disk 3 of PERC H755 Front Controller 0    ( Version : BA08 )

9. FRMW, PERC H755 Front Controller 0 Firmware  ( Version : 52.16.1-4074 )

10. FRMW, NetXtreme BCM5720 Gigabit Ethernet PCIe (eno8403)  ( Version : 21.81.3 )

11. FRMW, NetXtreme BCM5720 Gigabit Ethernet PCIe (eno8303)  ( Version : 21.81.3 )

12. FRMW, Intel(R) Ethernet 10G 2P X710-T2L-t OCP  ( Version : 20.5.13 )

13. FRMW, Intel(R) Ethernet Network Adapter X710-TL  ( Version : 20.5.13 )

14. FRMW, Intel(R) Ethernet 10G 2P X710-T2L-t Adapter  ( Version : 20.5.13 )

15. FRMW, Intel(R) Ethernet Network Adapter X710-TL  ( Version : 20.5.13 )

16. FRMW,  iDRAC  ( Version : 5.00.20.00 )

17. FRMW, NVMePCISSD Model Number: Dell Ent NVMe v2 AGN MU U.2 3.2TB  ( Version : 2.2.0 )

18. FRMW, NVMePCISSD Model Number: Dell Ent NVMe v2 AGN MU U.2 3.2TB  ( Version : 2.2.0 )

19. APAC, Lifecycle Controller  ( Version : 5.00.20.00 )

20. APAC, Dell 64 Bit uEFI Diagnostics, version 4301, 4301A61, 4301.62  ( Version : 4301A61 )

21. APAC, Dell OS Driver Pack, 21.07.07, A00  ( Version : 21.07.07 )

22. APAC, Dell EMC iDRAC Service Module Embedded Package v4.1.0.0, A00  ( Version : 4.1.0.0 )

23. FRMW, System CPLD  ( Version : 1.0.5 )


Progress report is available at:/usr/libexec/dell_dup/DSU_STATUS.json
Exiting DSU!
root@ubuntu:~#

2. ドライバインストール

上記のDSUで「Dell OS Driver Pack」が導入されているのだが、バージョンが最新ではないことの方が多いようだ。

このため、別途手動でドライバをダウンロードしてきてインストールする必要がある。

2.1. ドライバ入手

入手方法は若干面倒で各機種のドライバダウンロードページ、たとえばPowerEdge R650ならここにアクセス。

オペレーションシステムを「Ubuntu 20.04 LTS」と限定し、ソート基準を「リリース日: 最も新しい」に変更します。

表示されるなかから「カテゴリ: OS導入用のドライバ」の「Dell OS Driver Pack」の最新版をダウンロードします。

2021/12/20時点では Drivers-for-OS-Deployment_Application_CF52W_LN_21.10.02_A00.BIN でした。

こちらもDSUと同様に「サポートされているOSのリスト」にUbuntu 20.04 LTSが含まれていませんが、問題ありません。

2.2. ドライバ適用

ダウンロードしたファイルに実行権限を与えてインストールします。

root@ubuntu:~# chmod a+x /usr/local/src/Drivers-for-OS-Deployment_Application_CF52W_LN_21.10.02_A00.BIN
root@ubuntu:~# /usr/local/src/Drivers-for-OS-Deployment_Application_CF52W_LN_21.10.02_A00.BIN
Collecting inventory...
....................................................
Running validation...

Dell OS Driver Pack, 21.07.07, A00

The version of this Update Package is newer than the currently installed version.
Software application name: Dell OS Driver Pack, 21.07.07, A00
Package version: 21.10.02
Installed version: 21.07.07



Continue? Y/N:y
Executing update...
WARNING: DO NOT STOP THIS PROCESS OR INSTALL OTHER PRODUCTS WHILE UPDATE IS IN PROGRESS.
THESE ACTIONS MAY CAUSE YOUR SYSTEM TO BECOME UNSTABLE!
..............................................................................................................................................................................
 Update Success
The update completed successfully.
root@ubuntu:~#

DSUにより「21.07.07」がインストールされていたものが「21.10.02」にアップデートされました。

3. OSMAインストール

3.1. OSMAのレポジトリ確認

Ubuntu用 Dell OpenManage は Dell EMC OpenManage Ubuntu and Debian Repositories にて必要なレポジトリ情報を確認する。

機種によって変わってくるので、Availability Matrixをよく見ること。

例えばPowerEdge R640だと OMSA v10.1.0.1 だが、PowerEdge R650では OMSA v10.0.1 + iSM v4.0.1 違いがあることに注意。

3.2. OMSAレポジトリファイル登録

/etc/apt/sources.list.d/linux.dell.com.sources.list にレポジトリ記述を書く。

PowerEdge R640だったら下記

deb http://linux.dell.com/repo/community/openmanage/10101/focal focal main

PowerEdhe R650なら下記

deb http://linux.dell.com/repo/community/openmanage/1001/focal focal main
deb http://linux.dell.com/repo/community/openmanage/iSM/401/focal focal main

3.3. レポジトリの公開鍵登録

最近はレポジトリの公開鍵を登録しないといけないので、DELL OMSAレポジトリで使用される公開鍵をダウンロードして、aptに登録する。

root@ubuntu:~# wget https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc
--2021-12-20 01:20:41--  https://linux.dell.com/repo/pgp_pubkeys/0x1285491434D8786F.asc
Resolving linux.dell.com (linux.dell.com)... 143.166.156.113
Connecting to linux.dell.com (linux.dell.com)|143.166.156.113|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4250 (4.2K) [text/plain]
Saving to: ‘0x1285491434D8786F.asc’

0x1285491434D8786F. 100%[===================>]   4.15K  --.-KB/s    in 0s

2021-12-20 01:20:41 (364 MB/s) - ‘0x1285491434D8786F.asc’ saved [4250/4250]

root@ubuntu:~# apt-key add 0x1285491434D8786F.asc
OK
root@ubuntu:~#

3.4. レポジトリ更新

「apt update」でレポジトリ情報を更新する

3.5. OSMAインストール

「apt install srvadmin-all」でOMSAをインストール

3.6 iSMインストール(オプション)

レポジトリ一覧に「iSM」がある場合、「apt install dcism」でインストールする。

インストール後iSMを動作させるには再起動するか「systemctl start dcismeng.service」を実行する。

iSMがインストールされていて、動作している場合、iDRACの[システム]-[ホストOS]で下記の様な表示がある。

動作していない場合は「RAC0690」というエラーが表示される。なお、手動でdcismeng.serviceを起動した場合、iDRAC側に反映されるまで30秒程度かかる。

RHEL/CentOS 7でphp 7.xを使う方法(2023/10/30更新)

RHEL7 / CentOS7のphpは5.4.16である。

新しいバージョンのphpを使う場合はソースからコンパイルして導入するか、3rdレポジトリを利用する必要がある。

有名なのはremiだが、Oracle Linuxにもあった。

うちはCentOS7だけど、 Oracle Linuxのol7_developer_php72 ol7_developer_php74レポジトリを追加する形で使っている。

1. remi-php?? レポジトリ

標準のphpを新しいバージョンで置き換える「remi-php??」レポジトリ(こちらはphpコマンドが置き換わる)と、標準のPHPはそのままに、そして後述のSCLとも共存できる「remi-safe」レポジトリ(こちらはphp73コマンドなどになる)というものもある。

意外なことに2022年秋リリース予定のphp 8.2についてもRC版で php 8.3も提供され始めた

Web: https://rpms.remirepo.net/enterprise/7/
提供中PHPバージョン: 8.3, 8.2, 8.1, 8.0, 7.4, 7.3, 7.2, 7.1, 7.0, 5.6
EOLしたもの: 5.5, 5.4

2. PHP for Oracle Linux

Web: http://yum.oracle.com/oracle-linux-php.html
PHPバージョン: 7.4, 7.2, 7.1, 7.0
EOLしたもの: 7.2, 7.1, 7.0

php v7.2に置き換える場合の手順

# yum install yum-utils
# curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle https://yum.oracle.com/RPM-GPG-KEY-oracle-ol7
# curl -o /etc/yum.repos.d/public-yum-ol7.repo https://yum.oracle.com/public-yum-ol7.repo
# yum-config-manager --disable ol7_\*
# yum-config-manager --enable ol7_developer_php72
# 「yum install php」もしくは「yum update」で既存phpパッケージをphp72にアップデート
# systemctl restart httpd

上記でdisableを忘れるとOracle Linuxにアップデートしてしまうかもしれないので注意すること。また、先にyum-utilsをインストールしておくこと

2019/09/30 追記

Oracle Linux(Oracle Cloud Always Freeインスタンスなど)を使っている場合は「yum install oracle-php-release-el7」を実行することで、PHP拡張レポジトリが導入されます。導入直後は「ol7_developer_php72」が有効化されているので、上記と同じ「yum-config-manager –disable ol7_*」とか「yum-config-manager –enable ol7_developer_php72」で有効/無効を切り替えてください。

2020/07/20 追記 、2020/09/07修正

ol7_developer_php74は上記の http://yum.oracle.com/public-yum-ol7.repo には含まれてないようです。(Oracle Linuxで提供されるoracle-php-releaseパッケージに分離している)

また、Oralcleのphp 7.4はol7_addons収録のoniguruma-5.9.5が要求されます。 epel収録のoniguruma-6.8.2 がインストールされていると「Requires: libonig.so.2()(64bit)」というエラーになりますので、注意が必要です。

これを考慮して /etc/yum.repos.d/ol7_developer_php74.repo を書くと以下の様になる。

[ol7_developer_php74]
name=Oracle Linux $releasever PHP 7.4 Packages for Development and test ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/developer/php74/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol7_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

そしてepelのonigurumaを使用しないよう、 epelに関する設定の中に「exclude=oniguruma jq」を追加しておく必要がある。(epelのjqパッケージはepelのonigurumaを要求しているので一緒に除外する必要がある)

/etc/yum.repos.d/epel.repo の該当部分だけ抜き出したもの

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch&infra=$infra&content=$contentdir
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
exclude=oniguruma jq

3. webtatic

2019/10/26の更新が最後になっており、現状使うべきでは無い。

Web: https://webtatic.com/
提供中PHPバージョン: 7.2, 7.1
EOLしたもの:7.0, 5.6

4. Software Collection (SCL)

CentOSのwikiに「Using PHP 7.x on CentOS 7.4」という記載があった。
CentOS Software Collectionレポジトリにあるという。

確認してみると、「rh-php70~」「rh-php71~」「rh-php72~」と標準のパッケージ名とは別に設定されているものがあった。また、rh-phpにないものを補完するための「sclo-php~」というのもあった。

PHP 7.2 by Software Collections」とRedHat DEVELOPER BLOGの「PHP Configuration Tips」に参考になる記述があるが、FastCGIを使うための装備はあるが、mod_phpを使うための装備はない。

Remiさんとこのblog「PHP 7.2 as Software Collection」にSCLとRemiレポジトリの違いが書かれている。また、複数バージョンのPHPを1サーバで共存させる場合の手法「My PHP Workstation」も公開されている。

# yum -y install centos-release-scl.noarch
<略>
================================================================================
 Package                    アーキテクチャー
                                        バージョン            リポジトリー
                                                                           容量
================================================================================
インストール中:
 centos-release-scl         noarch      2-2.el7.centos        extras       12 k
依存性関連でのインストールをします:
 centos-release-scl-rh      noarch      2-2.el7.centos        extras       12 k

トランザクションの要約
================================================================================
インストール  1 パッケージ (+1 個の依存関係のパッケージ)

総ダウンロード容量: 24 k
インストール容量: 39 k
<略>
# yum search rh-php
<略>
============================= N/S matched: rh-php ==============================
rh-php70-runtime.x86_64 : Package that handles rh-php70 Software Collection.
rh-php70-scldevel.x86_64 : Package shipping development files for rh-php70
rh-php71-runtime.x86_64 : Package that handles rh-php71 Software Collection.
rh-php71-scldevel.x86_64 : Package shipping development files for rh-php71
rh-php72-runtime.x86_64 : Package that handles rh-php72 Software Collection.
rh-php72-scldevel.x86_64 : Package shipping development files for rh-php72
rh-php70.x86_64 : Package that installs PHP 7.0
rh-php70-build.x86_64 : Package shipping basic build configuration
rh-php70-php.x86_64 : PHP scripting language for creating dynamic web sites
rh-php70-php-bcmath.x86_64 : A module for PHP applications for using the bcmath
                           : library
rh-php70-php-cli.x86_64 : Command-line interface for PHP
rh-php70-php-common.x86_64 : Common files for PHP
rh-php70-php-dba.x86_64 : A database abstraction layer module for PHP
                        : applications
rh-php70-php-dbg.x86_64 : The interactive PHP debugger
rh-php70-php-devel.x86_64 : Files needed for building PHP extensions
rh-php70-php-embedded.x86_64 : PHP library for embedding in applications
rh-php70-php-enchant.x86_64 : Enchant spelling extension for PHP applications
rh-php70-php-fpm.x86_64 : PHP FastCGI Process Manager
rh-php70-php-gd.x86_64 : A module for PHP applications for using the gd graphics
                       : library
rh-php70-php-gmp.x86_64 : A module for PHP applications for using the GNU MP
                        : library
rh-php70-php-intl.x86_64 : Internationalization extension for PHP applications
rh-php70-php-json.x86_64 : JavaScript Object Notation extension for PHP
rh-php70-php-ldap.x86_64 : A module for PHP applications that use LDAP
rh-php70-php-mbstring.x86_64 : A module for PHP applications which need
                             : multi-byte string handling
rh-php70-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL
                            : databases
rh-php70-php-odbc.x86_64 : A module for PHP applications that use ODBC databases
rh-php70-php-opcache.x86_64 : The Zend OPcache
rh-php70-php-pdo.x86_64 : A database access abstraction module for PHP
                        : applications
rh-php70-php-pear.noarch : PHP Extension and Application Repository framework
rh-php70-php-pgsql.x86_64 : A PostgreSQL database module for PHP
rh-php70-php-process.x86_64 : Modules for PHP script using system process
                            : interfaces
rh-php70-php-pspell.x86_64 : A module for PHP applications for using pspell
                           : interfaces
rh-php70-php-recode.x86_64 : A module for PHP applications for using the recode
                           : library
rh-php70-php-snmp.x86_64 : A module for PHP applications that query SNMP-managed
                         : devices
rh-php70-php-soap.x86_64 : A module for PHP applications that use the SOAP
                         : protocol
rh-php70-php-xml.x86_64 : A module for PHP applications which use XML
rh-php70-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC
                           : protocol
rh-php70-php-zip.x86_64 : ZIP archive management extension for PHP
rh-php71.x86_64 : Package that installs PHP 7.1
rh-php71-build.x86_64 : Package shipping basic build configuration
rh-php71-php.x86_64 : PHP scripting language for creating dynamic web sites
rh-php71-php-bcmath.x86_64 : A module for PHP applications for using the bcmath
                           : library
rh-php71-php-cli.x86_64 : Command-line interface for PHP
rh-php71-php-common.x86_64 : Common files for PHP
rh-php71-php-dba.x86_64 : A database abstraction layer module for PHP
                        : applications
rh-php71-php-dbg.x86_64 : The interactive PHP debugger
rh-php71-php-devel.x86_64 : Files needed for building PHP extensions
rh-php71-php-embedded.x86_64 : PHP library for embedding in applications
rh-php71-php-enchant.x86_64 : Enchant spelling extension for PHP applications
rh-php71-php-fpm.x86_64 : PHP FastCGI Process Manager
rh-php71-php-gd.x86_64 : A module for PHP applications for using the gd graphics
                       : library
rh-php71-php-gmp.x86_64 : A module for PHP applications for using the GNU MP
                        : library
rh-php71-php-intl.x86_64 : Internationalization extension for PHP applications
rh-php71-php-json.x86_64 : JavaScript Object Notation extension for PHP
rh-php71-php-ldap.x86_64 : A module for PHP applications that use LDAP
rh-php71-php-mbstring.x86_64 : A module for PHP applications which need
                             : multi-byte string handling
rh-php71-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL
                            : databases
rh-php71-php-odbc.x86_64 : A module for PHP applications that use ODBC databases
rh-php71-php-opcache.x86_64 : The Zend OPcache
rh-php71-php-pdo.x86_64 : A database access abstraction module for PHP
                        : applications
rh-php71-php-pear.noarch : PHP Extension and Application Repository framework
rh-php71-php-pecl-apcu.x86_64 : APC User Cache
rh-php71-php-pecl-apcu-devel.x86_64 : APCu developer files (header)
rh-php71-php-pgsql.x86_64 : A PostgreSQL database module for PHP
rh-php71-php-process.x86_64 : Modules for PHP script using system process
                            : interfaces
rh-php71-php-pspell.x86_64 : A module for PHP applications for using pspell
                           : interfaces
rh-php71-php-recode.x86_64 : A module for PHP applications for using the recode
                           : library
rh-php71-php-snmp.x86_64 : A module for PHP applications that query SNMP-managed
                         : devices
rh-php71-php-soap.x86_64 : A module for PHP applications that use the SOAP
                         : protocol
rh-php71-php-xml.x86_64 : A module for PHP applications which use XML
rh-php71-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC
                           : protocol
rh-php71-php-zip.x86_64 : ZIP archive management extension for PHP
rh-php72.x86_64 : Package that installs PHP 7.2
rh-php72-build.x86_64 : Package shipping basic build configuration
rh-php72-php.x86_64 : PHP scripting language for creating dynamic web sites
rh-php72-php-bcmath.x86_64 : A module for PHP applications for using the bcmath
                           : library
rh-php72-php-cli.x86_64 : Command-line interface for PHP
rh-php72-php-common.x86_64 : Common files for PHP
rh-php72-php-dba.x86_64 : A database abstraction layer module for PHP
                        : applications
rh-php72-php-dbg.x86_64 : The interactive PHP debugger
rh-php72-php-devel.x86_64 : Files needed for building PHP extensions
rh-php72-php-embedded.x86_64 : PHP library for embedding in applications
rh-php72-php-enchant.x86_64 : Enchant spelling extension for PHP applications
rh-php72-php-fpm.x86_64 : PHP FastCGI Process Manager
rh-php72-php-gd.x86_64 : A module for PHP applications for using the gd graphics
                       : library
rh-php72-php-gmp.x86_64 : A module for PHP applications for using the GNU MP
                        : library
rh-php72-php-intl.x86_64 : Internationalization extension for PHP applications
rh-php72-php-json.x86_64 : JavaScript Object Notation extension for PHP
rh-php72-php-ldap.x86_64 : A module for PHP applications that use LDAP
rh-php72-php-mbstring.x86_64 : A module for PHP applications which need
                             : multi-byte string handling
rh-php72-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL
                            : databases
rh-php72-php-odbc.x86_64 : A module for PHP applications that use ODBC databases
rh-php72-php-opcache.x86_64 : The Zend OPcache
rh-php72-php-pdo.x86_64 : A database access abstraction module for PHP
                        : applications
rh-php72-php-pear.noarch : PHP Extension and Application Repository framework
rh-php72-php-pecl-apcu.x86_64 : APC User Cache
rh-php72-php-pecl-apcu-devel.x86_64 : APCu developer files (header)
rh-php72-php-pgsql.x86_64 : A PostgreSQL database module for PHP
rh-php72-php-process.x86_64 : Modules for PHP script using system process
                            : interfaces
rh-php72-php-pspell.x86_64 : A module for PHP applications for using pspell
                           : interfaces
rh-php72-php-recode.x86_64 : A module for PHP applications for using the recode
                           : library
rh-php72-php-snmp.x86_64 : A module for PHP applications that query SNMP-managed
                         : devices
rh-php72-php-soap.x86_64 : A module for PHP applications that use the SOAP
                         : protocol
rh-php72-php-xml.x86_64 : A module for PHP applications which use XML
rh-php72-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC
                           : protocol
rh-php72-php-zip.x86_64 : ZIP archive management extension for PHP

  Name and summary matches only, use "search all" for everything.
#

RHEL6/CentOS6向けの3rdパーティーrepo

RHEL6/CentO6で使われているphpがver5.3.3と古い。
より新しいバージョンのphpを要求されている。

そんな時に、頼る先は、公式以外からリリースされているRPM群

yumでとってこれる先として代表的なもの

EPEL
Fedoraプロジェクトから出ているレポジトリ。
標準にないものを追加する方が主体で、オリジナルより新しいバージョンの提供はあまりやらない。
Cent OS6の場合「yum install epel-release」で追加できる。

RepoForge
旧名:RPMforge
標準に対するアップデートも行うし、オリジナルにないのの追加も行うし、で手広いもの。
ただ、範囲が広いので、問題が発生しやすいところがある。

IUS Community Project
mysql,php,pythonのバージョンアップを目的としたレポジトリ。
それ以外のソフトウェアについては基本的に提供されていない。
また、phpの細かいソフトウェアパッケージ群についても提供せず、基本部分のみとなっている。

Les RPM de Remi – Repository
phpのバージョンアップと、phpの細かいソフトウェアパッケージ群の提供を目的としている。
php関連をがっつり入れたい場合はコレになるかな?

・Oracle Linux
番外的なところがあるが、Oracle Linuxだと、追加のレポジトリで、MySQL 5.5/5.6対応のレポジトリが存在している。
状況によってはそちらを選択してもよいかもしれない。
参考:「Oracle Linux用の公開レポジトリについて」と「RHEL6/CentOS6をOracle Linuxにしてみる

CVE-2015-0235はRHEL4/CentOS4に影響する&修正版提供開始(2015/01/30 20:40版)

CVE-2015-0235 というglibcに大きめのバグが見つかった模様。

RedHat Enterprise Linux 4 / CentOS 4に対して影響があるのかどうかを調べてみた。

まずは、RedHat公式情報系

・RedHat Bugzilla:Bug 1183461 – (CVE-2015-0235) CVE-2015-0235 glibc: __nss_hostname_digits_dots() heap-based buffer overflow
 ・RHEL Knowledgebase Articles:GHOST: glibc vulnerability (CVE-2015-0235) / GHOST: glibc 脆弱性 (CVE-2015-0235)
 ・RHEL CVEデータベース:CVE-2015-0235
 ・RHEL4向け:RHSA-2015:0101:Critical: glibc security update
 ・RHEL5向け:RHSA-2015:0090:Critical: glibc security update
 ・RHEL6,RHEL7向け:RHSA-2015:0092:Critical: glibc security update

はい、RHEL4も対象になっています。

実際に確認してみるため、openwallにあるCVE-2015-0235についての詳細報告書「Qualys Security Advisory CVE-2015-0235 – GHOST: glibc gethostbyname buffer overflow」の「4 – Case studies」の記述を試してみる。

実行した際に「vulnerable」と出たら、問題あり。
「not vulnerable」だったら問題なし、というもの。

[root@cent4 201501]# mkdir security
[root@cent4 201501]# cd security/
[root@cent4 security]# rpm -qa|grep glibc|sort
警告: only V3 signatures can be verified, skipping V4 signature
glibc-2.3.4-2.57
glibc-2.3.4-2.57
glibc-common-2.3.4-2.57
glibc-devel-2.3.4-2.57
glibc-devel-2.3.4-2.57
glibc-headers-2.3.4-2.57
glibc-kernheaders-2.4-9.1.103.EL
[root@cent4 security]# cat > GHOST.c << EOF
> #include <netdb.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <errno.h>
>
> #define CANARY "in_the_coal_mine"
>
> struct {
>   char buffer[1024];
>   char canary[sizeof(CANARY)];
> } temp = { "buffer", CANARY };
>
> int main(void) {
>   struct hostent resbuf;
>   struct hostent *result;
>   int herrno;
>   int retval;
>
>   /*** strlen (name) = size_needed - sizeof (*host_addr) - sizeof (*h_addr_ptrs) - 1; ***/
>   size_t len = sizeof(temp.buffer) - 16*sizeof(unsigned char) - 2*sizeof(char *) - 1;
>   char name[sizeof(temp.buffer)];
>   memset(name, '0', len);
>   name[len] = '\0';
>
>   retval = gethostbyname_r(name, &resbuf, temp.buffer, sizeof(temp.buffer), &result, &herrno);
>
>   if (strcmp(temp.canary, CANARY) != 0) {
>     puts("vulnerable");
>     exit(EXIT_SUCCESS);
>   }
>   if (retval == ERANGE) {
>     puts("not vulnerable");
>     exit(EXIT_SUCCESS);
>   }
>   puts("should not happen");
>   exit(EXIT_FAILURE);
> }
> EOF
[root@cent4 security]# ls
GHOST.c
[root@cent4 security]# gcc GHOST.c -o GHOST
[root@cent4 security]# ls
GHOST  GHOST.c
[root@cent4 security]# ./GHOST
vulnerable
[root@cent4 security]#

「vulnerable」なので、「問題あり」確定です。

修正版については、RHEL4の通常サポートは終了。現在はELSと呼ばれる特別な契約者向けに提供されているものだけが更新されています。

前述の「RHSA-2015:0101 Critical: glibc security update」にあるとおり、修正されたglibcのバージョンは「glibc-2.3.4-2.57.el4.2」となります。

ただ、このバージョンは通常の方法ではRHEL4およびCentOS4には提供されません。

しかし、RHEL4のソースを元にOracleで再構成した、Oracle Linux 4は、まだサポートを行っています。
こちらから、ファイルを持ってくることで対応が可能となっています。

Oracle Linux 4向けのSource RPMは、「https://oss.oracle.com/el4/SRPMS-updates/」にて提供されています。
Oracle LinuxではRHEL4とパッケージバージョンが若干異なり「glibc-2.3.4-2.57.0.1.el4.1」となります。
https://oss.oracle.com/el4/SRPMS-updates/glibc-2.3.4-2.57.0.1.el4.1.src.rpm

ただ、今回のことを受けて更新されたコンパイル済みのRPMは、glibc関連だけではなかったりします。
nptl-devel, nscdも更新されています。
このため、今回については、glibcのSource RPMだけを持ってきてコンパイルして適用、というのは、あまりお薦めできないような感じです。

コンパイル済みのRPMファイルについて、Oracle Linuxでは「Oracle Public Yum Server」としてレポジトリを公開しており、適切な設定を行うことで、RHEL4/CentOS4からOracle Linux 4に乗り換え、yumコマンドによるアップデートが行えるようになります。

コンパイル済みRPMファイル自体は「http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/」以下を探せば出てきますので、ページを「2015」で検索し出てくるパッケージが自分のサーバにインストールされているかを確認し、ダウンロードして適用する、ということが可能です。

しかし、依存関係解決とか面倒なので、これを機会にOracle Linux 4に乗り換えてしまう、というのも手かもしれません。

切り替え方法については、「RHEL4/CentOS4をOracle Linux4に!」にて紹介していますので、興味がある方は参照してみてください。
設定は非常に簡単です。

こちらの環境ではOralce Linux 4になっているため「yum update -y」で更新が完了しました。

更新後、再度テストプログラムを実行してみます。

[root@cent4 security]# ./GHOST
not vulnerable
[root@cent4 security]#

「not vulnerable」と出力されるので、脆弱性は修正されている、ということになります。

これで、一安心、といったところです。


<以下は修正版のglibcが出る前に書いたものです。資料として残しておきます>

glibcに大きめのバグが見つかった模様。
CVE-2015-0235

・RedHat Bugzilla:Bug 1183461 – (CVE-2015-0235) CVE-2015-0235 glibc: __nss_hostname_digits_dots() heap-based buffer overflow
 ・RHEL CVEデータベース:CVE-2015-0235
 ・RHEL5向け:RHSA-2015:0090-1:Critical: glibc security update
 ・RHEL6,RHEL7向け:RHSA-2015:0092-1:Critical: glibc security update

RHEL4/CentOS4についての記載が見付からない。

Oracle LinuxのSource RPM置き場 https://oss.oracle.com/el4/SRPMS-updates/ を見ても、2015/01/28 10:35時点では何も無し。

(2015/01/28 23:00 追加)
1時間ぐらい前に「GHOST: glibc vulnerability (CVE-2015-0235)」にRed Hat Enterprise Linux 4 Extended Life Cycle Supportに関する記述が追加された。
いまのところ修正版に関する記述はないが、RHEL4に脆弱性がある、という公式告知になっている。

(2015/01/29 19:30追加)
Red Hat Enterprise Linux ELS (v. 4)に対するSecurity Advisoryが公開された。
RHSA-2015:0101 Critical: glibc security update

ELS契約者向けに glibc-2.3.4-2.57.el4.2 としてリリースされたので、そのうちOracle Linuxにも波及してくるものと想定されるが、現状はまだ公開されていない。

(2015/01/30 14:20追加)
https://oss.oracle.com/el4/SRPMS-updates/ に、glibc-2.3.4-2.57.0.1.el4.1.src.rpmが置かれました。
Oralce Linux 4のpublic yumレポジトリのほう(repo url)にはまだ登録されていないようです。

(2015/01/30 16:30追加)
Oracle Linux 4のpublic yumレポジトリでの配布が始まりました。

以下の16:20ぐらいの段階ではi386(32bit)版のみだったのですが、16:37にはx86_64(64bit)版のディレクトリにもファイルが置かれ始めました。

i386(32bit)版
 http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/glibc-common-2.3.4-2.57.0.1.el4.1.i386.rpm
 http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/glibc-devel-2.3.4-2.57.0.1.el4.1.i386.rpm
 http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/glibc-headers-2.3.4-2.57.0.1.el4.1.i386.rpm
 http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/glibc-profile-2.3.4-2.57.0.1.el4.1.i386.rpm
 http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/glibc-utils-2.3.4-2.57.0.1.el4.1.i386.rpm
 http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/nptl-devel-2.3.4-2.57.0.1.el4.1.i386.rpm
 http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/nptl-devel-2.3.4-2.57.0.1.el4.1.i686.rpm
 http://public-yum.oracle.com/repo/EnterpriseLinux/EL4/latest/i386/getPackage/nscd-2.3.4-2.57.0.1.el4.1.i386.rpm

64bit(x86_64)版
 

(追加部分おわり)

openwallにあるCVE-2015-0235についての詳細報告書「Qualys Security Advisory CVE-2015-0235 – GHOST: glibc gethostbyname buffer overflow」の「4 – Case studies」には事象確認方法が記載されている。

下記をコンパイルして、実行した際に「vulnerable」と出たら、問題あり。
「not vulnerable」だったら問題なし、というもの。

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

#define CANARY "in_the_coal_mine"

struct {
  char buffer[1024];
  char canary[sizeof(CANARY)];
} temp = { "buffer", CANARY };

int main(void) {
  struct hostent resbuf;
  struct hostent *result;
  int herrno;
  int retval;

  /*** strlen (name) = size_needed - sizeof (*host_addr) - sizeof (*h_addr_ptrs) - 1; ***/
  size_t len = sizeof(temp.buffer) - 16*sizeof(unsigned char) - 2*sizeof(char *) - 1;
  char name[sizeof(temp.buffer)];
  memset(name, '0', len);
  name[len] = '\0';

  retval = gethostbyname_r(name, &resbuf, temp.buffer, sizeof(temp.buffer), &result, &herrno);

  if (strcmp(temp.canary, CANARY) != 0) {
    puts("vulnerable");
    exit(EXIT_SUCCESS);
  }
  if (retval == ERANGE) {
    puts("not vulnerable");
    exit(EXIT_SUCCESS);
  }
  puts("should not happen");
  exit(EXIT_FAILURE);
}

さて・・・CentOS4ではどうなっているのか?

[root@cent4 201501]# mkdir security
[root@cent4 201501]# cd security/
[root@cent4 security]# rpm -qa|grep glibc|sort
警告: only V3 signatures can be verified, skipping V4 signature
glibc-2.3.4-2.57
glibc-2.3.4-2.57
glibc-common-2.3.4-2.57
glibc-devel-2.3.4-2.57
glibc-devel-2.3.4-2.57
glibc-headers-2.3.4-2.57
glibc-kernheaders-2.4-9.1.103.EL
[root@cent4 security]# cat > GHOST.c << EOF
> #include <netdb.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <errno.h>
>
> #define CANARY "in_the_coal_mine"
>
> struct {
>   char buffer[1024];
>   char canary[sizeof(CANARY)];
> } temp = { "buffer", CANARY };
>
> int main(void) {
>   struct hostent resbuf;
>   struct hostent *result;
>   int herrno;
>   int retval;
>
>   /*** strlen (name) = size_needed - sizeof (*host_addr) - sizeof (*h_addr_ptrs) - 1; ***/
>   size_t len = sizeof(temp.buffer) - 16*sizeof(unsigned char) - 2*sizeof(char *) - 1;
>   char name[sizeof(temp.buffer)];
>   memset(name, '0', len);
>   name[len] = '\0';
>
>   retval = gethostbyname_r(name, &resbuf, temp.buffer, sizeof(temp.buffer), &result, &herrno);
>
>   if (strcmp(temp.canary, CANARY) != 0) {
>     puts("vulnerable");
>     exit(EXIT_SUCCESS);
>   }
>   if (retval == ERANGE) {
>     puts("not vulnerable");
>     exit(EXIT_SUCCESS);
>   }
>   puts("should not happen");
>   exit(EXIT_FAILURE);
> }
> EOF
[root@cent4 security]# ls
GHOST.c
[root@cent4 security]# gcc GHOST.c -o GHOST
[root@cent4 security]# ls
GHOST  GHOST.c
[root@cent4 security]# ./GHOST
vulnerable
[root@cent4 security]#

駄目でした。

とりあえず、続報待ちということで・・・

(2015/01/30 16:50追記)
Oralce public yum repoで提供されたのでアップデートを行い、試験実施。

[root@cent4 security]# ./ghost
not vulnerable
[root@cent4 security]#

問題がなくなったことを確認できました。

なお、Oracle Linux public レポジトリからyumコマンドを使ってファイルを持ってこれるようにするには「RHEL4/CentOS4をOracle Linux4に!」で紹介しているようにOracle Linuxに切り替えてしまう、というのが簡単でいいと思います。