#21  
Old 8th June 2007, 21:07
cjc81 cjc81 is offline
Junior Member
 
Join Date: Jan 2007
Location: Singapore
Posts: 27
Thanks: 5
Thanked 2 Times in 1 Post
Send a message via MSN to cjc81
Default

Quote:
Originally Posted by XPinG
Hi all, I post my little contribution on how I did on my FC5 server

first I followed the steps posted by cjc81 (thanx man) then :

I enabled logging in /home/admispconfig/ispconfig/tools/clamav/etc/clamd.conf

Code:
LogFile /var/log/clamd.log
I created and changed the owner of the log file to admispconfig

Code:
touch /var/log/clamd.log
chmod admispconfig.admispconfig /var/log/clamd.log
I've put a starting script in /etc/init.d/clamd that I hacked to run the clamd from ispconfig

Code:
#!/bin/sh
#
# clamd         Script to start/stop clamd.
#
# chkconfig:    - 61 39
# description:  clamd is an antivirus daemon.
#
# processname: clamd
# config: /home/admispconfig/ispconfig/tools/clamav/etc/clamd.conf
# pidfile: /var/run/clamd.pid
#
# Source function library
. /etc/rc.d/init.d/functions
# Get network config
. /etc/sysconfig/network
#
test -f /home/admispconfig/ispconfig/tools/clamav/etc/clamd.conf || exit 0
#
RETVAL=0
#
start() {
       echo -n $"Starting Clam AV daemon: "
       daemon /home/admispconfig/ispconfig/tools/clamav/sbin/clamd
       RETVAL=$?
       echo
       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
       return $RETVAL
}
#
stop() {
       echo -n $"Stopping Clam AV daemon: "
       killproc clamd
       RETVAL=$?
       echo
       [ $RETVAL -eq 0 ] && rm -f /var/run/clamd.pid /var/lock/subsys/clamd
       return $RETVAL
}
#
restart() {
       stop
       start
}

reload() {
       echo -n $"Reloading DB: "
       killproc clamd -USR2
       RETVAL=$?
       echo
       return $RETVAL
}
#
case "$1" in
 start)
       start
       ;;
 stop)
       stop
       ;;
 status)
       status clamd
       ;;
 restart)
       restart
       ;;
 condrestart)
       [ -f /var/lock/subsys/clamd ] && restart || :
       ;;
 reload)
       reload
       ;;
 *)
       echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
       exit 1
esac
#
exit $?
and execute

Code:
chmod 700 /etc/init.d/clamd
chkconfig --add clamd
chkconfig --level 2345 clamd on
service clamd start
OMG!

Thanks so much for that! I have been searching high and low to find out how to do that. Appreciated =)
Reply With Quote
Sponsored Links
  #22  
Old 11th June 2007, 09:18
cjc81 cjc81 is offline
Junior Member
 
Join Date: Jan 2007
Location: Singapore
Posts: 27
Thanks: 5
Thanked 2 Times in 1 Post
Send a message via MSN to cjc81
Default

Hey guys, i just checked the email headers of emails coming from my two servers running clamd. Apparently, after about 11am local time, the virus scan process failed.

When i try to execute /home/admispconfig/ispconfig/tools/clamav/bin/clamdscan,

i keep geeting
Quote:
[root@mail bin]# ./clamdscan
connect(): Connection refused
WARNING: Can't connect to clamd.

----------- SCAN SUMMARY -----------
Infected files: 0
Time: 0.000 sec (0 m 0 s)
Anyone knows what happened? Did freshclam updated something that causes this to fail?
Reply With Quote
  #23  
Old 11th June 2007, 09:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,260 Times in 4,124 Posts
Default

Please try to restart your clamd daemon.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #24  
Old 11th June 2007, 09:44
cjc81 cjc81 is offline
Junior Member
 
Join Date: Jan 2007
Location: Singapore
Posts: 27
Thanks: 5
Thanked 2 Times in 1 Post
Send a message via MSN to cjc81
Default

Quote:
Originally Posted by till
Please try to restart your clamd daemon.
Hi Sir,

Tried that. But apparently, the daemon closes itself after a couple of seconds.
Reply With Quote
  #25  
Old 11th June 2007, 16:56
XPinG XPinG is offline
Junior Member
 
Join Date: Apr 2006
Posts: 14
Thanks: 2
Thanked 4 Times in 3 Posts
Default

While configuring my clamd I had this problem and it's why Iprefered to turn on the log, I had

Code:
ERROR: Socket file /home/admispconfig/ispconfig/temp/clamd is in use by another process.
I think this is because the previous clamd process was not fully shut so, stoped the clamd
Code:
service clamd stop
delete the tmp file
Code:
rm -f /home/admispconfig/ispconfig/temp/clamd
and then run again clamd
Code:
service clamd start
I watched again in my log (according to my previous posted config)

Code:
tail -f /var/log/clamd.log
and the error stops apearing I tried then the connection from clamdscan
Code:
/home/admispconfig/ispconfig/tools/clamav/bin/clamdscan
and the error disapear , hope this help you
__________________
Xtrem Studios http://www.xtrem-studio.com
Reply With Quote
The Following User Says Thank You to XPinG For This Useful Post:
cjc81 (11th June 2007)
  #26  
Old 11th June 2007, 18:35
cjc81 cjc81 is offline
Junior Member
 
Join Date: Jan 2007
Location: Singapore
Posts: 27
Thanks: 5
Thanked 2 Times in 1 Post
Send a message via MSN to cjc81
Default

Thanks again. You helped me solve my issue once again =)
Reply With Quote
  #27  
Old 11th June 2007, 18:49
mlz mlz is offline
Senior Member
 
Join Date: Dec 2006
Posts: 189
Thanks: 16
Thanked 9 Times in 9 Posts
Default

The one issue I've always had with clamd is that during an update it sometimes hangs. I've advised the developers so many times I don't even bother. It would be nice if ISPConfig defaulted to clamd and showed the process in the status screen, however for right now anytime I'm having issues, I just do a ps ax | grep [c]lamd and see if it's hung...

BTW, you can put the rpm /tmp/file in your init.d script and have it automagically kill it...
Reply With Quote
  #28  
Old 12th July 2007, 06:38
kassie kassie is offline
Senior Member
 
Join Date: May 2007
Location: Johannesburg, South Africa
Posts: 136
Thanks: 13
Thanked 0 Times in 0 Posts
Default

This is what get if i run this on my Ubuntu 7.0.4

code:
apt-get install clamav-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
clamav-base clamav-freshclam libclamav2 libgmp3c2
Suggested packages:
daemon clamav-docs
Recommended packages:
clamav
The following NEW packages will be installed:
clamav-base clamav-daemon clamav-freshclam libclamav2 libgmp3c2
0 upgraded, 5 newly installed, 0 to remove and 2 not upgraded.
Need to get 10.4MB/10.9MB of archives.
After unpacking 12.2MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://security.ubuntu.com feisty-security/universe clamav-base 0.90.2-0ubuntu1.1
404 Not Found [IP: 82.211.81.138 80]
Err http://security.ubuntu.com feisty-security/universe libclamav2 0.90.2-0ubuntu1.1
404 Not Found [IP: 82.211.81.138 80]
Err http://security.ubuntu.com feisty-security/universe clamav-freshclam 0.90.2-0ubuntu1.1
404 Not Found [IP: 82.211.81.138 80]
Err http://security.ubuntu.com feisty-security/universe clamav-daemon 0.90.2-0ubuntu1.1
404 Not Found [IP: 82.211.81.138 80]
Failed to fetch http://security.ubuntu.com/ubuntu/po...ntu1.1_all.deb 404 Not Found [IP: 82.211 .81.138 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/c/clamav/libclamav2_0.90.2-0ubuntu1.1_i386.deb 404 Not Found [IP: 82.211 .81.138 80]
Failed to fetch http://security.ubuntu.com/ubuntu/po...tu1.1_i386.deb 404 Not Found [IP: 82.211.81.138 80]
Failed to fetch http://security.ubuntu.com/ubuntu/po...tu1.1_i386.deb 404 Not Found [IP: 82. 211.81.138 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Reply With Quote
  #29  
Old 12th July 2007, 09:15
Morons Morons is offline
Senior Member
 
Join Date: Aug 2006
Posts: 189
Thanks: 8
Thanked 15 Times in 7 Posts
Cool apt-get maintenance

Try the following solutions.
Code:
apt-get update
Otherwise browse ubuntu's web for correct /etc/apt/sources.list content, also refer to http://www.howtoforge.com/perfect_setup_ubuntu704_p3 to get a good start sources file. Just remember those sources are normally localised and you might be some distance from it.
If you edit /etc/apt/sources.list always run
Code:
apt-get update
and i can suggest
Code:
apt-get upgrade
as well.
Reply With Quote
The Following User Says Thank You to Morons For This Useful Post:
kassie (12th July 2007)
  #30  
Old 12th July 2007, 15:56
kassie kassie is offline
Senior Member
 
Join Date: May 2007
Location: Johannesburg, South Africa
Posts: 136
Thanks: 13
Thanked 0 Times in 0 Posts
 
Default

Thanks Till,

Now the previous command also worked
apt-get install clamav-daemon

Now I can get cracking with the rest...
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP Server Behind Router backscratcher Server Operation 9 1st August 2010 13:18
Error 553 for Set Up Postfix For Relaying Emails Through Another Mailserver ugach HOWTO-Related Questions 11 15th February 2009 16:57
pure-ftp woes d3th_n1gG4 Server Operation 4 24th January 2007 13:11
getting proftpd to work with TLS Ovidiu Server Operation 11 19th August 2006 20:31
really slow website access itgroup Installation/Configuration 2 17th July 2006 15:21


All times are GMT +2. The time now is 08:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.