Чтобы не забыть,написал статью по обновлению Clamav для почтового сервера Exim.
Иногда бывает, что нового порта еще нет в репозитарии.
Поэтому поступаем следующим образом:
Сначала обновляем порты.
exim# cvsup -g -L 2 /etc/ports-supfile
exim# cd /usr/ports/security/clamav/
Проверяем, какая версия установилась.
exim# less distinfo
MD5 (clamav-0.96.1.tar.gz) = 38e7870db6e9ad0e569518499a6f3651
SHA256 (clamav-0.96.1.tar.gz) =
13dd25907059068da2a367d2b330fbc37d5d2764eb3b047214ce754a9ca74ea
SIZE (clamav-0.96.1.tar.gz) = 40568982
Видим,что новая.
Сохраним где-нибудь сведения, с какими опциями был собран порт, на всякий случай.
exim# make showconfig > /root/clamd.txt
===> The following configuration options are available for clamav-0.96.1:
ARC=off «Enable arch archives support»
ARJ=on «Enable arj archives support»
LHA=on «Enable lha archives support»
UNZOO=on «Enable zoo archives support»
UNRAR=on «Enable rar archives support»
LLVM=on «Enable JIT Bytecode compiler»
MILTER=off «Compile the milter interface»
LDAP=off «libmilter was built with LDAP»
ICONV=off «Enable ICONV support»
STDERR=off «Print logs to stderr instead of stdout»
EXPERIMENTAL=off «Build experimental code»
===> Use ‘make config’ to modify these settings
exim# cd /usr/ports/security/clamav/
Очищаем порт для новой инсталляции программы.
exim# make clean
===> Cleaning for clamav-0.96.1
Собираем новый порт
exim# make
===> Vulnerability check disabled, database not found
===> License check disabled, port has not defined LICENSE
===> Found saved configuration for clamav-0.96
=> clamav-0.96.1.tar.gz doesn’t seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from https://heanet.dl.sourceforge.net/project/clamav/clamav/0.96.1/.
clamav-0.96.1.tar.gz 1% of 38 MB 176 kBps
Если порт собрался, то останавливаем сервисы:
exim# /usr/local/etc/rc.d/clamav-freshclam stop
Stopping clamav_freshclam.
Waiting for PIDS: 904.
exim# /usr/local/etc/rc.d/clamav-clamd stop
Stopping clamav_clamd.
Waiting for PIDS: 899.
Деинсталлируем старую установку:
exim# make deinstall
===> Deinstalling for security/clamav
===> Deinstalling clamav-0.96
Инсталлируем новую программу:
exim# make install
===> Installing for clamav-0.96.1
===> clamav-0.96.1 depends on executable: arj — found
===> clamav-0.96.1 depends on executable: lha — found
===> clamav-0.96.1 depends on executable: unzoo — found
===> Generating temporary packing list
===> Checking if security/clamav already installed
…edited…
This port has installed the following startup scripts which may cause
these network services to be started at boot time.
/usr/local/etc/rc.d/clamav-freshclam
/usr/local/etc/rc.d/clamav-clamd
If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type ‘make deinstall’
to deinstall the port if this is a concern.
For more information, and contact details about the security
status of this software, see the following webpage:
https://www.clamav.net/
Запускаем сервисы:
exim# /usr/local/etc/rc.d/clamav-freshclam start
Starting clamav_freshclam.
exim# /usr/local/etc/rc.d/clamav-clamd start
Starting clamav_clamd.
Проверяем,запустились ли?
exim# ps -ax | grep clamd
63001 ?? Ss 0:05.94 /usr/local/sbin/clamd
63004 p0 D+ 0:00.00 grep clamd
exim# ps -ax | grep clamav
62992 ?? Is 0:00.48 /usr/local/bin/freshclam —daemon -p /var/run/clamav/freshclam.pid
63006 p0 D+ 0:00.00 grep clamav
Если, хотите посмотреть логи,то разрешения на файлы логов после их пересоздания должны быть :
-rw-r—— 1 clamav clamav 1980434 May 26 14:24 clamd.log
-rw-r—— 1 clamav clamav 1031369 May 26 13:51 freshclam.log