Install ClamAV on CentOS 6.0, 5.0


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

Gigo 實作 2012/11/18

CentOS 5

el6 –> el5

i686 –> i386





For 64 bit:

# wget

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 (weekly有誤)


# chmod +x /etc/cron.daily/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.

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • MySpace
  • Plurk
  • RSS
  • Google Buzz
  • Live
本篇發表於 安全性(Linux)。將永久鏈結加入書籤。


你的電子郵件位址並不會被公開。 必要欄位標記為 *