Install ClamAV antivirus on CentOS 6.0

In this forum you can read tutorials. You can also post your own tutorials to help other members.
Site Admin
Posts: 22
Joined: Sat Mar 16, 2013 9:54 pm

Install ClamAV antivirus on CentOS 6.0

Postby HR-ADMIN » Sat Jun 01, 2013 12:45 pm

To install ClamAV antivirus on CentOS 6.0 along with automatic updates and a nightly full system scan please use the following process:

1. Change to your SRC install directory:

# cd /usr/src

2. Download the ClamAV installation package, ClamAV database, ClamAV development libraries and ClamAV daemon for your operating system type (32 bit of 64 bit):

For 32 bit:

# wget ... f.i686.rpm ... f.i686.rpm ... f.i686.rpm ... f.i686.rpm

For 64 bit:

# wget ... x86_64.rpm ... x86_64.rpm ... x86_64.rpm ... x86_64.rpm

3. Install ClamAV

# rpm -Uvh clam*

4. Run Freshclam to download the newest pattern files:

# /usr/bin/freshclam -v

5. Configure ClamAV auto-updates:

# touch /var/log/freshclam.log
# chmod 600 /var/log/freshclam.log
# chown clamav /var/log/freshclam.log

6. Add a update schedule to /etc/crontab

# nano -w /etc/crontab

Add a line at the bottom of the crontab:

3 * * * * /usr/bin/freshclam --quiet

Then press CTRL+X then type: Y then Enter.

7. Create a daily ClamAV scan schedule:

# nano -w /etc/cron.daily/clamav-scan

Paste the following in the file:

/usr/bin/clamscan -ri /

Then press CTRL+X then type: Y then Enter.

Make the file exectuable:

# chmod +x /etc/cron.weekly/clamav-scan

8. That's it, you now have ClamAV installed, scheduled to update once every hour and run a full daily scan of your system. A report will be sent in your nightly cron of any issues identified.
Hostripples - Leaders in Linux Hosting
HostRipples | Domain Name Registration & $1 Web Hosting

Return to “Tutorials / How tos?”

Who is online

Users browsing this forum: No registered users and 1 guest