Changes

From SME Server
Jump to navigationJump to search
232 bytes removed ,  00:10, 5 May 2008
Tidied up and corrected after an install on SME7.3.
Line 2: Line 2:  
'''This How To... is based on one I wrote a couple of years back to install Leafnode as a service on SME 7.0rc1. I intend to bring it up to date for SME 7.3.'''
 
'''This How To... is based on one I wrote a couple of years back to install Leafnode as a service on SME 7.0rc1. I intend to bring it up to date for SME 7.3.'''
   −
 
+
Leafnode is a usenet news server for small networks. This How To: is what I did to get it running as a service under SME 7.3 and is based on orginal installation done on SME 7.0rc1. It may or may not be "best practice" with regards how SME likes to do things. If there are errors or better ways please feel free to edit this wiki.
After much head scratching, web searching, reading of man pages and making silly mistakes leading me up blind alleys I've got Leafnode working on SME 7.0. Most of the contents of the control files have been "borrowed", with suitable changes, from other files within the SME system.
  −
 
  −
This How To: is what I did to produce the desired result on SME 7.0rc1. It may or may not be "best practice" with regards how SME likes to do things. If there are errors or better ways please point them out.
      
But anyway to get you going:
 
But anyway to get you going:
   −
'''1)''' Firstly get your Leafnode, I used leafnode-1.11.4-1.i486.rpm, (leafnode-1.11.6-1.i486.rpm is the latest April 2008) the most recent of the version 1 series I could find. Pop that on to your SME Server somewhere and run:
+
'''1)''' Firstly get your Leafnode, I used leafnode-1.11.6-1.i486.rpm the latest in April 2008 and the most recent of the version 1 series I could find. Pop that on to your SME Server somewhere and run:
    
  rpm -ivh --nodeps leafnode-1.11.4-1.i486.rpm
 
  rpm -ivh --nodeps leafnode-1.11.4-1.i486.rpm
   −
The --nodeps is to stop rpm complaining about the lack of xinetd, SME 7 does not use xinetd so this can be safely ignored. Yum doesn't have a --nodeps option so until such time as an SME version of the rpm becomes available that doesn't require xinetd we can't use yum.
+
The --nodeps is to stop rpm complaining about the lack of xinetd, SME 7 does not use xinetd so this can be safely ignored. Yum doesn't have a --nodeps option so until such time as an SME version of the rpm becomes available that doesn't contain a dependancy for xinetd we can't use yum.
    
Follow the instructions in the well commented /etc/leafnode/config to configure Leafnode to your upstream news server and preferences. Don't forget to do a ''fetchnews -f'' to force a fetch of the newsgroups your upstream server(s) carry.
 
Follow the instructions in the well commented /etc/leafnode/config to configure Leafnode to your upstream news server and preferences. Don't forget to do a ''fetchnews -f'' to force a fetch of the newsgroups your upstream server(s) carry.
Line 61: Line 58:  
Make the file run executable by all - ''chmod a+x run''.
 
Make the file run executable by all - ''chmod a+x run''.
   −
'''8)''' Make the directory /var/log/nntp - ''mkdir /var/log/nntp''.
+
'''8)''' Change to the peers directory and create two empty files '''local''' and '''0''' (that's zero).
 +
Remove all permissions from the file 0 - ''chmod 0 0'' (both zeros).
 +
Set the file local to all/read - ''chmod a+r local''.
 +
These two files determine access rights when a connection request arrives.
 +
 
 +
'''9)''' Make the directory /var/log/nntp - ''mkdir /var/log/nntp''.
 
Change ownership and group to smelog - ''chown smelog: /var/log/nntp''.
 
Change ownership and group to smelog - ''chown smelog: /var/log/nntp''.
 
Remove permissions for others - ''chmod o-rwx /var/log/nntp''.
 
Remove permissions for others - ''chmod o-rwx /var/log/nntp''.
  −
'''9)''' Change to the peers directory and create two empty files '''local''' and '''0''' (that's zero).
  −
Remove all permissions from the file 0 - ''chmod 0 0'' (both zeros).
  −
Set the file local to all/read - ''chmod a+r local''.
  −
These to files determine access rights when a connection request arrives.
      
'''10)''' Add nntp to the SME configuration database with the command:
 
'''10)''' Add nntp to the SME configuration database with the command:
Line 84: Line 81:  
   $OUT .= "\n";
 
   $OUT .= "\n";
 
   $OUT .= "# Leafnode news server events\n";
 
   $OUT .= "# Leafnode news server events\n";
  $OUT .= "33\t4\t*\t*\t*\tnews\t/usr/sbin/texpire\n";
   
   $OUT .= "15\t*\t*\t*\t*\tnews\t/usr/sbin/fetchnews\n";
 
   $OUT .= "15\t*\t*\t*\t*\tnews\t/usr/sbin/fetchnews\n";
 
   $OUT .= "\n";
 
   $OUT .= "\n";
 
   # This will:
 
   # This will:
  # Expire the news database at 04:33 every day.
   
   # Download news at 15 minutes past every hour.
 
   # Download news at 15 minutes past every hour.
 
  }
 
  }
Line 95: Line 90:     
Expand the template ''expand-template /etc/crontab'' and check that /etc/crontab has the correct entries for running texpire and fetchnews. Cron will pick up the changes automatically.
 
Expand the template ''expand-template /etc/crontab'' and check that /etc/crontab has the correct entries for running texpire and fetchnews. Cron will pick up the changes automatically.
 +
 +
The Leafnode rpm contains an /etc/cron.daily/leafnode file that runs texpire during the normal excution of the cron.daily events.
    
'''12)''' Create a symlink in /service to /var/service/nntp - ''ln -s /var/service/nntp /service/nntp''. Within 5 seconds the nntp process should be started. Try svstat /service/nntp and you should get a line giving you the status of nntp, some thing similar to:
 
'''12)''' Create a symlink in /service to /var/service/nntp - ''ln -s /var/service/nntp /service/nntp''. Within 5 seconds the nntp process should be started. Try svstat /service/nntp and you should get a line giving you the status of nntp, some thing similar to:
Line 111: Line 108:     
CONGRATULATIONS You now have a working Leafnode on your SME Server and news clients within your network should be able to connect to it for their news feed.
 
CONGRATULATIONS You now have a working Leafnode on your SME Server and news clients within your network should be able to connect to it for their news feed.
Things I am not sure about:
     −
Should the link to daemontools be in the init.d/supervise or init.d directory?
+
[[Category:Howto]]
105

edits

Navigation menu