ClamAV--wiki

ClamAV是一个在命令行下查毒软件,为什么是查毒软件?因为他无法杀毒,只能查出您计算机内的病毒,但是无法清除它。ClamAV可以工作很多的平台上,但是有少数无法支持,这就要取决您所使用的平台的流行程度了。另外它主要是来防护一些WINDOWS病毒和木马程序。

 

我需要反病毒软件么?是免费的么?

绝大多数的linux是先进的,所以,很少的病毒能够在linux的运行和繁衍。而且,由于目前PC都使用的是Windows,所以病毒制造者们更愿意去写Windows下的病毒。但是还有很多的原因能致使您使用一些病毒扫描程序的,比如:

  • 扫描在您计算机上的Windows设备
  • 扫描在本地网络中的Windows计算机
  • 扫描您即将要传送给别人的文件
  • 扫描您将要发送给别人的EMAIL

 

安装ClamAV

sudo apt-get install clamav

这里有两种的ClamAV供您选择 1.手动:安装ClamAV的安装包 2.自动:安装ClamAV-daemon 这两种都可以安装ClamAV,但是要是使用上面的方法,是手动的。 在您安装完成之后,您可能被程序问及一些问题,比如怎么去升级。这就需要您选择一个离您比较近的服务器来升级。ClamAV的升级程序是很小的,所以很值得去自动升级。

 

怎么使用ClamAV

这部分将会介绍安装之后的使用

 

升级我的病毒库

运行 freshclam.

您将会看见以下说明

user@ubuntu:/etc/clamav # freshclam
ClamAV update process started at Wed Apr 27 00:06:47 2005
main.cvd is up to date (version: 31, sigs: 33079, f-level: 4, builder: tkojm)
daily.cvd is up to date (version: 855, sigs: 714, f-level: 4, builder: ccordes)

 

使用ClamAV扫描我计算机中的文件

运行 clamscan.

这里附带一些例子

  • 扫描所有用户的主目录就使用 clamscan -r /home
  • 扫描您计算机上的所有文件并且显示所有的文件的扫描结果,就使用 clamscan -r /
  • 扫描您计算机上的所有文件并且显示有问题的文件的扫描结果, 就使用 clamscan -r –bell -i /

当clamAV扫描完所有文件的时候,会显示如下的类似报告

----------- SCAN SUMMARY -----------
Known viruses: 33840
Scanned directories: 145
Scanned files: 226
Infected files: 1
Data scanned: 54.22 MB
I/O buffer size: 131072 bytes
Time: 20.831 sec (0 m 20 s)

ClamAV只会去扫描对于ClamAV可以读取的文件。 果您想扫描所有文件,在命令前加上 sudo .

 

使ClamAV以daemon防护的方式运行

安装clamav-daemon就可以了,clamav-daemon将会建立一个名为'clamav'的帐户,这是为了可以使ClamAV扫描一些系统文件,比如您的Email存放的地方,您可以添加'clamav'为这些文件或者目录的所有者。

 

如何知道clamav-daemon是否运行了?

查看进程列表就可以了: ps ax | grep [c]lamd

 

如何删除病毒文件?

在扫描的时候,您可以添加'--remove'就可以了

 

如何知道我现在使用的ClamAV版本?

执行 clamdscan -v:

user@ubuntu:/etc/clamav # clamdscan -V
ClamAV 0.83/855/Tue Apr 26 06:40:32 2005

 

如何知道更多的参数

使用 man clamscan.

 

如何使ClamAV按计划自动运行

您可以使用'at'命令来使clamscan和freshclam运行,比如

at 3:30 tomorrow
at>clamscan -i /home/user > mail user@example.com
at> <CTRL-D>
job 3 at 2005-04-28 03:30

 


 


  • 文章来源:官方WIKI
    翻译人员:drivel
    email:drivelsun@gmail.com
    校对人员:
    文章状态:[翻译完成]

InterWikiMap: ClamAV (2006-07-21 11:50:47由drivel编辑)

 
[root@123 ~]# sudo yum install epel-release base | 3.6 kB 00:00:00 https://mirrors.tuna.tsinghua.edu.cn/clamav/rpm/stable/centos7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errors If above article doesn't help to resolve this issue please use https://bugs.centos.org/. One of the configured repositories failed (ClamAV Packages (Tsinghua Mirror)), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=clamav ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable clamav or subscription-manager repos --disable=clamav 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=clamav.skip_if_unavailable=true failure: repodata/repomd.xml from clamav: [Errno 256] No more mirrors to try. https://mirrors.tuna.tsinghua.edu.cn/clamav/rpm/stable/centos7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found [root@123 ~]#
最新发布
07-22
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值