AlmaLinux10にRKHunterインストール

             システムチェック rkhunter  ************************************************************************

           ♯dnf install epel-release

[root@falcon21 ~]# dnf config-manager –set-enabled crb

[root@falcon21 ~]# dnf -y install rkhunter
メタデータの期限切れの最終確認: 2:54:13 前の 2025年11月22日 15時49分55秒 に実施しました。
引数に一致する結果がありません: rkhunter
エラー: 一致するものが見つかりません: rkhunter

[root@falcon21 ~]# dnf –enablerepo=epel -y install rkhunter
メタデータの期限切れの最終確認: 2:59:26 前の 2025年11月22日 15時49分55秒 に実施しました。
引数に一致する結果がありません: rkhunter
エラー: 一致するものが見つかりません: rkhunter



***********************************************************************

2025年12月29日
      ソースコードからのインストール

必要なツールをインストール
[root@falcon21 ~]# dnf install wget tar perl-interpreter
メタデータの期限切れの最終確認: 0:17:00 前の 2025年12月29日 13時29分30秒 に実施しました。
パッケージ wget-1.24.5-5.el10.x86_64 は既にインストールされています。
パッケージ tar-2:1.35-7.el10.x86_64 は既にインストールされています。
パッケージ perl-interpreter-4:5.40.2-512.2.el10_0.x86_64 は既にインストールされています。
依存関係が解決しました。
行うべきことはありません。
完了しました!

—————-

ソースコードのダウンロードと展開
[root@falcon21 ~]# cd /tmp

https://sourceforge.net/projects/rkhunter/にアクセス、rkhunter-1.4.6.tar.gzをダウンロード
/tmp へアップロード

[root@falcon21 tmp]# tar -xvf rkhunter-1.4.6.tar.gz

[root@falcon21 tmp]# cd rkhunter-1.4.6


インストールスクリプトの実行
[root@falcon21 rkhunter-1.4.6]# ./installer.sh –layout default –install
Checking system for:
Rootkit Hunter installer files: found
A web file download command: wget found
Starting update:
Checking installation directory “/usr/local”: it exists and is writable.
Checking installation directories:
Directory /usr/local/share/doc/rkhunter-1.4.6: exists and is writable.
Directory /usr/local/share/man/man8: exists and is writable.
Directory /etc: exists and is writable.
Directory /usr/local/bin: exists and is writable.
Directory /usr/local/lib64: exists and is writable.
Directory /var/lib: exists and is writable.
Directory /usr/local/lib64/rkhunter/scripts: exists and is writable.
Directory /var/lib/rkhunter/db: exists and is writable.
Directory /var/lib/rkhunter/tmp: exists and is writable.
Directory /var/lib/rkhunter/db/i18n: exists and is writable.
Directory /var/lib/rkhunter/db/signatures: exists and is writable.
Installing check_modules.pl: OK
Installing filehashsha.pl: OK
Installing stat.pl: OK
Installing readlink.sh: OK
Installing backdoorports.dat: OK
Installing mirrors.dat: Locally modified – not overwritten
Installing programs_bad.dat: OK
Installing suspscan.dat: OK
Installing rkhunter.8: OK
Installing ACKNOWLEDGMENTS: OK
Installing CHANGELOG: OK
Installing FAQ: OK
Installing LICENSE: OK
Installing README: OK
Installing language support files: OK
Installing ClamAV signatures: OK
Installing rkhunter: OK
Installing rkhunter.conf in no-clobber mode: OK
>>>
>>> PLEASE NOTE: inspect for update changes in “/etc/rkhunter.conf.31382”,
>>> and apply to either “/etc/rkhunter.conf” or your local configuration
>>> file before running Rootkit Hunter.
>>>
Update complete

注意:Rootkit Hunter を実行する前に、「/etc/rkhunter.conf.31382」の更新変更を確認し、
>>> 「/etc/rkhunter.conf」またはローカル設定ファイルに適用してください。
>>>

———————
root@falcon21:~# vi /etc/rkhunter.conf
107 UPDATE_MIRRORS=1
122 MIRRORS_MODE=0
136 MAIL-ON-WARNING=hayato@falcon21.space root@falcon21.space
160 TMPDIR=/var/lib/rkhunter/tmp
169 DBDIR=/var/lib/rkhunter/db
177 SCRIPTDIR=/usr/local/lib/rkhunter/scripts
208 LANGUAGE=ja
234 LOGFILE=/var/log/rkhunter.log
243 APPEND_LOG=0
309 ALLOW_SSH_ROOT_USER=no

1333 INSTALLDIR=/usr/local
1334 DBDIR=/var/lib/rkhunter/db
1335 SCRIPTDIR=/usr/local/lib64/rkhunter/scripts
1336 TMPDIR=/var/lib/rkhunter/tmp
1337 USER_FILEPROP_FILES_DIRS=/etc/rkhunter.conf

———————-

動作確認と初期化
sudo /usr/local/bin/rkhunter –version

[root@falcon21 ~]# /usr/local/bin/rkhunter –version
grep: warning: stray \ before –
grep: warning: stray \ before +
Rootkit Hunter 1.4.6

This software was developed by the Rootkit Hunter project team.
Please review your rkhunter configuration files before using.
Please review the documentation before posting bug reports or questions.
To report bugs, provide patches or comments, please go to:
http://rkhunter.sourceforge.net

To ask questions about rkhunter, please use the rkhunter-users mailing list.
Note this is a moderated list: please subscribe before posting.

Rootkit Hunter comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under the
terms of the GNU General Public License. See the LICENSE file for details.

このソフトウェアは、Rootkit Hunter プロジェクトチームによって開発されました。
ご使用前に、rkhunter の設定ファイルをご確認ください。
バグ報告や質問を投稿する前に、ドキュメントをご確認ください。
バグ報告、パッチ提供、コメントについては、以下の URL をご覧ください。
http://rkhunter.sourceforge.net

rkhunter に関するご質問は、rkhunter-users メーリングリストをご利用ください。
このメーリングリストはモデレーター制です。投稿前に必ず登録してください。

Rootkit Hunter には一切の保証はありません。
これはフリーソフトウェアであり、GNU 一般公衆利用許諾書(GNU General Public License)の条件に従って再配布できます。
詳細は LICENSE ファイルをご覧ください。


sudo /usr/local/bin/rkhunter –update
[root@falcon21 ~]# /usr/local/bin/rkhunter –update
               :
Checking rkhunter data files…
egrep: warning: egrep is obsolescent; using grep -E
egrep: warning: egrep is obsolescent; using grep -E
Checking file mirrors.dat [ No update ]
egrep: warning: egrep is obsolescent; using grep -E
Checking file programs_bad.dat [ No update ]
egrep: warning: egrep is obsolescent; using grep -E
Checking file backdoorports.dat [ No update ]
egrep: warning: egrep is obsolescent; using grep -E
Checking file suspscan.dat [ No update ]
egrep: warning: egrep is obsolescent; using grep -E
Checking file i18n/cn [ No update ]
Checking file i18n/de [ No update ]
Checking file i18n/en [ No update ]
Checking file i18n/tr [ No update ]
Checking file i18n/tr.utf8 [ No update ]
Checking file i18n/zh [ No update ]
Checking file i18n/zh.utf8 [ No update ]
Checking file i18n/ja [ No update ]


sudo /usr/local/bin/rkhunter –propupd
[root@falcon21 ~]# /usr/local/bin/rkhunter –propupd
                  :
egrep: warning: egrep is obsolescent; using grep -E
egrep: 警告: egrep は廃止されました。grep -E を使用してください。

File updated: searched for 177 files, found 139, missing hashes 1

———————
次のコマンドで、egrep を検索し、grep -Eに置き換える。
grep -n “egrep” /usr/local/bin/rkhunter

vi /usr/local/bin/rkhunter

却って、エラーになる
———————

rkhunter自動実行 ・・・/etc/cron.daily/rkhunterにより、毎日
[root@falcon21 ~]# cp -f /usr/local/bin/rkhunter /etc/cron.daily/
                    

システムチェック rkhunter

root@falcon21:~# rkhunter –check –sk –propupd
System checks summary
=====================

File properties checks…
Files checked: 138
Suspect files: 5

Rootkit checks…
Rootkits checked : 504
Possible rootkits: 0

Applications checks…
All checks skipped

The system checks took: 1 minute and 24 seconds

All results have been written to the log file: /var/log/rkhunter.log

One or more warnings have been found while checking the system.
Please check the log file (/var/log/rkhunter.log)


2026年1月27日
root@falcon21:~# cat /var/log/rkhunter.log
[16:22:40] Info: Test ‘apps’ disabled at users request.
[16:22:40]
[16:22:40] System checks summary
[16:22:40] =====================
[16:22:40]
[16:22:40] File properties checks…
[16:22:40] Files checked: 139
[16:22:40] Suspect files: 5
[16:22:40]
[16:22:40] Rootkit checks…
[16:22:40] Rootkits checked : 504
[16:22:40] Possible rootkits: 0
[16:22:40]
[16:22:40] Applications checks…
[16:22:40] All checks skipped
[16:22:40]
[16:22:40] The system checks took: 1 minute and 23 seconds
[16:22:40]
[16:22:40] Info: End date is 2026年 1月 25日 日曜日 16:22:40 JST


[root@falcon21 rkhunter-1.4.6]# /usr/local/bin/rkhunter –version
grep: warning: stray \ before –
grep: warning: stray \ before +
Rootkit Hunter 1.4.6

This software was developed by the Rootkit Hunter project team.
Please review your rkhunter configuration files before using.
Please review the documentation before posting bug reports or questions.
To report bugs, provide patches or comments, please go to:
http://rkhunter.sourceforge.net

To ask questions about rkhunter, please use the rkhunter-users mailing list.
Note this is a moderated list: please subscribe before posting.

Rootkit Hunter comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under the
terms of the GNU General Public License. See the LICENSE file for details.


—————-

[root@falcon21 rkhunter-1.4.6]# /usr/local/bin/rkhunter –update

Checking rkhunter data files…
egrep: warning: egrep is obsolescent; using grep -E
egrep: warning: egrep is obsolescent; using grep -E
Checking file mirrors.dat                   [ Updated ]
egrep: warning: egrep is obsolescent; using grep -E
Checking file programs_bad.dat               [ No update ]
egrep: warning: egrep is obsolescent; using grep -E
Checking file backdoorports.dat               [ No update ]
egrep: warning: egrep is obsolescent; using grep -E
Checking file suspscan.dat                  [ No update ]
egrep: warning: egrep is obsolescent; using grep -E
Checking file i18n/cn                     [ No update ]
Checking file i18n/de                     [ No update ]
Checking file i18n/en                     [ No update ]
Checking file i18n/tr                     [ No update ]
Checking file i18n/tr.utf8                   [ No update ]
Checking file i18n/zh                      [ No update ]
Checking file i18n/zh.utf8                   [ No update ]
Checking file i18n/ja                      [ No update ]

—————-

[root@falcon21 rkhunter-1.4.6]# /usr/local/bin/rkhunter –propupd

File created: searched for 177 files, found 138, missing hashes 1


AlmaLinux 10 の「Testing」リポジトリを確認
パッケージがまだテスト段階で、通常の EPEL 10 に降りてきていないだけの可能性があります。

sudo dnf install rkhunter –enablerepo=epel-testing
一致するものが見つかりません: rkhunter

***********************************************************************