strip spotters ssid from WWV
[spider.git] / html / install.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <HTML>
3   <HEAD>
4         <TITLE>DX Spider Installation</TITLE>
5         <meta name="Keywords" content="DX Cluster, DXSpider, Spider, Packet Cluster, DXCluster, Pavillion Software, AK1A, AX25, AX.25, WWV, Packet Radio, Amateur Radio, Propagation, DX, DXing, G1TLH, GB7TLH, Dirk Koopman, Mailing list, Linux, RedHat, PERL">
6         <meta name="Description" content="Software and systems for realtime digital communications between amateur radio stations for the provision of information on propagation conditions and stations operating">
7         <meta name="Author" content="Dirk Koopman G1TLH">
8   </HEAD>
9
10   <body TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#FFFFFF">
11         <FONT COLOR="#606060" face="Verdana,Helvetica,Swiss,Arial"> 
12           <hr>
13           <h2>Installing DX Spider (on Redhat 5.1)</h2>
14           <hr>
15         </font>
16
17         <address><A HREF="mailto:ip@g8sjp.demon.co.uk">Iain Phillips G0RDI</A></address>
18 <!-- Created: Wed Dec  2 16:40:25 GMT 1998 -->
19 <!-- hhmts start -->
20 Last modified: Fri Jan  8 00:29:25 GMT 1999
21 <!-- hhmts end -->
22         <P>This HOWTO describes the installation for DX Spider v1.11 on a "vanilla" 
23           <A href="http://www.redhat.com">RedHat</A> 5.1 platform, 
24           and assumes that you have started with a clean disk, with nothing other than the standard 
25           Red Hat 5.1 distribution. I always select 'everything', and that seems to ensure that 
26           nothing is missed out :-) [ more normal people may like to try with less <em>Ed</em> ].
27
28         <p><b><i>WARNING</i></b> The perl on the vanilla RedHat 5.2
29         (perl-5.004m4-1.i386.rpm) is <em>BROKEN</em>, please use the one
30         in the <a href="../download/index.html#perl">Download</a> section.
31
32         <p>The crucial ingredient for all of this is <a href="http://www.perl.org">Perl 5.004</a>. Now I know
33           Perl 5.005 is out and this will almost certainly work with it, but 
34           <A Href="http://www.redhat.com">RedHat</A> 5.1 comes with 5.004. 
35           <em>Be Warned</em> earlier versions of <A Href="http://www.redhat.com">RedHat</A> 
36           <b>do not</b> come with 5.004 as standard, you need to 
37           <a href="ftp://upgrade.redhat.com">upgrade</a>
38
39         <P>In addition to the standard Red Hat distribution you will require the following <A HREF="http://www.cpan.org/CPAN.html">CPAN</A> modules: -
40         <p>
41         <dir>
42                 MD5-1.7.tar.gz <BR>
43                 Data-Dumper-2.10.tar.gz <BR>
44                 FreezeThaw-0.3.tar.gz <BR>
45                 MLDBM-2.00.ar.gz <BR>
46                 TimeDate-1.8.tar.gz <BR>
47                 IO-1.20.tar.tgz <BR>
48                 Net-Telnet-3.01.tar.gz<BR>
49                 &nbsp;
50         </DIR>
51
52         <p><em>Do</em> get the latest versions of these packages if any of the above list
53           is out of date.
54
55         <P>You'll also need the AX25 utility package. There is much debate about what is "best", what is "better". What works for 5.1 is this: -
56         <p>
57         <DIR>
58                 ax25-utils-2.1.42a-1.i386.rpm
59         </DIR>
60         
61         <P>This can be found at (among other places) <A HREF="ftp://contrib.redhat.com/libc6">ftp://contrib.redhat.com</A>. Note that no attempt is made within this document to describe the steps necessary to install and commission the AX25 kernel package. It remains the responsibility of the reader to have sufficient knowledge and expertise to make this part of the system operation (and to be satisfied that it <B><I>is </B></I>operational) before attempting to install DX Spider. Read the AX25-HOWTO and ask around if you
62  still have trouble after that.
63
64         <P>The last "must have" is the DX Spider distribution itself, and this is available via: -
65
66         <p>
67         <DIR>
68                 <A HREF="../download/index.html">The DX Spider Software</A>
69         </DIR>
70
71         <p>We can now begin:-
72         <P>
73         <OL>
74           
75           <p><LI>Copy the CPAN modules listed above to a convenient place on your computer. For no good reason, I put mine in /usr/local/packages, and the instructions which follow will assume that that's where yours are, too.
76                 <P>Log in as 'root', and make sure you're at '/root' before you continue. Here are exactly the commands you must issue next: -
77                 <PRE>
78 # tar xvfz /usr/local/packages/MD5-1.7.tar.gz
79 # cd MD5-1.7
80 # perl Makefile.PL
81 # make test
82 # make install
83 # cd ..
84 #
85 # tar xvfz /usr/local/packages/Data-Dumper-2.10.tar.gz
86 # cd Data-Dumper-2.10
87 # perl Makefile.PL
88 # make test
89 # make install
90 # cd ..
91 #
92 # tar xvfz /usr/local/packages/FreezeThaw-0.3.tar.gz
93 # cd FreezeThaw-0.3
94 # perl Makefile.PL
95 # make test
96 # make install
97 # cd ..
98 #
99 # tar xvfz /usr/local/packages/MLDBM-2.00.tar.gz
100 # cd MLDBM-2.00
101 # perl Makefile.PL
102 # make test
103 # make install
104 # cd ..
105 #
106 # tar xvfz /usr/local/packages/TimeDate-1.08.tar.gz
107 # cd TimeDate-1.08
108 # perl Makefile.PL
109 # make test
110 # make install
111 # cd ..
112 #
113 # tar xvfz /usr/local/packages/IO-1.20.tar.gz
114 # cd IO-1.20
115 # perl Makefile.PL
116 # make test
117 # make install UNINST=1
118 # cd ..
119 #
120 # tar xvfz /usr/local/packages/Net-Telnet-3.01.tar.gz
121 # cd Net-Telnet-3.01.tar.gz
122 # perl Makefile.PL
123 # make test
124 # make install
125 # cd ..
126 #
127                 </pre>
128                 <P>Do not fall into the trap of thinking they're all the same, just because they nearly are! Pay particular attention to the instructions of IO, above.
129
130                 <p><LI>Create a user to run the cluster under. <B><I><U>UNDER NO CIRCUMSTANCES USE ROOT
131                 </B></I></U><P>Again: <B><I><U>DO NOT USE</B></I></U> root.
132                 <P>In the instructions which follow, it is assumed that this user is called 'sysop'. You may call it anything you wish. Depending upon your security requirements, you may choose to use an existing user. This will be your choice, not ours!
133                 <P># adduser -m sysop
134                 <P>Now set a password for the user:-
135                 <PRE>
136 #
137 # passwd sysop
138 # New UNIX password:
139 # Retype new UNIX password:
140 passwd: all authentication tokens updated successfully
141                 </PRE>
142                 <P># Do not fall into the trap of thinking they're all the same, just because they nearly are! Pay particular attention to the instructions of IO, above.
143                 
144                 <p><LI>Now unpack the DX Spider distribution, set symbolic links and group permissions like this (assumes that the version we're interested in is 1.9. The distribution tar file may be named slightly differently in your case: -
145                 <PRE>
146 # cd ~sysop
147 # tar xvfz spider-1.9.tar.gz
148 # ln -s ~sysop/spider /spider
149 # groupadd -g 251 spider       (or another number)
150 # vi /etc/group                (or your favorite editor)
151                 </PRE>
152                 <P>add 'sysop', your own callsign (in my case 'g0rdi' - which will be used as an alias) and 'root' to the group spider. The result should look something like:-
153                 <PRE>
154 spider:x:251:sysop,g0rdi,root
155                 </PRE>
156
157                 <p><LI>Next step is to set permissions on the 'spider' directory tree and files:-
158                 <PRE>
159 # chown -R sysop.spider spider
160 # find . -type d -exec chmod 2775 {} \;
161 # find . -type f -exec chmod 775 {} \;
162                 </PRE>
163                 <P>This last step allows various users of group spider to have write access to all the directories. Not really needed for now but will be useful when web interfaces start to appear.
164                 
165                 <p><LI><a name="connect"></a>If you want to be able to allow people or clusters
166                 to login via IP then you will need to set up logins for them.
167
168                 <p><pre>
169 # useradd -m gb7djk
170 # passwd gb7djk
171 New UNIX password: 
172 Retype new UNIX password: 
173 passwd: all authentication tokens updated successfully
174                 </pre>
175
176                 <p>You can then either alter the default .bashrc so that it
177                 contains just one line (assuming you use the default bash
178                 shell).
179         
180                 <p><PRE>
181 exec /spider/perl/client.pl &lt;callsign&gt; telnet
182                 </PRE>
183                 
184                 <p>Alternatively you can alter the <tt>/etc/passwd</tt> thus:-
185
186                 <pre>
187 fbb:x:505:505::/home/fbb:/bin/bash
188 gb7djk:x:506:506::/home/gb7djk:/usr/bin/perl /spider/perl/client.pl gb7djk telnet
189                 </pre>
190                 
191                 Don't forget to give them a real password. The <tt>telnet</tt> argument
192                 does two things, it sets the EOL convention to \n rather than
193                 AX25's \r and it automatically reduces the privilege of the
194                 &lt;callsign&gt; to a 'safe[r]' level.). If the user or other cluster
195                 program requires AX25 conventions to operate then you can use 
196                 <tt>ax25</tt> instead.
197
198                 <p>Another thing you can do is to get <tt>inetd</tt> to listen
199                 on a specific port and then start the client up directly. To
200                   do this, create an entry in <tt>/etc/services</tt> with a
201                   port number > 1000 that isn't used elsewhere eg:-
202
203                 <p><pre>
204 gb7djk     8001/tcp 
205 gb7tlh     8002/tcp
206         </pre>
207
208                 Then create some lines in <tt>/etc/inetd.conf</tt> that look 
209                 like this:-
210                 
211                 <p><pre>
212 gb7djk  stream tcp   nowait   sysop /usr/sbin/tcpd /usr/bin/perl /spider/perl/client.pl gb7djk telnet
213 gb7tlh  stream tcp   nowait   sysop /usr/sbin/tcpd /usr/bin/perl /spider/perl/client.pl gb7tlh telnet
214                 </pre>
215
216                 Please <b>DON'T</b> run the client as <tt>root</tt> you will only 
217                 come to regret it later when the next person finds a security hole
218                 in DX Spider (there are bound to be some although I have tried to
219                 avoid the obvious ones I could think of).
220
221                 <p>The only reason I would use this mechanism is for Internet connections
222                   to other or from other clusters. Don't use this for normal users.
223
224                 <p>In the example I have used <tt>tcpd</tt> as the access control 
225                   mechanism to the port. Don't (I can't be bothered to emphasize 
226                   it any more) run a system like this without one, you are asking
227                   for trouble. In fact I use the <a href="http://www.tis.com">TIS
228                   Firewall Toolkit</a> myself, you may find this more intuitive 
229                   to use. The point is that <tt>gb7djk</tt> would only be coming
230                   from one IP address, if it coming from another, it is an imposter!
231
232                 <p><b>You are responsible for arranging and looking after your 
233                         security - not me.</b>
234
235                 <p><LI>As mentioned earlier, for AX25 connections <B><I>you</B></I> are expected to have the AX25 utilities installed, setup, tested and working. See the AX25-HOWTO for more info on this - it really is beyond the scope of this document DX Spider uses ax25d for incoming connections. You need to have entries like this:- 
236                 <PRE>
237 [ether]                                                                         
238 NOCALL   * * * * * *  L                                                         
239 default  * * * * * *  - sysop /spider/perl/client.pl client.pl %u ax25
240 &lt;bbs&gt;
241 NOCALL   * * * * * *  L                                                         
242 default  * * * * * *  - sysop /spider/perl/client.pl client.pl %u ax25
243                 </PRE>
244                 <P>where 'ether' and 'bbs' are appropriate <B><I>KNOWN WORKING</B></I> axport and nrport names respectively. Obviously you can use different names, callsigns or whatever for your purposes, but it is up to you to get it to work. Note I use BPQ over ethernet which why I have the port names I have.
245                 
246                 <p><LI>Find your <TT>netrom_call</TT> and <TT>ax25_call</TT> programs (which on my system live in <TT>/usr/sbin)</TT> and chmod them so that they are SUID <TT>root</TT> 
247                 <PRE>
248 # chown root ax25_call netrom_call
249 # chmod 4775 ax25_call netrom_call
250                 </PRE>
251                 <P>This has to be done to allow you to specify the correct callsigns on outgoing connects
252
253                 <p><LI><a name="dxvar"></a>Login to your computer as sysop, and create the initial DX Spider parameters necessary to start the cluster for the first time.
254                 <PRE>
255 $ startx&#9;&#9;&#9;(much easier to use X)
256 $ cd /spider
257 $ mkdir local
258 $ mkdir local_cmd
259 $ cp perl/DXVars.pm local
260 $ cd local
261 $ vi DXVars.pm&#9;&#9;&#9;(or 'joe DXVars.pm' if you're a WordStar fan ;-)
262                 </PRE>
263                 <P>Using the distributed DXVars.pm as a a template, set your cluster callsign, sysop callsign and other user info to suit your own environment. Note that this a perl file which will be parsed and executed as part of the cluster. If you get it wrong then perl will complain when you start the cluster process.
264                 <P><b>PLEASE USE CAPITAL LETTERS FOR CALLSIGNS</B>
265                 <P>DON'T alter the DXVars.pm (or any other file) in /spider/perl, they are overwritten with every release. Any files or commands you place in /spider/local or /spider/local_cmd will automagically be used in preference to the ones in /spider/perl EVEN whilst the cluster is running!
266                 <PRE>
267 :x
268    
269 $ cd ../perl
270                 </PRE>
271                 <P>Next, run the following script, which will create the basic user file with you as the sysop.
272                 <PRE>
273 $ create_sysop.pl
274                 </PRE>
275                 <P>Now attempt to startup the cluster program and see whether all the various rivets are flying in approximate formation...
276                 <PRE>
277 $ cluster.pl
278 DXSpider DX Cluster Version 1.9
279 Copyright (c) 1998 Dirk Koopman G1TLH
280 loading prefixes ...
281 loading band data ...
282 loading user file system ...
283 starting listener ...
284 reading existing message headers
285 reading cron jobs
286 orft we jolly well go ...
287                 </PRE>
288                 
289                 <p><LI>now log in again (as 'sysop') or start another rxvt or xterm 
290
291                 <PRE>
292 $ client.pl
293                 </PRE>
294                 <P>at the cluster prompt (which will look something like):-
295                 <PRE>
296 G1JIM de GB7JIM 12-Dec-98 1718Z &gt;
297                 </pre>
298                 Type:
299                 <pre>
300 set/node GB7XXX
301                 </PRE>
302                 <p>(where 'GB7XXX' is a DX cluster which you expect to connect to or from).
303                 <P>Now shut the cluster down by simply typing 'shutdown' at the prompt.
304                 <P>The cluster and the client should both go back to prompts 
305                 <p>The callsigns should be the sysop callsign and the cluster callsign
306                   as per your modified DXVars.pm. You can check that the cluster 
307                   connections will work by:-
308                 <pre>
309 $ client.pl gb7xxx      (doesn't have to be uppercase).
310 PC38^GB7JIM^~           &lt;- the cluster thinks this is a cluster
311 ^C                      &lt;- to get out
312                 </pre>
313         </ol>
314
315         <p>You should now have a basic working system. Best of luck! Can I now draw your attention to
316           the <a href="http://www.dxcluster.org/spider">Bug Reporting</a> System. 
317
318         <p>Can I commend to you the Announcements mailing list to which you may 
319           <a href="mailto:majordomo@dxcluster.org?subject=Subscribe&body=subscribe%20dxspider-announce%0D%0A--%0D%0A">subscribe</a>.
320           This is a low volume mailing list which will send you announcements of new patches and 
321           such like things as they arise.
322
323         <p>If you like what you see and want to be a part of the ongoing development then 
324           <a href="mailto:majordomo@dxcluster.org?subject=Subscribe&body=subscribe%20dxspider-support%0D%0A--%0D%0A">subscribe</a> 
325           to the support mailing list which will be the focus of any discussion/bug fixing etc.
326
327 <!-- Standard Footer!! -->
328         <p>&nbsp;</p>
329         <p>
330           <FONT COLOR="#606060"><hr></font>
331         <font color="#FF0000" size=-2>
332           Copyright &copy; 1998 by Dirk Koopman G1TLH and Iain Phillips G0RDI. All Rights Reserved<br>
333         </font>
334         <font color="#000000" size=-2>$Id$</font>
335
336   </BODY>
337 </HTML>