ClamAV Linux anti-virus software installation using the documentation

Source: Internet
Author: User

Document Purpose

Install clamav Antivirus on Linux, update the virus database, and complete the drug search work

Common Commands

/usr/local/clamav/freshclam/freshclam upgrading the Repository

/usr/local/clamav/clamscan/clamscan-r/home check /home file virus

Required Software

Clamav-0.94.1.tar.gz

System Environment

Operating System: Linux localhost.localdomain 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 16:09:20 UTC x86_64 x86_64 x86_64 gnu/linux

Operation Steps1. Installing the zlib package

Yum Install zlib Zlib-devel

2. Download and install the ClamAV source package

to the official website (http://www.clamav.net/downloads) Download the source package ( This article takes clamav-0.94.1.tar.gz as an example), extracted to the /usr/local directory, and the name is ClamAV .

TAR-ZXVF clamav-0.94.1.tar.gz

MV Clamav-0.94.1.tar.gz/usr/local/clamav

Useradd-g ClamAV Clamva

Note: If ClamAV is not created , it cannot be compiled after

Cd/usr/local/clamav

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

Note: If this step does not add parameter --prefix , the default profile will be installed in the /usr/local/etc directory

Make && make install

3. Modifying a configuration file

Create the log directory and the virus library directory first

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

Mkdir/usr/local/clamav/updata (clanav Virus Library directory )

Modifying a configuration file

Vim/usr/local/clamav/etc/clamd.conf

# Example comment out this line . line 8

Logfile/usr/local/clamav/logs/clamd.log Delete the previous comment directory and change it to logs below .

Pidfile/usr/local/clamav/updata/clamd.pid Delete the previous comment path and change the first line .

Databasedirectory/usr/local/clamav/updata Ibid .

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/8E/49/wKiom1i73Wqz6WMqAAAlcjeYWmE226.png "style=" float : none; "title=" Image 1.png "alt=" Wkiom1i73wqz6wmqaaalcjeywme226.png "/>

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/8E/47/wKioL1i73WqAYs9ZAAA8LWU0ufY849.png "style=" float : none; "title=" Image 2.png "alt=" Wkiol1i73wqays9zaaa8lwu0ufy849.png "/>




Vim/usr/local/clamav/etc/freshclam.conf

# Example comment out this line . line 8

Databasedirectory/usr/local/clamav/updata

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

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

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/8E/47/wKioL1i73YOBE7L2AACw11DRzYk003.png "title=" Picture 3.png "alt=" Wkiol1i73yobe7l2aacw11drzyk003.png "/>


Create the log file below

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

Chown Clamav:clamav/usr/local/clamav/logs/freshclam.log

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

Chown Clamav:clamav/usr/local/clamav/logs/clamd.log

Chown Clamav:clamav/usr/local/clamav/updata

/usr/local/clamav/bin/freshclam ( upgrade virus database ) Make sure the server has access to the extranet

FAQ Issue One: Start clamav failure, error needs to modify/usr/local/etc/clamd.conf and/usr/local/etc/freshclam.conf.

Workaround: The reason may be that when you run the./configure, There is no parameter --prefix=/usr/local/clamav To specify the installation path, which causes the default installation to the /usr/local/etc path.

Reference Documents

http://linuxguest.blog.51cto.com/195664/199632/


This article is from the "11591346" blog, please be sure to keep this source http://11601346.blog.51cto.com/11591346/1903435

ClamAV Linux anti-virus software installation using the documentation

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.