To specify the sizeĪgain, multilog takes care of this automatically. # and ‘K’ or ‘k’ for kilobytes (1K = 1k = 1024 bytes). # You may use ‘M’ or ‘m’ for megabytes (1M = 1m = 1048576 bytes) The multilog program (part of daemontools) takes care of this automatically. # copy the configuration file, change the LogFile variable, and run # running clamd multiple times (if want to run another clamd, please # By default the log file is locked for writing – the lock protects against Log file locking is not necessary under daemontools. You must comment out this line or clamd will not run. The changes you need to make are as follows (lines in red show the original contents, and the lines in blue show what they need to be changed to.) The “ clamd” program is configured using a nf file, which by default is installed in /usr/local/etc. This can make a HUGE difference on a server, whether it’s heavily loaded or not.Īs a test, I just tried “ clamscan” and “ clamdscan” against the same file- clamscan took 1.582 seconds, while clamdscan only took 0.187 seconds. The “ clam dscan” program is such a client- it passes the filenames from its command line to clamd and has clamd do the actual virus scanning, since it already has the virus definitions in memory. When it starts, it reads the virus database into memory one time, and then it listens for commands from clients. The “ clamd” process runs in the background. For a mail server which is scanning every incoming message, and which may be processing hundreds or thousands of messages per hour, this overhead can seriously slow the machine down. The problem with this is that when clamscan starts, it has to read the virus definitions into memory, a process which can take several seconds on some machines, and which takes a non-zero amount of time for any machine. The normal procedure to scan a file for viruses is to run the program “ clamscan” with the filename(s) on the command line. $ sudo svc -u /service/clamd /service/freshclam If you had shut these services down before, you should start them up again immediately. Password: You will not see the password as you type it $ sudo svc -d /service/clamd /service/freshclam If you are upgrading and already have these services running, you need to shut them down before continuing. Lots of messages, hopefully no error messages I do this using the instructions which are included in the source code package. The next step, obviously, is to install clamav. This is normally done using a command like this: If you will be using clamav in conjunction with simscan, you will need to make the clamav user a member of the simscan group. If you will be using clamav in conjunction with qmail-scanner, you may wish to make the clamav user a member of the qscand group. The procedure for doing this is usually specific to your OS and distribution, this example shows how to do it using CentOS Linux. For security reasons, we don’t want these processes to run as root, so we will create a new userid called “ clamav” under which these processes will run. The “ clamd” and “ freshclam” programs are designed to run in the background. I have been running ClamAV under daemontools on my server for several months now, with excellent results.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |