ClamAVのアップグレード
-----------------------------------

新しいバージョンを入手   
[root@falcon21 ~]# yum list clamav
読み込んだプラグイン:fastestmirror, langpacks, priorities, show-leaves
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
 * remi-safe: merlin.fit.vutbr.cz
 * updates: ftp-srv2.kddilabs.jp
 * webtatic: uk.repo.webtatic.com
340 packages excluded due to repository priority protections
インストール済みパッケージ
clamav.x86_64                                              0.101.5-1.el7                       


[root@falcon21 ~]# yum update clamav
No packages marked for update 

[root@falcon21 ~]# freshclam
ClamAV update process started at Sat Feb  8 08:17:55 2020
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.5 Recommended version: 0.102.1
DON'T PANIC! Read https://www.clamav.net/documents/upgrading-clamav
main.cld is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr)
daily.cld is up to date (version: 25717, sigs: 2177826, f-level: 63, builder: raynman)
bytecode.cvd is up to date (version: 331, sigs: 94, f-level: 63, builder: anvilleg)

警告:ClamAVのインストールは古くなっています!
システムにインストールされているClamAVのバージョンが1つだけであることを確認
[root@falcon21 ~]# whereis freshclam
freshclam: /usr/bin/freshclam /etc/freshclam.conf /usr/share/man/man1/freshclam.1.gz

[root@falcon21 ~]# whereis clamscan
clamscan: /usr/bin/clamscan /usr/share/man/man1/clamscan.1.gz


ファイルシステムの周りに古いライブラリ(libclamav.so*)がないことを確認
[root@falcon21 ~]# ldd $(which freshclam)
        linux-vdso.so.1 =>  (0x00007fff9ad4d000)
        libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f28f3a74000)
        libclamav.so.9 => /lib64/libclamav.so.9 (0x00007f28f3691000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f28f347b000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f28f3262000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f28f3046000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f28f2c79000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f28f2a75000)
        libxml2.so.2 => /lib64/libxml2.so.2 (0x00007f28f270b000)
        libjson-c.so.2 => /lib64/libjson-c.so.2 (0x00007f28f2500000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f28f22f0000)
        libltdl.so.7 => /lib64/libltdl.so.7 (0x00007f28f20e6000)
        libclammspack.so.0 => /lib64/libclammspack.so.0 (0x00007f28f1ed2000)
        libssl.so.10 => /lib64/libssl.so.10 (0x00007f28f1c60000)
        libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f28f19e9000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f28f16e7000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f28f4108000)
        liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f28f14c1000)
        libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f28f1274000)
        libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f28f0f8b000)
        libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f28f0d87000)
        libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f28f0b54000)
        libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f28f0944000)
        libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f28f0740000)
        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f28f0519000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f28f02b7000)

    libclamav.so.9を削除
[root@falcon21 ~]# rm -f /lib64/libclamav.so.9

  削除を確認 
[root@falcon21 ~]# ldd $(which freshclam)
        linux-vdso.so.1 =>  (0x00007ffe46e9a000)
        libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f9676c7f000)
        libclamav.so.9 => not found
        libz.so.1 => /lib64/libz.so.1 (0x00007f9676a69000)
        libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f9676850000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9676634000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f9676267000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f9676063000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9677313000)


起動・確認
[root@falcon21 ~]# systemctl start clamd@scan
[root@falcon21 ~]# systemctl status clamd@scan
 clamd@scan.service - clamd scanner (scan) daemon
   Loaded: loaded (/usr/lib/systemd/system/clamd@.service; enabled; vendor preset: disabled)
   Active: active (running) since 火 2020-02-04 11:09:26 JST; 3 days ago
     Docs: man:clamd(8)
           man:clamd.conf(5)
           https://www.clamav.net/documents/
  Process: 2841 ExecStart=/usr/sbin/clamd -c /etc/clamd.d/%i.conf (code=exited, status=0/SUCCESS)
 Main PID: 3630 (clamd)
   CGroup: /system.slice/system-clamd.slice/clamd@scan.service
           └─3630 /usr/sbin/clamd -c /etc/clamd.d/scan.conf

 2月 08 07:07:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 07:17:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 07:27:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 07:37:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 07:47:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 07:57:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 08:07:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 08:17:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 08:27:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.
 2月 08 08:37:36 falcon21.space clamd[3630]: SelfCheck: Database status OK.

  
 
投票数:0 平均点:0.00

 
Back to Top