ติดตั้ง Clam AntiVirus บน centos 6
โพสต์: ศุกร์ 04 มี.ค. 2016 16:24
This article will guide you through the installation of ClamAV on CentOS. Once installed, we will also configure a daily scan on our CentOS server.
ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats on Linux. In this article, we will only be configuring ClamAV to run scheduled/on-demand scans; not resident scans.
A. Install ClamAV
1. Install EPEL repo
Before we can do proceed, you must ensure that you have the EPEL yum repository enabled. To do this, click here.
2. Install required ClamAV packages
3. Start the clamd service and set it to auto-start
n
4. Update ClamAV’s signatures
Note: ClamAV will update automatically, as part of /etc/cron.daily/freshclam.
B. Configure Daily Scan
In this example, we will configure a cronjob to scan the /home/ directory every day:
1. Create cron file:
Add the following to the file above. Be sure to change SCAN_DIR to the directory that you want to scan:
Give our cron script executable permissions:
You can even run the above script to ensure that it works correctly.
And you’re done! That should be the minimum required to 1. install ClamAV and 2. Perform a daily scan of a specific directory.
https://www.centosblog.com/how-to-insta ... on-centos/
ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats on Linux. In this article, we will only be configuring ClamAV to run scheduled/on-demand scans; not resident scans.
A. Install ClamAV
1. Install EPEL repo
Before we can do proceed, you must ensure that you have the EPEL yum repository enabled. To do this, click here.
2. Install required ClamAV packages
โค้ด: เลือกทั้งหมด
yum install clamav clamd
โค้ด: เลือกทั้งหมด
/etc/init.d/clamd o
โค้ด: เลือกทั้งหมด
chkconfig clamd on
โค้ด: เลือกทั้งหมด
/etc/init.d/clamd start
โค้ด: เลือกทั้งหมด
/usr/bin/freshclam
B. Configure Daily Scan
In this example, we will configure a cronjob to scan the /home/ directory every day:
1. Create cron file:
โค้ด: เลือกทั้งหมด
vi /etc/cron.daily/manual_clamscan
โค้ด: เลือกทั้งหมด
#!/bin/bash
SCAN_DIR="/home"
LOG_FILE="/var/log/clamav/manual_clamscan.log"
/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE
โค้ด: เลือกทั้งหมด
chmod +x /etc/cron.daily/manual_clamscan
And you’re done! That should be the minimum required to 1. install ClamAV and 2. Perform a daily scan of a specific directory.
https://www.centosblog.com/how-to-insta ... on-centos/