RPM Virenfilter Installation
Information
Allle zu ClamAV sind über http://www.clamav.net/ zu finden
Vorbereitung
Zuerst auf dem E-Mail Server als root einloggen.
su -
Benutzer erstellen
groupadd -g 401 clamav
useradd -g 401 -u 401 clamav
Älter Versionen von Clamav deinstallieren
Bevor Sie eine neue Version des Virenfilters installieren entfernen Sie zuerst die alten Dateien
Beispiel deinstallation unter Fedora 5
[root@server1 ~]# rpm -qa | grep clamav
clamav-server-0.90.2-1
clamav-0.90.2-1
clamav-db-0.90.2-1
[root@server1 ~]# rpm -e clamav-server-0.90.2-1 \
clamav-0.90.2-1 clamav-db-0.90.2-1
Beispiel Installation unter Fedora 7
Es müssen Benutzer und Gruppe für Clamav erstellt sein.
Die uid und gid sollte unterr 1000 liegen.
Bei VSA Linux:
uid=401(clamav)
gid=401(clamav)
RPM Installieren
yum install clamav-update \
clamav-filesystem \
clamav-lib \
clamav \
clamav-server-sysv \
clamav-data \
clamav-server
Konfigurationsdateien kopieren
cd /usr/share/doc/clamav-server-0.92/
cp clamd.conf /etc/clamd.d/qmail.conf
cp -p clamd.sysconfig /etc/sysconfig/clamd.qmail
cp clamd.init /etc/init.d/clamd.qmail
chmod 755 /etc/init.d/clamd.qmail
chkconfig clamd.qmail on
mkdir -p /var/run/clamd.qmail
chown clamav.clamav /var/run/clamd.qmail
touch /var/log/clamd.qmail
Setup Clamav
vi /etc/clamd.d/qmail.conf
## ## Example config file for the Clam AV daemon ## Please read the clamd.conf(5) manual before editing this file. ## # Example # LogFile must be writable for the user running daemon. # A full path is required. # Default: disabled LogFile /var/log/clamd.qmail [...] # This option allows you to save a process identifier of the listening # daemon (main thread). # Default: disabled PidFile /var/run/clamd.qmail/clamd.pid # Optional path to the global temporary directory. # Default: system specific (usually /tmp or /var/tmp). TemporaryDirectory /tmp [...] # Path to a local socket file the daemon will listen on. # Default: disabled (must be specified by a user) LocalSocket /var/run/clamd.qmail/clamd.sock # Remove stale socket after unclean shutdown. # Default: yes #FixStaleSocket yes # TCP port address. # Default: no #TCPSocket 3310 # TCP address. # By default we bind to INADDR_ANY, probably not wise. # Enable the following to provide some degree of protection # from the outside world. # Default: no #TCPAddr 127.0.0.1 # Run as another user (clamd must be started by root for this option to work) # Default: don't drop privileges User clamav [...]
Clame Update
vi /etc/freshclam.conf
##
## Example config file for freshclam
## Please read the freshclam.conf(5) manual before editing this file.
##
# Example
# Comment or remove the line below.
Starten unter Fedora 7
/etc/init.d/clamd.qmail start
Beispiel Installation unter Fedora 5
Benutzer für Clamav
Es müssen Benutzer und Gruppe für Clamav erstellt sein.
Die uid und gid sollte unterr 1000 liegen.
Bei VSA Linux:
uid=401(clamav)
gid=401(clamav)
RPM Installieren
rpm -Uvh \
http://ftp.belnet.be/packages/dries.ulyssis.org/fedora/fc5/i386/RPMS.dri... \
http://ftp.belnet.be/packages/dries.ulyssis.org/fedora/fc5/i386/RPMS.dri... \
http://ftp.belnet.be/packages/dries.ulyssis.org/fedora/fc5/i386/RPMS.dri... \
http://ftp.belnet.be/packages/dries.ulyssis.org/fedora/fc5/i386/RPMS.dri...
Verzeichnis
mkdir /var/clamav
chown clamav.clamav /var/clamav
mkdir /var/run/clamav/
chown clamav.clamav /var/run/clamav/
Konfigurieren clamav
vi /etc/clamd.conf
# Comment or remove the line below.
#Example
[...]
# Path to the database directory.
# Default: hardcoded (depends on installation options)
DatabaseDirectory /var/clamav
# The daemon works in a local OR a network mode. Due to security reasons we
# recommend the local mode.
# Path to a local socket file the daemon will listen on.
# Default: disabled (must be specified by a user)
LocalSocket /var/run/clamav/clamd.sock
# Remove stale socket after unclean shutdown.
# Default: yes
FixStaleSocket yes
# TCP port address.
# Default: no
#TCPSocket 3310
# TCP address.
# By default we bind to INADDR_ANY, probably not wise.
# Enable the following to provide some degree of protection
# from the outside world.
# Default: no
# TCPAddr 127.0.0.1
[...]
# Run as another user (clamd must be started by root for this option to work)
# Default: don't drop privileges
User clamav
freshclam
vi /etc/freshclam.conf
##
## Example config file for freshclam
## Please read the freshclam.conf(5) manual before editing this file.
##
# Comment or remove the line below.
#Example
Automatisches starten nach reboot und jetzt starten
chkconfig clamd on
/etc/init.d/clamd start
Perl Module installieren
Am besten über CPAN.
Es muss sichergestellt sein, dass /var/run/clamav/clamd.sock existiert.
Unter Fedora 7 kann das Verzeichnisse abweichen z.B. /var/run/clamd.qmail/clamd.sock. Es muss daher sichergestellt sein in der VSA Config unter Mail - Virenfilter - mail_virus_clam_sockfile die richtige Datei eingetragen ist.
perl -e shell -MCPAN
install File::Scan::ClamAV
Installtion Testen
freshclam
Installation
Packete installieren für Clamav installieren.
VSA Dienst einrichten
Unter Fedora 7 kann das Verzeichnisse der pid Datei etwas abweichen
Dienst Name: clamd
Beschreibung: Clam AntiVirus
init.d Datei: clamd
PID Datei: /var/run/clamav/clamd.pid
Critical: nein
- Anmelden um Kommentare zu schreiben