アンチウィルスの機能を提供する Clam AntiVirus をインストールする。

1.パッケージのダウンロードとインストール
[root@WR367201 ~]# yum -y install clamav clamav-update
読み込んだプラグイン:fastestmirror, langpacks, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: mirror.nus.edu.sg
 * updates: ftp.cuhk.edu.hk
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ clamav.i686 0:0.98.4-1.fc20 を インストール
---> パッケージ clamav-update.i686 0:0.98.4-1.fc20 を インストール
--> 依存性解決を終了しました。
依存性を解決しました
 Package               アーキテクチャー
                                    バージョン               リポジトリー     容量
インストール中:
 clamav                i686         0.98.4-1.fc20            updates         922 k
 clamav-update         i686         0.98.4-1.fc20            updates          87 k
トランザクションの要約
インストール  2 パッケージ
総ダウンロード容量: 1.0 M
インストール容量: 2.3 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction (shutdown inhibited)
  検証中                  : clamav-0.98.4-1.fc20.i686                          1/2 
  検証中                  : clamav-update-0.98.4-1.fc20.i686                   2/2 
インストール:
  clamav.i686 0:0.98.4-1.fc20          clamav-update.i686 0:0.98.4-1.fc20         
完了しました! 

2.コンフィグの設定
[root@WR367201 ~]# vi /etc/freshclam.conf
##
## Example config file for freshclam
## Please read the freshclam.conf(5) manual before editing this file.
##
# Comment or remove the line below.
#Example Exampleを#でコメントアウトする。

3.テストウイルスでチェックしてみる。テストウイルスのダウロード。
[root@WR367201 ~]# wget http://www.eicar.org/download/eicar.com
--2014-08-11 15:18:29--  http://www.eicar.org/download/eicar.com
www.eicar.org (www.eicar.org) をDNSに問いあわせています... 188.40.238.250
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 特定できません [text/html]
`eicar.com' に保存中
    [ <=>                                      ] 876         --.-K/s 時間 0s      
2014-08-11 15:18:30 (48.7 MB/s) - `eicar.com' へ保存終了 [876]

4.検索してみる。 
[root@WR367201 ~]# clamscan --infected --remove --recursive .

----------- SCAN SUMMARY -----------
Known viruses: 3508776
Engine version: 0.98.4
Scanned directories: 9
Scanned files: 11
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 11.401 sec (0 m 11 s)

ファイルが消されるはずなんだけど消されないなぜだろう・・・。

5.しばらくしたらこんなエラーメールがきた。
WARNING: update of clamav database is disabled; please see
  '/etc/sysconfig/freshclam'
  for information how to enable the periodic update resp. how to turn
  off this message. 
どうも自動更新できてないっぽい。
[root@WR367201 ~]# vi /etc/sysconfig/freshclam 

#FRESHCLAM_DELAY=disabled-warn 
一番下の下記部分をコメントアウト

これでエラーメールはこなくなったので無事設定完了かな?
 
スポンサードリンク