Linux under ClamAV use

Source: Internet
Author: User
Tags openssl touch

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)
<ignore_js_op>
Step three: Compile and install
Tar xfclamav-0.99.2.tar.gz
cdclamav-0.99.2
<ignore_js_op>
Install dependent packages
Yuminstall gcc OpenSSL openssl-devel-y
<ignore_js_op>
./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/
Chown Clamav.clamav/usr/local/clamav/logs/clamd.log
Chown Clamav.clamav/usr/local/clamav/logs/freshclam.log
Cd/usr/local/clamav/etc
CP Clamd.conf.sample clamd.conf
CP Freshclam.conf.sample freshclam.conf
Vim clamd.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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Vim freshclam.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
The process is long, about half an hour. You can turn on screen to do it.
/usr/local/clamav/bin/clamscan--remove (avira current directory and delete infected files)
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

Linux under ClamAV use

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.