Make changes to the installation manual to show making the client before
[spider.git] / html / installation-1.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5  <TITLE>The DXSpider Installation Manual v1.49: Linux Installation </TITLE>
6  <LINK HREF="installation-2.html" REL=next>
7
8  <LINK HREF="installation.html#toc1" REL=contents>
9 <link rel=stylesheet href="style.css" type="text/css" title="default stylesheet">
10 </HEAD>
11 <BODY>
12 <A HREF="installation-2.html">Next</A>
13 Previous
14 <A HREF="installation.html#toc1">Contents</A>
15 <HR>
16 <H2><A NAME="s1">1. Linux Installation </A></H2>
17
18 <H2><A NAME="ss1.1">1.1 Introduction</A>
19 </H2>
20
21 <P>This section describes the installation of DX Spider v1.47 on a 
22 <A HREF="http://www.redhat.com">RedHat</A> Linux Distribution.
23 Wherever possible I will try to include differences for other distributions.  
24 I do not intend to try and cover the installation of Linux or the setup 
25 of the AX25 utilities.  If you need help on this then read Iains original 
26 installation guide that comes with the Spider distribution.
27 <P>
28 <P>I am assuming a general knowledge of Linux and its commands.  You should 
29 know how to use <EM>tar</EM> and how to edit files using your favourite editor.
30 <P>
31 <P>The crucial ingredient for all of this is 
32 <A HREF="http://www.perl.org">Perl</A>.  Earlier versions of
33 Spider required perl 5.004, however it is now <I>STRONGLY</I> recommended
34 that you use at least version 5.005_03 as this is the version being used
35 in the development of Spider.
36 <P>
37 <P>In addition to the standard Red Hat distribution you will require the 
38 following modules from 
39 <A HREF="http://www.cpan.org/CPAN.html">http://www.cpan.org/CPAN.html</A> ...
40 <P>
41 <P>
42 <UL>
43 <LI> 
44 <A HREF="http://www.cpan.org/modules/by-module/Data/Data-Dumper-2.10.tar.gz">Data-Dumper-2.10.tar.gz</A></LI>
45 <LI> 
46 <A HREF="http://www.cpan.org/modules/by-module/Date/TimeDate-1.10.tar.gz">TimeDate-1.10.tar.gz</A></LI>
47 <LI> 
48 <A HREF="http://www.cpan.org/modules/by-module/IO/IO-1.20.tar.gz">IO-1.20.tar.gz (for perl 5.00403 and lower)</A></LI>
49 <LI> 
50 <A HREF="http://www.cpan.org/modules/by-module/Net/Net-Telnet-3.02.tar.gz">Net-Telnet-3.02.tar.gz</A></LI>
51 <LI> 
52 <A HREF="http://www.cpan.org/modules/by-module/Curses/Curses-1.06.tar.gz">Curses-1.06.tar.gz</A></LI>
53 <LI> 
54 <A HREF="http://www.cpan.org/modules/by-module/Time/Time-HiRes-01.20.tar.gz">Time-HiRes-01.20.tar.gz</A></LI>
55 </UL>
56 <P>
57 <P>Copy the CPAN modules listed above to a convenient place on your computer. One good place would be /usr/local/packages, and the instructions which follow will assume that that's where you have put them.
58 <P>
59 <P>Log in as 'root', and make sure you're at '/root' before you continue. Here are exactly the commands you must issue next: -
60 <P>
61 <PRE>
62 # tar xvfz /usr/local/packages/Data-Dumper-2.10.tar.gz
63 # cd Data-Dumper-2.10
64 # perl Makefile.PL
65 # make test
66 # make install
67 # cd ..
68 #
69 # tar xvfz /usr/local/packages/TimeDate-1.10.tar.gz
70 # cd TimeDate-1.10
71 # perl Makefile.PL
72 # make test
73 # make install
74 # cd ..
75 #
76 # tar xvfz /usr/local/packages/IO-1.20.tar.gz
77 # cd IO-1.20
78 # perl Makefile.PL
79 # make test
80 # make install UNINST=1
81 # cd ..
82 #
83 # tar xvfz /usr/local/packages/Net-Telnet-3.02.tar.gz
84 # cd Net-Telnet-3.02
85 # perl Makefile.PL
86 # make test
87 # make install
88 # cd ..
89 #
90 # tar xvfz /usr/local/packages/Curses-1.06.tar.gz
91 # cd Curses-1.06
92 # perl Makefile.PL
93 # make test
94 # make install
95 # cd ..
96 #
97 # tar xvfz /usr/local/packages/Time-HiRes-01.20.tar.gz 
98 # cd Time-HiRes-01.20
99 # perl Makefile.PL
100 # make test
101 # make install
102 # cd ..
103 </PRE>
104 <P>
105 <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.
106 <P>
107 <P>
108 <H2><A NAME="ss1.2">1.2 Preparation</A>
109 </H2>
110
111 <P>I will assume that you have already downloaded the latest tarball of 
112 the DXSpider software and are ready to install it. I am assuming version 
113 1.47 for this section but of course you would use the latest version.
114 <P>
115 <P>Login as root and create a user to run the cluster under.  <B><I>UNDER 
116 NO CIRCUMSTANCES USE ROOT AS THIS USER!</I></B>.  I am going to use 
117 the name <EM>sysop</EM>.  You can call it anything you wish.  Depending 
118 on your security requirements you may wish to use an existing user, 
119 however this is your own choice.
120 <P>
121 <BLOCKQUOTE><CODE>
122 <PRE>
123 # adduser -m sysop
124 </PRE>
125 </CODE></BLOCKQUOTE>
126 <P>
127 <P>For SUSE distributions, the command would be ..
128 <P>
129 <BLOCKQUOTE><CODE>
130 <PRE>
131 # useradd -m sysop
132 </PRE>
133 </CODE></BLOCKQUOTE>
134 <P>
135 <P>Now set a password for the user ...
136 <P>
137 <BLOCKQUOTE><CODE>
138 <PRE>
139 # passwd sysop
140 # New UNIX password:
141 # Retype new UNIX password:
142 passwd: all authentication tokens updated successfully
143 </PRE>
144 </CODE></BLOCKQUOTE>
145 <P>
146 <H2><A NAME="ss1.3">1.3 Installing the software</A>
147 </H2>
148
149 <P>Now to unpack the DX Spider distribution, set symbolic links and group 
150 permissions.  Copy the tarball to /home/sysop and do the following.
151 <P>
152 <BLOCKQUOTE><CODE>
153 <PRE>
154 # cd ~sysop
155 # tar xvfz spider-1.47.tar.gz
156 # ln -s ~sysop/spider /spider
157 # groupadd -g 251 spider       (or another number)
158 </PRE>
159 </CODE></BLOCKQUOTE>
160 <P>If you do not have the command <EM>groupadd</EM> available to you simply 
161 add a line in /etc/group by hand.
162 <P>
163 <BLOCKQUOTE><CODE>
164 <PRE>
165 # vi /etc/group                (or your favorite editor)
166 </PRE>
167 </CODE></BLOCKQUOTE>
168 <P>You also need to add some others to the group, including your own callsign 
169 (this will be used as an alias) and root.  The finished line in /etc/group 
170 should look something like this
171 <P><CODE>spider:x:251:sysop,g0vgs,root</CODE>
172 <P>
173 <P>The next step is to set the permissions on the Spider directory tree and files ....
174 <P>
175 <BLOCKQUOTE><CODE>
176 <PRE>
177 # chown -R sysop.spider spider
178 # find . -type d -exec chmod 2775 {} \;
179 # find . -type f -exec chmod 775 {} \;
180 </PRE>
181 </CODE></BLOCKQUOTE>
182 <P>
183 <P>This last step allows various users of the group <EM>spider</EM> to have 
184 write access to all the directories.  This is not really needed just yet 
185 but will be useful when web interfaces start to appear.
186 <P>
187 <P>Finally, you need to fix the permissions on the ax25_call and netrom_call 
188 programs.  Check where they are with the <EM>locate</EM> command and alter 
189 the permissions with the <EM>chmod</EM> command like this ..
190 <P>
191 <BLOCKQUOTE><CODE>
192 <PRE>
193 # chown root ax25_call netrom_call
194 # chmod 4775 ax25_call netrom_call
195 </PRE>
196 </CODE></BLOCKQUOTE>
197 <P>
198 <H2><A NAME="ss1.4">1.4 Setting callsigns etc</A>
199 </H2>
200
201 <P>Now login to your machine as the user you created earlier.  In my case that 
202 user is called <EM>sysop</EM>.  Once logged in, issue the following commands ....
203 <P>
204 <BLOCKQUOTE><CODE>
205 <PRE>
206 $ cd /spider
207 $ mkdir local
208 $ mkdir local_cmd
209 $ cp perl/DXVars.pm.issue local/DXVars.pm
210 $ cd local
211 $ vi DXVars.pm (or your favourite editor)
212 </PRE>
213 </CODE></BLOCKQUOTE>
214 <P>
215 <P>Using the distributed DXVars.pm as a a template, set your cluster callsign, 
216 sysop callsign and other user info to suit your own environment. Note that 
217 this a perl file which will be parsed and executed as part of the cluster. If 
218 you get it wrong then perl will complain when you start the cluster process.  
219 It is important only to alter the text of any section.  Some of the lines look 
220 a little odd.  Take this line for example ....
221 <P><CODE>$myemail = "ianmaude\@btinternet.com";</CODE>
222 <P>
223 <P>There appears to be an extra slash in there.  However this has to be there 
224 for the file to work so leave it in.
225 <P>
226 <P><B>PLEASE USE CAPITAL LETTERS FOR CALLSIGNS</B>
227 <P>
228 <P>DON'T alter any file in /spider/perl, they are overwritten with every
229 release. Any files or commands you place in /spider/local or /spider/local_cmd 
230 will automagically be used in preference to the ones in /spider/perl EVEN 
231 while the cluster is running!
232 <P>
233 <P>Save the new file and change directory to ../perl ....
234 <P>
235 <BLOCKQUOTE><CODE>
236 <PRE>
237 $ cd ../perl
238 </PRE>
239 </CODE></BLOCKQUOTE>
240 <P>
241 <P>Now type the following command which creates the basic user file with you as 
242 the sysop.
243 <P>
244 <BLOCKQUOTE><CODE>
245 <PRE>
246 $ ./create_sysop.pl
247 </PRE>
248 </CODE></BLOCKQUOTE>
249 <P>
250 <H2><A NAME="ss1.5">1.5 The client program</A>
251 </H2>
252
253 <P>In earlier versions of Spider, all the processes were Perl scripts.  This
254 was fine but with a lot of users your computer memory would soon be used up.
255 To combat this a new client was written in "C".  This client only works for
256 <EM>incoming</EM> connects at the moment.  Before you can use it though it
257 has to be "made".  CD to /spider/src and type <EM>make</EM>.  You
258 should see the output on your screen and hopefully now have a small C program
259 called <EM>client</EM>.  Leave it in this directory.
260 <P>
261 <P>
262 <H2><A NAME="ss1.6">1.6 Starting up for the first time</A>
263 </H2>
264
265 <P>We can now bring spider up for the first time and see if all is well or not!  
266 It should look something like this ...
267 <P>
268 <BLOCKQUOTE><CODE>
269 <PRE>
270 $ ./cluster.pl
271 DXSpider DX Cluster Version 1.47
272 Copyright (c) 1998 Dirk Koopman G1TLH
273 loading prefixes ...
274 loading band data ...
275 loading user file system ...
276 starting listener ...
277 reading existing message headers
278 reading cron jobs
279 orft we jolly well go ...
280 </PRE>
281 </CODE></BLOCKQUOTE>
282 <P>
283 <P>If all is well then login on another term or console as <EM>sysop</EM> and 
284 cd to /spider/src.  Now issue the following command ...
285 <P>
286 <BLOCKQUOTE><CODE>
287 <PRE>
288 $ ./client
289 </PRE>
290 </CODE></BLOCKQUOTE>
291 <P>
292 <P>This should log you into the cluster as the sysop under the alias callsign we 
293 set earlier.  In this case the callsign is G0VGS.  The cluster callsign is set 
294 in the DXVars.pm file in /spider/local.  In this case we will assume that this 
295 was set as GB7MBC.  You should therefore see this when you login ....
296 <P>
297 <BLOCKQUOTE><CODE>
298 <PRE>
299 G0VGS de GB7MBC 19-Nov-1999 2150Z >
300 </PRE>
301 </CODE></BLOCKQUOTE>
302 <P>If you do, congratulations!  If not, look over the instructions again, you 
303 have probably missed something out.  You can shut spider down again with the 
304 command ....
305 <P>
306 <BLOCKQUOTE><CODE>
307 <PRE>
308 shutdown
309 </PRE>
310 </CODE></BLOCKQUOTE>
311 <P>
312 <P>and both the cluster and the client should return to Linux prompts.
313 <P>
314 <P>
315 <HR>
316 <A HREF="installation-2.html">Next</A>
317 Previous
318 <A HREF="installation.html#toc1">Contents</A>
319 </BODY>
320 </HTML>