Linux anti-virus software (ClamAV)

Source: Internet
Author: User

Clam Antivirus is an anti-virus package used on UNIX-like systems. Mainly used in mail server, multi-threaded background operation, you can automatically upgrade the virus database.


1. Software Installation

[email protected] ~]# Yum install ClamAV clamav-db clamav-devel clamav-milter-y
[Email protected] ~]# vim/etc/clamd.conf
Logfile/var/log/clamav/clamd.log #去掉以下注释

Logfilemaxsize 100M #日志文件的大小

LogTime Yes #日志记录时间

LogRotate Yes #日志轮回

Pidfile/var/run/clamav/clamd.pid #PID文件存放
[Email protected] ~]#/ETC/INIT.D/CLAMD restart
Stopping Clam AntiVirus Daemon: [OK]
Starting Clam AntiVirus Daemon: [OK]
[Email protected] ~]#/etc/init.d/clamav-milter restart
Stopping Clamav milter Daemon: [OK]
Starting Clamav milter Daemon: [OK]
[Email protected] ~]#


2. Upgrading the virus database

[Email protected] ~]# Freshclam
ClamAV update process started at Mon 16 17:21:02 2016
Warning:can ' t query current.cvd.clamav.net
Warning:invalid DNS reply. Falling back to HTTP mode.
Reading CVD Header (MAIN.CVD):
Ok
MAIN.CVD is up to date (version:57, sigs:4218790, f-level:60, Builder:amishhammer)
Reading CVD Header (DAILY.CVD): OK
DAILY.CLD is up to date (version:21555, sigs:143628, f-level:63, Builder:neo)
Reading CVD Header (BYTECODE.CVD): OK
BYTECODE.CVD is up to date (version:277, sigs:47, f-level:63, Builder:neo)
[Email protected] ~]#


3. Check for viruses

[[email protected] apr-1.5.2]# Clamscan--log=1.log #检查当前目录下的所有文件, logging

[Email protected] apr-1.5.2]# clamscan-r. #检查当前目录的所有文件和文件夹

[Email protected] apr-1.5.2]# clamscan-r. --remove=[yes|no] #如果发现有病毒就删除

[Email protected] apr-1.5.2]# clamscan-r. --copy=/tmp #如果发现有病毒就复制到目标目录中

[Email protected] apr-1.5.2]# clamscan-r. --move=/tmp #如果发现有病毒就移动到目标目录中


4. Check the system for viruses every day

[Email protected] apr-1.5.2]# crontab-l
XX * * */usr/bin/freshclam
* * * */usr/bin/clamscan-r/home--remove-l/tmp/clamscan-' date +%y-%m-%d '. Log
[Email protected] apr-1.5.2]#

This article is from the "Days Together" blog, please be sure to keep this source http://tongcheng.blog.51cto.com/6214144/1773986

Linux anti-virus software (ClamAV)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.