温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

centos 6.5 下安装ClamAV杀毒软件

发布时间:2020-07-29 03:55:22 来源:网络 阅读:3088 作者:bristol 栏目:安全技术

[root@localhost ~]#cd /etc/yum.repos.d

[root@localhost ~]#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


[root@localhost ~]#yum install clamav* --nogpgcheck

[root@localhost ~]#yum install clamd* --nogpgcheck

[root@localhost ~]# chkconfig clamd on

[root@localhost ~]#service clamd start

[root@localhost ~]#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.

[root@localhost ~]#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)


[root@localhost ~]#wget http://www.eicar.org/download/eicar.com  #下载病毒文件

[root@localhost ~]#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)


[root@localhost ~]#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)


[root@localhost ~]#cd /

[root@localhost ~]#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


[root@localhost ~]#chmod 700 clamscan.sh

[root@localhost ~]#crontab -e

* 2 * * * /clamscan.sh


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI