[MacPorts] #50570: Installing clamav/clamav-server is very annoying on MacPorts
MacPorts
noreply at macports.org
Mon Feb 8 05:18:34 PST 2016
#50570: Installing clamav/clamav-server is very annoying on MacPorts
-------------------------------+-----------------------------------
Reporter: graziosi.angelo@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Keywords: | Port: clamav, clamav-server
-------------------------------+-----------------------------------
On GNU/Linux Mint
{{{
sudo apt-get install clamav
}}}
is enough to have a working Clamav installation which automatically
updates its database (main.cvd etc.)
On MacPorts, one have to install at least two package and manually adjust
clamd.conf and freshclam.con as suggested by clamav-server installation,
{{{
sudo port install clamav-server
[...]
To configure clamd and freshclam look for the following files:
/opt/local/etc/clamd.conf
/opt/local/etc/freshclam.conf
If these files do not exist you can copy the sample conf files into place:
sudo cp /opt/local/etc/clamd.conf.sample /opt/local/etc/clamd.conf
sudo cp /opt/local/etc/freshclam.conf.sample
/opt/local/etc/freshclam.conf
Edit /opt/local/etc/clamd.conf to your liking, example:
# Comment out 'Example' near the top if it exists
#Example
LogFile /opt/local/var/log/clamav/clamd.log
PidFile /opt/local/var/run/clamav/clamd.pid
LocalSocket /opt/local/var/run/clamav/clamd.socket
Foreground yes
Edit /opt/local/etc/freshclam.conf to your liking, example:
# Comment out 'Example' near the top if it exists
#Example
UpdateLogFile /opt/local/var/log/clamav/freshclam.log
PidFile /opt/local/var/run/clamav/freshclam.pid
NotifyClamd /opt/local/etc/clamd.conf
Two launchd startup items have been installed.
To load clamd and freshclam do the following:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.clamd.plist
sudo launchctl load -w
/Library/LaunchDaemons/org.macports.freshclam.plist
To unload clamd and freshclam do the following:
sudo launchctl unload -w
/Library/LaunchDaemons/org.macports.clamd.plist
sudo launchctl unload -w
/Library/LaunchDaemons/org.macports.freshclam.plist
To try things out do
sudo freshclam
If all is well you should see your clamav database being updated
[...]
}}}
...otherwise "sudo freshclam" prints ERROR!
But this is not enough!!! One has also to do:
{{{
sudo mkdir -p /opt/local/share/clamav
sudo chown 82:82 /opt/local/share/clamav
sudo chmod 755 /opt/local/share/clamav
}}}
to avoid other ERRORS!
Now
{{{
sudo freshclam
}}}
updates the database but will it do the job automatically? Let's see in
the next few days..
Why have you created a so annoying port installation? and why two
packages? You need only one package which installs ClamAV and setups it so
that the database is update automatically
It should be obvious that the installation of an AV should came with a
working default installation...
--
Ticket URL: <https://trac.macports.org/ticket/50570>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list