Changes

From SME Server
Jump to navigationJump to search
2 bytes removed ,  01:49, 5 May 2008
m
Some common formating done, more work required...
Line 5: Line 5:  
== Here we go: ==
 
== Here we go: ==
   −
'''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:
+
<ol></li><li>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.6-1.i486.rpm
 
  rpm -ivh --nodeps leafnode-1.11.6-1.i486.rpm
Line 13: Line 13:  
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.
   −
'''2)''' Change directory to /var/service and make a new directory '''nntp'''.
+
</li><li>Change directory to /var/service and make a new directory '''nntp'''.
   −
'''3)''' Change into the nntp directory and make the following directories '''control''', '''log''' and '''peers'''.
+
</li><li>Change into the nntp directory and make the following directories '''control''', '''log''' and '''peers'''.
   −
'''4)''' Use your favourite editor to create the file '''run''' in the nntp directory with the contents:
+
</li><li>Use your favourite editor to create the file '''run''' in the nntp directory with the contents:
    
  #!/bin/sh
 
  #!/bin/sh
Line 37: Line 37:  
Save the file and make it executable for owner, group and others - ''chmod a+x run''.
 
Save the file and make it executable for owner, group and others - ''chmod a+x run''.
   −
'''5)''' Create a file called '''down''' in the nntp directory, no contents or special permissions. This file stops the runsvdir system starting the service automatically, so it has to be started via the SME process startup method, which takes into account the status setting of nntp in the configuration database.
+
</li><li>Create a file called '''down''' in the nntp directory, no contents or special permissions. This file stops the runsvdir system starting the service automatically, so it has to be started via the SME process startup method, which takes into account the status setting of nntp in the configuration database.
   −
'''6)''' Change to the control directory and create a file named '''1''' with the contents:
+
</li><li>Change to the control directory and create a file named '''1''' with the contents:
    
  #!/usr/bin/perl -w
 
  #!/usr/bin/perl -w
Line 47: Line 47:  
Make the file 1 executable by all - ''chmod a+x 1''.
 
Make the file 1 executable by all - ''chmod a+x 1''.
   −
'''7)''' Change to the log directory and create a file named '''run''' with the contents:
+
</li><li>Change to the log directory and create a file named '''run''' with the contents:
    
  #!/bin/sh
 
  #!/bin/sh
Line 57: Line 57:  
Make the file run executable by all - ''chmod a+x run''.
 
Make the file run executable by all - ''chmod a+x run''.
   −
'''8)''' Change to the peers directory and create two empty files '''local''' and '''0''' (that's zero).
+
</li><li>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).
 
Remove all permissions from the file 0 - ''chmod 0 0'' (both zeros).
 
Set the file local to all/read - ''chmod a+r local''.
 
Set the file local to all/read - ''chmod a+r local''.
 
These two files determine access rights when a connection request arrives.
 
These two files determine access rights when a connection request arrives.
   −
'''9)''' Make the directory /var/log/nntp - ''mkdir /var/log/nntp''.
+
</li><li>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''.
   −
'''10)''' Add nntp to the SME configuration database with the command:
+
</li><li>Add nntp to the SME configuration database with the command:
    
  config set nntp service status enabled TCPPort 119 access private
 
  config set nntp service status enabled TCPPort 119 access private
Line 72: Line 72:  
I'm not sure if the last two properties (TCPPort and access) are required by the internals of SME that I haven't investigated. I have simply included them for completness, most other services in the database have them.
 
I'm not sure if the last two properties (TCPPort and access) are required by the internals of SME that I haven't investigated. I have simply included them for completness, most other services in the database have them.
   −
'''11)''' Now to automate news downloads and the house keeping. Make the directory tree /etc/e-smith/templates-custom/etc/crontab - ''mkdir /etc/e-smith/templates-custom/etc/crontab'' and change to that directory. Use your editor to create the file '''nntp''' with contents:
+
</li><li>Now to automate news downloads and the house keeping. Make the directory tree /etc/e-smith/templates-custom/etc/crontab - ''mkdir /etc/e-smith/templates-custom/etc/crontab'' and change to that directory. Use your editor to create the file '''nntp''' with contents:
    
  {
 
  {
Line 92: Line 92:  
The Leafnode rpm contains an /etc/cron.daily/leafnode file that runs texpire during the normal execution of the cron.daily events.
 
The Leafnode rpm contains an /etc/cron.daily/leafnode file that runs texpire during the normal execution 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:
+
</li><li>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:
    
  [root@testsrvr ]# svstat /service/nntp
 
  [root@testsrvr ]# svstat /service/nntp
 
  /service/nntp: down 1676 seconds
 
  /service/nntp: down 1676 seconds
   −
'''13)''' Now to configure the SME boot process to start Leafnode on boot up. Change to the directory /etc/rc.d/rc7.d. Create a symlink from /etc/rc.d/rc7.d/S90nntp to /etc/rc.d/init.d/e-smith-service - ''ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S90nntp''. This ensures that nntp is not started unless it is enabled in the SME configuration database.
+
</li><li>Now to configure the SME boot process to start Leafnode on boot up. Change to the directory /etc/rc.d/rc7.d. Create a symlink from /etc/rc.d/rc7.d/S90nntp to /etc/rc.d/init.d/e-smith-service - ''ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S90nntp''. This ensures that nntp is not started unless it is enabled in the SME configuration database.
   −
'''14)''' Change to /etc/rc.d/init.d/supervise and make a symlink from /etc/rc.d/init.d/supervise/nntp to ../daemontools - ''ln -s ../daemontools /etc/rc.d/init.d/supervise/nntp''.
+
</li><li>Change to /etc/rc.d/init.d/supervise and make a symlink from /etc/rc.d/init.d/supervise/nntp to ../daemontools - ''ln -s ../daemontools /etc/rc.d/init.d/supervise/nntp''.
   −
'''15)''' Issue a signal-event reboot command and when the server comes back up leafnode should be running, login and check with svstat again:
+
</li><li>Issue a signal-event reboot command and when the server comes back up leafnode should be running, login and check with svstat again:
    
  [root@testsrvr ]# svstat /service/nntp
 
  [root@testsrvr ]# svstat /service/nntp
105

edits

Navigation menu