hi,
for those interested, here are my unadorned, somewhat dusty, 'from scratch' install
notes for clamav.
for me, works great on OSX 10.3.5.
richard
################################################################################
gmp -- GNU Multiple Precision Arithmetic Library
# http://www.swox.com/gmp/
DL: ftp://ftp.gnu.org/gnu/gmp/gmp-4.1.3.tar.gz
gnutar zxf gmp-4.1.3.tar.gz
cd /usr/ports/gmp-4.1.3
unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL LANG LINGUAS
./configure \
--prefix=/usr/local \
--enable-cxx \
--enable-fft \
--enable-mpbsd \
--enable-mpfr \
--disable-shared \
--enable-static
# note: i simply can NOT get the shared libs to build ... working on it
make
make install
################################################################################
clamav
# http://clamav.sourceforge.net
# http://www.afp548.com/eBBS/viewtopic.php?t=728
DL:
cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/clamav login
CVS password: (empty)
cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/clamav co clamav-devel
# create dedicated user/group
# change to make sure that XX & YY are "free" IDs
niutil -create / /groups/clamav ;\
niutil -createprop / /groups/clamav gid XX ;\
niutil -create / /users/clamav ;\
niutil -createprop / /users/clamav shell /bin/tcsh ;\
niutil -createprop / /users/clamav realname "Clamav User" ;\
niutil -createprop / /users/clamav uid XX ;\
niutil -createprop / /users/clamav gid YY ;\
niutil -createprop / /users/clamav _shadow_passwd ;\
passwd clamav
New password: "XXXXXXXXXXX"
Retype new password: "XXXXXXXXXXX"
niutil -appendprop / /groups/clamav users clamav
niutil -appendprop . /groups/clamav users root
niutil -read . /groups/clamav
niutil -appendprop . /groups/mail users clamav
cd /usr/ports/clamav-devel
unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL LANG LINGUAS
;\
setenv LDFLAGS "-lgmp"
./configure \
--prefix=/usr/local/clamav \
--mandir=/usr/local/man \
--enable-shared \
--enable-static \
--with-user=clamav \
--with-group=clamav
ranlib /usr/lib/libbz2.a
make
rm -rf /usr/local/clamav ;\
make install
# setup freshclam log
touch /var/log/freshclam.log ;\
chmod 644 /var/log/freshclam.log ;\
chown clamav:clamav /var/log/freshclam.log
# setup clamd log
touch /var/log/clamd.log ;\
chmod 644 /var/log/clamd.log ;\
chown clamav:clamav /var/log/clamd.log
mkdir /var/clamav
====================================================
(EDITOR) /var/clamav/clamav.conf
## config file for the Clam AV daemon
## ref: man clamav.conf
LogFile /var/log/clamd.log
# LogFileUnlock
LogFileMaxSize 2M
LogTime
# LogClean
LogSyslog
LogVerbose
PidFile /var/run/clamd.pid
# Optional path to the global temporary directory.
# Default is system specific - usually /var/tmp or /tmp.
#TemporaryDirectory /var/tmp
DatabaseDirectory /var/clamav_db
DatabaseMirror clamav.man.olsztyn.pl
MaxAttempts 3
LocalSocket /tmp/clamd
FixStaleSocket
# 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.
#TCPAddr 127.0.0.1
# TCPAddr 10.0.0.2
MaxConnectionQueueLength 15
## input stream will be saved to disk before scanning
## this allows scanning within archives.
# StreamSaveToDisk
# Close the connection if this limit is exceeded.
# StreamMaxLength 10M
MaxThreads 10
MaxDirectoryRecursion 15
FollowDirectorySymlinks
FollowFileSymlinks
SelfCheck 3600
## Execute a command when virus is found. In the command string %v and %f will
## be replaced by the virus name and the infected file name respectively.
##
## SECURITY WARNING: Make sure the virus event command cannot be exploited,
## eg. by using some special file name when %f is used.
## Always use a full path to the command.
## Never delete/move files with this directive !
# VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %f: %v"
User clamav
# AllowSupplementaryGroups
## Don't fork into background. Useful in debugging.
# Foreground
## Enable debug messages in libclamav.
Debug
################################
## Document scanning
# This option enables scanning of Microsoft Office document macros.
ScanOLE2
################################
## Mail support
## Uncomment this option if you are planning to scan mail files.
ScanMail
################################
## Archive support
ScanArchive
# ScanRAR
ArchiveMaxFileSize 10M
ArchiveMaxRecursion 5
ArchiveMaxFiles 1000
# Mark potential archive bombs as viruses (0 disables the limit)
ArchiveMaxCompressionRatio 200
# ArchiveLimitMemoryUsage
# Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
#ArchiveDetectEncrypted
====================================================
# initialize virusdb
mkdir /var/clamav_db
========================================================================
(EDITOR) /var/clamav_db/mirrors.txt
# us & poland
# cref: http://www.clamav.net/mirrors.html
# set firewall to allow port 80 access ...
# 64.18.100.4 clamav.catt.com
# 128.121.60.235 clamav-sj.viaverio.com
# 209.204.175.217 clamav.sonic.net
# 213.184.16.3 sunfire.man.olsztyn.pl
# 64.74.124.90 avmirror1.prod.rxgsys.com
# 207.201.202.73 avmirror2.prod.rxgsys.com
# 199.239.233.95 clamav-du.viaverio.com
clamav.catt.com
clamav-sj.viaverio.com
clamav.sonic.net
clamav.man.olsztyn.pl
avmirror1.prod.rxgsys.com
avmirror2.prod.rxgsys.com
clamav-du.viaverio.com
========================================================================
chmod -R 774 /var/clamav_db ;\
chown -R clamav:clamav /var/clamav_db
# for convenience ...
========================================================================
(EDITOR) /usr/local/bin/newclam
/usr/local/clamav/bin/freshclam --log=/var/log/freshclam.log --datadir=/var/clamav_db
--config-file=/var/clamav/clamav.conf
========================================================================
chmod 774 /usr/local/bin/newclam
rehash
newclam
# test clamscan command against ClamAV source folder
# There's a virus or five in there and if you've done
# everything correctly you will see them come up in the scan.
/usr/local/clamav/bin/clamscan --recursive --log-verbose --log=/var/log/clamscan.txt
/usr/ports/clamav-devel/test --database=/var/clamav_db
# output should include/end with:
# /usr/ports/clamav-devel/test/test1: ClamAV-Test-Signature FOUND
# /usr/ports/clamav-devel/test/test1.bz2: ClamAV-Test-Signature FOUND
# /usr/ports/clamav-devel/test/test2.badext: ClamAV-Test-Signature FOUND
# /usr/ports/clamav-devel/test/test2.zip: ClamAV-Test-Signature FOUND
# /usr/ports/clamav-devel/test/test3.rar: ClamAV-Test-Signature FOUND
mkdir /Library/StartupItems/ClamAV
====================================================
(EDITOR) /Library/StartupItems/ClamAV/ClamAV
#!/bin/sh
. /etc/rc.common
if [ "${CLAMAV:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting ClamAV daemons"
/usr/local/clamav/sbin/clamd -c /var/clamav/clamav.conf
/usr/local/clamav/bin/freshclam --user=clamav --daemon
--log=/var/log/freshclam.log --datadir=/var/clamav_db
--config-file=/var/clamav/clamav.conf --daemon-notify=/var/clamav/clamav.conf
fi
====================================================
====================================================
(EDITOR) /Library/StartupItems/ClamAV/StartupParameters.plist
{
Description = "ClamAV AntiVirus daemons";
Provides = ("ClamAV");
Requires = ("SMTP"); <--- CHANGE AS NECESSARY TO REFLECT YOUR MAILSERVER
CONFIG
OrderPreference = "None";
Messages =
{
start = "Starting ClamAV daemons";
stop = "Starting ClamAV daemons";
};
}
====================================================
chown -R root:wheel /Library/StartupItems/ClamAV ;\
chmod 755 /Library/StartupItems/ClamAV ;\
chmod 755 /Library/StartupItems/ClamAV/ClamAV ;\
chmod 644 /Library/StartupItems/ClamAV/StartupParameters.plist
# enable automatic startup
====================================================
(EDITOR) /etc/hostconfig
+++ CLAMAV=-YES-
====================================================
# CRON update definitions every 4 hours, at 40 minutes after the hour
# change as you like ...
====================================================
(EDITOR) /etc/crontab
+++ 40 */4 * * * root
/usr/local/clamav/bin/freshclam --quiet --log=/var/log/freshclam.log
--datadir=/var/clamav_db --config-file=/var/clamav/clamav.conf
====================================================
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users