QUOTE
Originally posted by Roby
Does anyone know how to do this one?
I read some conflicting stories still if you upgrade to 0.70
Please help as the virus databases are not there anymore.
R
Here is what I did to upgrade clamav to 0.75.1 and seems to be working fine ! Use it at your own risk.
1. First, make a backup of the files "/etc/init.d/clamd", "/etc/cron.daily/clamav" and "/etc/clamav.conf" which will be used later.
2. Remove all of gpans rpms
#rpm -e clamav clamav-database clamav-static clamav-libs clamav-devel
3. Create the "clamav" user and group.
#groupadd clamav
#useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav
4. Get the source files and install it:
#cd /tmp
#wget
http://unc.dl.sourceforge.net/sourceforge/...v-0.75.1.tar.gz
#tar -xvzf clamav-0.75.1.tar.gz
#cd clamav-0.75.1
#./configure --prefix=/usr --sysconfdir=/etc
#make
#make check
#make install
5. Copy the "etc/clamav.conf" file to "/etc/clamav.conf" if not present already.
#cp etc/clamav.conf /etc/clamav.conf
6. Merge the old backed up configuration to the new one manually.
7. Note the placement of the log file, pid file, database directory and local socket file. In mine the log is located as "/var/log/clamd.log", pid file is located as "/var/run/clamd/clamd.pid", the database in "/usr/share/clamav" directory and local socket as "/tmp/clamd".
8. Create the "/var/run/clamd" directory and change owner permissions.
#mkdir /var/run/clamd
#chown clamav /var/run/clamd
9. Next create the "/var/log/clamav.log" file and change owner and file permissions.
#touch /var/log/clamav.log
#chown clamav /var/log/clamav.log
#chmod 600 /var/log/clamav.log
10. Put the "/etc/init.d/clamd" and "/etc/cron.daily/clamav" files in place.
Note: I had to edit the "/etc/init.d/clamd" file to reflect the right location of the clamd.pid file. With the current MailScanner it is not necessary to do a daily cron, because MailScanner automatically checks for freshclam every hour. Check your "/var/log/maillog" for this.
11. Run clamd daemon.
Note: You may need to remove the old clamd socket if it still exists, `rm /tmp/clamd`.
#service clamd restart
12. Update your virus database
#/usr/bin/freshclam -l /var/log/clamav.log --daemon-notify
13. Check your logs "/var/log/clamav.log" and "/var/log/clamd.log" for any errors and the status of clamd.
14. Edit the MailScanner's "/usr/lib/MailScanner/clamav-autoupdate" file to reflect the correct location of "freshclam" and "log" file.
Change: $ClamUpdateCommand = "/usr/local/bin/freshclam";
to: $ClamUpdateCommand = "/usr/bin/freshclam";
Change: $LogFile = "/tmp/ClamAV.update.log";
To: $LogFile = "/var/log/clamav.log";
15. Restart MailScanner.
#service MailScanner restart
I have put this together from what I recall and going through my history... so if I have missed out anything please feel free to correct it.