Linux anti-virus software ClamAV use of detailed!

Source: Internet
Author: User
Tags virus scan

Objective:

More and more companies focus on security, and some companies choose to use the cloud server, because it can save a lot of things, the minimum security aspects of the need to spend a lot of things, only the usual simple maintenance. Some companies, combined use (cloud and physical machine), is also very good. Some companies, are physical machines, so security will be a bit of a disadvantage, need to use other means to maintain.

As we all know, the general hardware firewall is mainly for IP and port filtering, not to prevent SQL injection, viruses and other things.

Asked some operation and maintenance of small partners, found that we still like to use ClamAV this free antivirus software, write a blog. Share it with some fledgling partners.


Introduced:

Free anti-virus software commonly used:

Reference from Http://os.51cto.com/art/201208/354960.htm

1, ClamAV Antivirus

ClamAV Antivirus is the most popular anti-virus software of Linux platform, ClamAV belongs to free open source products, support a variety of platforms, such as: Linux/unix, MAC OS X, Windows, OpenVMS. ClamAV is a virus-scanning-based command-line tool, but there are also CLAMTK tools that support graphical interfaces . ClamAV is primarily used for mail server scan messages. It has a variety of interfaces to scan mail from mail servers, supporting file formats like: ZIP, RAR, TAR, GZIP, BZIP2, HTML, DOC, PDF, SIS CHM, RTF, and more. The CLAMAV has an automatic database updater and can also be run from a shared library. The command line interface makes the ClamAV run smoothly.

2. Avast Linux Home Edition

Avast is one of the best anti-virus solutions for your computer. Avast Linux Home Edition is free and can only be used by users for home or non-commercial use. The easy-to-use user interface and other features make avast increasingly popular, as well as GUI and command line two tools. All users can easily operate, because it has a simple interface (novice user) advanced interface (advanced users), Avast has the following features: Automatic Updates, built-in message scanner and so on.

3, Avria

Another of the best anti-virus software under Linux is Avria free antivirus version, Avria provides scalable configuration, control your computer becomes possible. It has some very powerful features, such as simple script installation, command line scanners, Automatic Updates (products, engines, VDF), self-Integrity program checking, and so on.

4. AVG Free Version Antivirus

More than 1 billion users now use AVG Antivirus, also a good antivirus expert on Linux machines, and the free version offers fewer features than premium versions. AVG does not currently support graphical interfaces. With anti-virus and anti-spyware tools, Avg runs fast, consumes less system resources, and supports mainstream Linux versions such as Debian, Ubuntu, Red hat, Cent OS, FreeBSD, and more.

5, F-prot Antivirus

F-port is a new antivirus solution for Linux users and is free for home users. It has a task scheduling feature that uses the cron (cron) tool to perform scan tasks at a specified time. It can also scan USB HDD, pendrive, CD-ROM, network driver, specified file or directory, boot area virus scan, mirror.



Implementation Documentation:

Environment: centos6.6 Mini

Version: clamav-0.99.2.tar.gz

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/83/6D/wKioL1dzRBSyVOmBAAAWq9YOjg0804.png-wh_500x0-wm_3 -wmp_4-s_2289072771.png "title=" 1.png "alt=" Wkiol1dzrbsyvombaaawq9yojg0804.png-wh_50 "/>


First step: ClamAV download

Http://www.clamav.net/downloads

#yuminstall Wget–y

Step Two: Create ClamAV users and Groups

Groupaddclamav ( create ClamAV Group)

useradd-g ClamAV ClamAV ( create ClamAV user and join ClamAV Group)

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/83/6D/wKioL1dzRCqzIhxKAAAReyusL1k291.png-wh_500x0-wm_3 -wmp_4-s_1182212312.png "title=" 1.png "alt=" Wkiol1dzrcqzihxkaaareyusl1k291.png-wh_50 "/>

Step three: Compile and install

Tar xfclamav-0.99.2.tar.gz

cdclamav-0.99.2

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/83/6E/wKiom1dzREHAE7IxAAAf0xMZkSA156.png-wh_500x0-wm_3 -wmp_4-s_1339330405.png "title=" 1.png "alt=" Wkiom1dzrehae7ixaaaf0xmzksa156.png-wh_50 "/>

Install dependent packages

Yuminstall gcc OpenSSL openssl-devel-y

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/83/6E/wKiom1dzRFjBX5ULAABCHJJY6HM392.png-wh_500x0-wm_3 -wmp_4-s_429647550.png "title=" 1.png "alt=" Wkiom1dzrfjbx5ulaabchjjy6hm392.png-wh_50 "/>

./configure--prefix=/usr/local/clamav

Make&&make Install

Fourth step: Configure

mkdir/usr/local/clamav/logs ( log storage directory)

Touch/usr/local/clamav/logs/clamd.log

Touch/usr/local/clamav/logs/freshclam.log

mkdir/usr/local/clamav/updata (Clanav Virus Library directory)

Chown-r root.clamav/usr/local/clamav/

Chown-r clamav.clamav/usr/local/clamav/updata/

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/83/6D/wKioL1dzRH-ARLsCAABQKAKIWs8789.png-wh_500x0-wm_3 -wmp_4-s_3708289959.png "title=" 1.png "alt=" Wkiol1dzrh-arlscaabqkakiws8789.png-wh_50 "/>

Chownclamav.clamav/usr/local/clamav/logs/clamd.log

Chownclamav.clamav/usr/local/clamav/logs/freshclam.log

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/83/6E/wKiom1dzRJbxYH-5AAAeqTLC898693.png-wh_500x0-wm_3 -wmp_4-s_803777689.png "title=" 1.png "alt=" Wkiom1dzrjbxyh-5aaaeqtlc898693.png-wh_50 "/>


Cd/usr/local/clamav/etc

Cpclamd.conf.sample clamd.conf

Cpfreshclam.conf.sample freshclam.conf

Vimclamd.conf

#Example comment out this line.

Logfile/usr/local/clamav/logs/clamd.log

Pidfile/usr/local/clamav/updata/clamd.pid

Databasedirectory/usr/local/clamav/updata

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Vimfreshclam.conf

#Example   comment out this line.

Databasedirectory/usr/local/clamav/updata

Updatelogfile/usr/local/clamav/logs/freshclam.log

Pidfile/usr/local/clamav/updata/freshclam.pid

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fifth step: Upgrade the virus database

/usr/local/clamav/bin/freshclam

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/83/6D/wKioL1dzRLfiITpPAAAUK1XlOWk414.png-wh_500x0-wm_3 -wmp_4-s_1652729895.png "title=" 1.png "alt=" Wkiol1dzrlfiitppaaauk1xlowk414.png-wh_50 "/>

This process is long, about half an hour, and so on. You can turn on screen to do it.

/usr/local/clamav/bin/clamscan--remove ( avira current directory and delete infected files)

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/83/6D/wKioL1dzRMqQWCSUAACSqGtl7FI199.png-wh_500x0-wm_3 -wmp_4-s_282664980.png "title=" 1.png "alt=" Wkiol1dzrmqqwcsuaacsqgtl7fi199.png-wh_50 "/>

Note: Make sure the network is healthy

Sixth Step: Scheduling tasks

Actual production environment Application

General use of scheduled tasks, so that the server every night regularly with new and timed antivirus. Save the antivirus log, my crontab file is as follows

1 3 * * * */usr/local/clamav/bin/freshclam

3 * * */usr/local/clamav/bin/clamscan--infected-r/--remove-l/var/log/clamscan.log


If there is a problem, please contact the author.


This article is from the "Ningzhiyuan @it sharing" blog, make sure to keep this source http://renzhiyuan.blog.51cto.com/10433137/1793944

Linux anti-virus software ClamAV use of detailed!

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.