Install and install the Clam Antivirus antivirus software in centos 6.4

Source: Internet
Author: User

Clam Antivirus is an anti-virus software package used on Unix-like systems. It is mainly used in the mail server and uses multi-threaded background operations to automatically upgrade the virus database.

Clam AntiVirus (ClamAV) is a free and open-source antivirus software. Updates to the software and virus code are released by the community for free. Currently, ClamAV is mainly used on email servers set up by Linux, FreeBSD, and other UNIX-like systems to provide virus scanning services for email. ClamAV itself operates under the text interface, but there are also many front-end tools available for graphic interfaces. In addition, due to its open source code features, both Windows and Mac OS X have their portable versions.

Installation:

Define the unofficial library of yum

During server construction, some of the tools we will use do not exist in the official Yum library of centos. Therefore, we need to define the files of the unofficial Yum library, install necessary tools through yum.

Enter the following command:

VI/etc/yum. Repos. d/Dag. Repo # create a Dag and repo defines unofficial libraries.

[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

Rpm -- import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt # import unofficial GPG

Note: When the RPM file is installed, "Warning: rpmts_hdrfromfdno: Header V3 DSA Signature: nokey, key ID 4f2a6fd2" is displayed. Add "-- nogpgcheck" to remove the GPG search, for example, "yum install -- nogpgcheck clamd


Install Clam Antivirus

Yum install -- nogpgcheck clamd

>>>>>>>>>>>>>> # The message "complete" is displayed! The installation is successful.


Service clamd start # enable the Service


Configure Clam Antivirus

① Modify configuration

VI/etc/clamd. conf # modify the clamd configuration file

Find archiveblockmax # comment out this line (do not think of a large compressed file as a virus infected file)

Find user ClamAV # comment out this line (general user control is not allowed)

② Set Clam Antivirus to start with the System

Chkconfig clamd on

③ Update the clamantivirus virus Database

Freshclam

>>>>>>>>>>>>> # When the prompt clamd successfully notified about the update is displayed, the update is complete.


④ Set the regular run of Clam Antivirus

VI scan. Sh

#! /Bin/bash

Path =/usr/bin:/bin

Clamscantmp = 'mktemp'

Clamdscan -- Recursive -- remove/> $ clamscantmp

[! -Z "$ (grep found $ clamscantmp)"] & \

Grep found $ clamscantmp | mail-s "virus found in 'hostname'" Root

Rm-F $ clamscantmp


Chmod 700 scan. Sh # grant the script executable permission

Crontab-e # edit a scheduled task and add the following

00 03 ***/root/scan. Sh # scan automatically at three o'clock every day


④ Scan viruses


Clamdscan # scan viruses

Infect files: 0 # No virus


Note: To scan other partitions (such as home partitions), enter clamdscan-r/home.

 


This installation has been completed





This article is from the "IT technology" blog, please be sure to keep this source http://dr1123.blog.51cto.com/6894244/1568954

Install and install the Clam Antivirus antivirus software in centos 6.4

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.