centos 6.5 下安裝ClamAV殺毒軟體

來源:互聯網
上載者:User

標籤:殺毒軟體

[[email protected] ~]#cd /etc/yum.repos.d

[[email protected] ~]#cat >>dag.repo <<eof

[dag]

name=Dag RPM Repository for Red Hat Enterprise Linux

baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag

gpgcheck=1

enabled=1

eof


[[email protected] ~]#yum install clamav* --nogpgcheck

[[email protected] ~]#yum install clamd* --nogpgcheck

[[email protected] ~]# chkconfig clamd on

[[email protected] ~]#service clamd start

[[email protected] ~]#freshclam     #升級病毒庫

ClamAV update process started at Thu Oct 23 18:47:57 2014

Downloading main-55.cdiff [100%]

main.cld updated (version: 55, sigs: 2424225, f-level: 60, builder: neo)

WARNING: getfile: daily-15077.cdiff not found on remote server (IP: 202.118.1.66)

WARNING: getpatch: Can‘t download daily-15077.cdiff from db.cn.clamav.net

WARNING: 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.net

WARNING: getpatch: Can‘t download daily-15077.cdiff from db.cn.clamav.net

WARNING: Incremental update failed, trying to download daily.cvd

Downloading daily.cvd [100%]

daily.cvd updated (version: 19527, sigs: 1219603, f-level: 63, builder: dgoddard)

Downloading bytecode.cvd [100%]

bytecode.cvd updated (version: 242, sigs: 46, f-level: 63, builder: dgoddard)

Database updated (3643874 signatures) from db.cn.clamav.net (IP: 200.236.31.1)

Clamd successfully notified about the update.

[[email protected] ~]#clamscan /etc/passwd  #掃描指定檔案

/etc/passwd: OK


----------- SCAN SUMMARY -----------

Known viruses: 3638312

Engine version: 0.98.4

Scanned directories: 0

Scanned files: 1

Infected files: 0

Data scanned: 0.00 MB

Data read: 0.00 MB (ratio 0.00:1)

Time: 9.924 sec (0 m 9 s)


[[email protected] ~]#wget http://www.eicar.org/download/eicar.com  #下載病毒檔案

[[email protected] ~]#clamscan eicar.com 

eicar.com: Eicar-Test-Signature FOUND


----------- SCAN SUMMARY -----------

Known viruses: 3638312

Engine version: 0.98.4

Scanned directories: 0

Scanned files: 1

Infected files: 1

Data scanned: 0.00 MB

Data read: 0.00 MB (ratio 0.00:1)

Time: 11.854 sec (0 m 11 s)


[[email protected] ~]#clamscan --remove eicar.com  #掃描並刪除病毒

eicar.com: Eicar-Test-Signature FOUND

eicar.com: Removed.


----------- SCAN SUMMARY -----------

Known viruses: 3638312

Engine version: 0.98.4

Scanned directories: 0

Scanned files: 1

Infected files: 1

Data scanned: 0.00 MB

Data read: 0.00 MB (ratio 0.00:1)

Time: 10.270 sec (0 m 10 s)


[[email protected] ~]#cd /

[[email protected] ~]#cat >>clamscan.sh <<eof

#/bin/bash

date_time=`date +%Y%m%d`

data_path=/test

PATH=/usr/bin:/bin

cd ${data_path}

clamscan -r --remove >>/var/log/clamdscan_${date_time}.log

eof


[[email protected] ~]#chmod 700 clamscan.sh

[[email protected] ~]#crontab -e

* 2 * * * /clamscan.sh


centos 6.5 下安裝ClamAV殺毒軟體

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.