hardbrasil
Regular Pleskian
Helo fellas,
i installed clamav because maldet was not finding some treats. and Clamav is much more eficient to find them. So i recomend to install it.
here we go my tutorial how to install into Centos 6 + Plesk 12.5
**This tutorial i am not integrating with Postfix or Qmail,
its just for search files on /var/www/vhosts dir against files injections.
# Pre-install (remove any antivirus installed if exist)
# Install
- You gone need Epel repo or Atomic, so add it to yum (google!)
# add the atomic repo
wget -q -O - http://www.atomicorp.com/installers/atomic |sh
or
http://www.centosblog.com/enable-epel-repo-on-centos-5-and-centos-6/
1. Install
yum install clamav clamd
ps: i had installed in two Plesk servers and one of them the files was put in: /var/clamav and other into /var/lib/clamav. I don't know why this happen but be aware.
2. Set it to auto-start
/etc/init.d/clamd on
chkconfig clamd on
3. Edit clamd.conf
vi /etc/clamd.conf
Add comment to # Example
Remove comment for -> LocalSocket /tmp/clamd.socket
ps: i remove almost 80% of the comments, you gone need to ready one by one and liberate whatever your judge useful, some of them are mandatory so, when you try to start Clamav you got an error msg on shell if that specific function or path are not enable (uncommented).
3. Edit freshclam.conf
vi /etc/freshclam.conf
Add comment to # Example
4. Now you can start Clamav
service clamd start
5. Make a search on websites
clamscan -r /var/www/vhosts -l /var/log/clamav.log -i
6. You can look at log after search
tail -50 /var/log/clamav.log
### Configure Daily Scan ###
In this example, we will configure a cronjob to scan the /var/www/vhosts directory every week
1. Create cron file
vim /etc/cron.daily/manual_clamscan
2. Add the following to the file above.
#!/bin/bash
SCAN_DIR="/var/www/vhosts"
LOG_FILE="/var/log/clamav/manual_clamscan.log"
/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE
3. Give our cron script executable permissions:
chmod +x /etc/cron.daily/manual_clamscan
i installed clamav because maldet was not finding some treats. and Clamav is much more eficient to find them. So i recomend to install it.
here we go my tutorial how to install into Centos 6 + Plesk 12.5
**This tutorial i am not integrating with Postfix or Qmail,
its just for search files on /var/www/vhosts dir against files injections.
# Pre-install (remove any antivirus installed if exist)
# Install
- You gone need Epel repo or Atomic, so add it to yum (google!)
# add the atomic repo
wget -q -O - http://www.atomicorp.com/installers/atomic |sh
or
http://www.centosblog.com/enable-epel-repo-on-centos-5-and-centos-6/
1. Install
yum install clamav clamd
ps: i had installed in two Plesk servers and one of them the files was put in: /var/clamav and other into /var/lib/clamav. I don't know why this happen but be aware.
2. Set it to auto-start
/etc/init.d/clamd on
chkconfig clamd on
3. Edit clamd.conf
vi /etc/clamd.conf
Add comment to # Example
Remove comment for -> LocalSocket /tmp/clamd.socket
ps: i remove almost 80% of the comments, you gone need to ready one by one and liberate whatever your judge useful, some of them are mandatory so, when you try to start Clamav you got an error msg on shell if that specific function or path are not enable (uncommented).
3. Edit freshclam.conf
vi /etc/freshclam.conf
Add comment to # Example
4. Now you can start Clamav
service clamd start
5. Make a search on websites
clamscan -r /var/www/vhosts -l /var/log/clamav.log -i
6. You can look at log after search
tail -50 /var/log/clamav.log
### Configure Daily Scan ###
In this example, we will configure a cronjob to scan the /var/www/vhosts directory every week
1. Create cron file
vim /etc/cron.daily/manual_clamscan
2. Add the following to the file above.
#!/bin/bash
SCAN_DIR="/var/www/vhosts"
LOG_FILE="/var/log/clamav/manual_clamscan.log"
/usr/bin/clamscan -i -r $SCAN_DIR >> $LOG_FILE
3. Give our cron script executable permissions:
chmod +x /etc/cron.daily/manual_clamscan
Last edited: