[root@localhost ~]#yum install clamav*[root@localhost ~]#yum install clamd*[root@localhost ~]# chkconfig clamd on[root@localhost ~]# chkconfig –list clamdclamd 0:off 1:off 2:on 3:on 4:on 5:on 6:off[root@localhost ~]# service clamd startStarting Clam AntiVirus Daemon: LibClamAV Warning: **************************************************LibClamAV Warning: *** The virus database is older than 7 days! ***LibClamAV Warning: *** Please update it as soon as possible. ***LibClamAV Warning: **************************************************root@localhost ~]# freshclam #升級病毒庫ClamAV update process started at Thu Jan 10 15:53:58 2013main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)WARNING: getfile: daily-15077.cdiff not found on remote server (IP: 202.118.1.40)WARNING: getpatch: Can’t download daily-15077.cdiff from db.cn.clamav.netWARNING: getfile: daily-15077.cdiff not found on remote server (IP: 200.236.31.1)WARNING: getpatch: Can’t download daily-15077.cdiff from db.cn.clamav.netWARNING: getpatch: Can’t download daily-15077.cdiff from db.cn.clamav.netWARNING: Incremental update failed, trying to download daily.cvdDownloading daily.cvd [100%]daily.cvd updated (version: 16457, sigs: 530720, f-level: 63, builder: neo)Downloading bytecode.cvd [100%]bytecode.cvd updated (version: 209, sigs: 40, f-level: 63, builder: neo)Database updated (1575147 signatures) from db.cn.clamav.net (IP: 200.236.31.1)WARNING: Clamd was NOT notified: Can’t connect to clamd through /var/run/clamav/clamd.sockconnect(): No such file or directory[root@localhost ~]# service clamd startStarting Clam AntiVirus Daemon: [ OK ][root@localhost ~]# clamscan #掃描檔案/root/.cshrc: OK/root/.imsettings.log: OK/root/.esd_auth: OK/root/clamav-0.97.6-1.el6.rf.x86_64.rpm: OK/root/install.log: OK/root/.recently-used.xbel: OK/root/clamd-0.97.6-1.el6.rf.x86_64.rpm: OK/root/.tcshrc: OK/root/.bash_logout: OK/root/clamav-devel-0.97.6-1.el6.rf.x86_64.rpm: OK/root/.pulse-cookie: OK/root/install.log.syslog: OK/root/.bash_profile: OK/root/.bashrc: OK/root/.mysql_history: OK/root/clamav-db-0.97.6-1.el6.rf.x86_64.rpm: OK/root/.gtk-bookmarks: OK/root/anaconda-ks.cfg: OK/root/.bash_history: OK/root/.Xauthority: Empty file/root/.ICEauthority: OK———– SCAN SUMMARY ———–Known viruses: 1569751Engine version: 0.97.6Scanned directories: 1Scanned files: 20Infected files: 0Data scanned: 2.25 MBData read: 36.50 MB (ratio 0.06:1)Time: 3.515 sec (0 m 3 s)下載病毒檔案[root@localhost ~]#wget http://www.eicar.org/download/eicar.com[root@localhost ~]#wget http://www.eicar.org/download/eicar_com.zip[root@localhost ~]# clamscan –remove #掃描並刪除帶有病毒的檔案———– SCAN SUMMARY ———–Known viruses: 1569751Engine version: 0.97.6Scanned directories: 1Scanned files: 23Infected files: 2Data scanned: 2.25 MBData read: 36.51 MB (ratio 0.06:1)Time: 3.462 sec (0 m 3 s)建立掃描指令碼,讓它自動在一個時間段中自動執行[root@localhost ~]#vi clamsc.sh#/bin/bashdate_time=`date +%Y%m%d`data_path=/mntPATH=/usr/bin:/binclamscan -r –remove ${data_path} >/var/log/clamdscan_${date_time}.log[root@localhost ~]#crontab -l* 12 * * * /clamsc.sh