]> code.citadel.org Git - citadel.git/blob - citadel/install.txt
* Small cosmetic change to date/time output
[citadel.git] / citadel / install.txt
1                       Citadel/UX Installation Procedure
2                  See copyright.doc for copyright information
3  
4  
5  OVERVIEW
6  
7    Citadel/UX is an advanced, multiuser, client/server, room-based BBS
8 program.  It is designed to handle the needs of both small dialup systems and
9 large-scale Internet-connected systems.  It was originally developed on an
10 Altos system running Xenix, and has been installed and tested on various
11 Unix and Unix-like platforms.  The author's current development environment
12 (and BBS) is a Linux/GNU system.  The current distribution includes:
13   
14     - The Citadel/UX server (this is the back end that does all processing)
15     - A text-based client program designed with the traditional Citadel "look
16       and feel" (room prompts, dot commands, and the like)
17     - A networker that can share rooms and email between multiple systems.
18       Replication can be performed via TCP/IP or any external transport.
19     - Setup programs
20     - A rich set of utilities for system administration and maintenance
21     - Documentation
22  
23  Some knowledge of the Unix system is necessary to install and manage the
24 system. It is preferable that the sysop have superuser access to the operating
25 system. The following are required to install Citadel/UX:
26
27     - A Unix operating system (Linux, BSD, Solaris, DEC Unix, etc.)
28     - C compiler (such as gcc or egcs) and "make"
29     - POSIX threads
30     - TCP/IP
31     - The "gdbm" record manager
32     - Enough disk space to hold all of the programs and data
33  
34  If you are running Citadel/UX on a Linux system, it is STRONGLY recommended
35 that you use a version based on glibc v2 (also called libc6).  libc5 contains
36 a number of thread safety problems.  Furthermore, most modern Linux
37 distributions have libc6, pthreads, gdbm, and the compiler already installed
38 and integrated for you.
39   
40     
41  NOW AVAILABLE:
42  
43     - "WebCit", a gateway program to allow full access to Citadel/UX BBS's
44       via the World Wide Web.  Interactive access through any Web browser.
45   
46  COMING SOON: 
47   
48     - Newer and better GUI based clients.
49    
50  
51   
52  EVERYTHING IN ITS PLACE...
53
54    Hopefully you've unpacked the distribution archive into its own directory.
55 This is the directory in which all Citadel files are located and in which all
56 BBS activity will take place. Several subdirectories have already been created
57 during the unpacking process, and others may be created by the software if
58 needed.
59  
60    Make sure you have the "gdbm" record manager installed on your system, and
61 that you have installed the libraries and headers required to compile gdbm
62 programs.  Likewise, if your operating system uses a separate library to
63 support POSIX threads, make sure that library is installed as well.
64    
65   
66  THE BBS LOGIN
67   
68    There will be one account in /etc/passwd which all BBS users will use to
69 login to the system. This account is typically called "bbs" or "citadel" or
70 something to that effect. You will tell Citadel what the user-id of that
71 account is, and when someone logs in under that account, Citadel will prompt
72 for a user name.
73
74 The BBS login should have a unique uid. The home directory should be the
75 one your BBS resides in (in this example we will use /usr/bbs) and the shell
76 should be either "citadel" in that directory, or a script that will start up
77 citadel (you may wish to set up an external text editor; see below).  Example:
78  
79  bbs::100:1:BBS Login:/usr/citadel:/usr/citadel/citadel
80   
81  When you run setup later, you will be required to tell it what the BBS
82 login's numeric user ID is, so it knows what user to run as.  If you create
83 an account called bbs, guest, or citadel, the setup program will automatically
84 pick up the user ID by default.
85
86   For all other users in /etc/passwd, Citadel will automatically set up an
87 account using the "full name" field. No password is required, since it
88 assumes that if a user is logged in, he/she has already entered a password.
89 Note that this does have to be enabled at compile time (see ENABLE_AUTOLOGIN
90 in the Makefile).  If such an account needs to be accessed remotely (such as
91 from client software), these users can use *either* their Citadel login name
92 or their login name on the host computer, and their password on the host
93 computer.
94    
95   
96  COMPILING THE PROGRAMS
97    
98  
99    You can easily compile Citadel with the following commands:
100  
101    ./configure
102    make
103    make install
104  
105    The 'configure' script will generate a Makefile from the Makefile.in, and
106 it will also write the file "sysdep.h" to your Citadel directory.  Please do
107 not edit sysdep.h or Makefile.in yourself.  The configure script will figure
108 out your system dependencies and set everything correctly.
109  
110    By default, the Citadel system will install in /usr/local/citadel.  If you
111 wish to place it in a different directory, you can instead do:
112  
113    ./configure --prefix=/opt/citadel      (or whatever)
114    
115   
116    File permissions are always a bother to work with. You don't want the
117 board to crash because someone couldn't access a file, but you also don't
118 want shell users peeking into the binaries to do things like reading others'
119 mail, finding private rooms, etc.   The Citadel server needs to be started
120 as root in order to bind to a privileged port, but as soon as its
121 initialization is finished, it changes its user ID to your BBS user ID in
122 order to avoid security holes.
123   
124     
125  THE CITADEL.RC FILE
126  
127  This is a change from the way things were done before.  All client-side setup
128 is in a "citadel.rc" file.  The standard client looks for this file in:
129  1. $HOME/.citadelrc
130  2. /usr/local/lib/citadel.rc
131  3. <compiled BBSDIR>/citadel.rc
132  
133  The next couple of sections deal with client-side configuration.
134  
135  USING AN EXTERNAL EDITOR FOR MESSAGES
136  
137  Citadel/UX has a built-in message editor.  However, you can also use your
138 favorite text editor to write messages.  To do this you simply put a line in
139 your citadel.rc file like:
140
141 editor=/usr/bin/vi
142  
143  ...would make Citadel call the vi editor when using the .<E>nter <E>ditor
144 command.  You can also make it the default editor for the <E>nter command by
145 editing the citadel.rc file.  (WARNING: external editors on public systems
146 can create a security hole.  Make sure there is absolutely no way for users
147 to drop into the shell from the editor, or save files other than the temp file
148 they are editing!)
149
150  Using this mechanism, shell users can pick their favorite editor for Citadel.
151 BBS users can use external editors too; just have the bbs login call a script
152 that sets the variables and then calls citadel.  I used to recommend using
153 an external editor as the default, but the built-in editor is now a bit more
154 robust, so the use of an external editor is definitely optional.  By the
155 way, be VERY careful what editor you choose and how you set up its options.
156 Giving the general public to an editor like vi or emacs can open up lots of
157 security holes.
158
159
160  PRINTING MESSAGES
161  
162  Citadel/UX can send messages to a printer, or just about anywhere else in
163 your system.  The variable PRINTCMD in citadel.rc specifies what command you
164 use to print.  Text is sent to the standard input (stdin) of the print command.
165  
166  So if you did this:
167  
168 printcmd="nl|pr|lpr -dlocal"
169  
170  ...that would add line numbers, then paginate, then print on the printer
171 named "local".  There's tons of stuff you can do with this feature.  For
172 example, you could use a command like "cat >>$HOME/archive" to save copies
173 of important messages in a textfile.
174
175
176  SETUP AND LOGIN
177   
178    Before logging in for the first time, you must run the setup program.  Type
179 "./setup" to begin this procedure.
180  
181    The setup program will ask you what directory to place your data files in.
182 You can use this functionality to keep your programs and data in different
183 directories, or to run more than one BBS on the same computer.  If you don't
184 use the default directory (the one specified in the Makefile), remember to
185 specify the directory name again when you start up the server later on.
186    
187    If you've used older versions of Citadel/UX before, you'll notice that the
188 setup program does much less than it did before.  It won't create any empty
189 data files; that's now done automatically by the server the first time it
190 starts.  It also asks only a few questions; that's because the rest of the
191 global configuration is now done from within Citadel.
192   
193       
194  PREPARING TO START THE SERVER
195   
196    The files /etc/services and /etc/inittab must be modified in order to run
197 the Citadel server.  The setup program will perform the correct modifications
198 for you if you allow it to.  If you'd prefer to do it manually, or if you're
199 interested in what these modifications are, then read on...
200  
201    Before you can use Citadel, you must define the "citadel" service to your 
202 system.  This is accomplished by adding a line to your /etc/services file that
203 looks something like this:
204  
205  citadel                504/tcp                 # Citadel/UX Server
206    
207  504 is the port number officially designated by the IANA for use by Citadel. 
208 There should not be any need to use a different port number, unless you are 
209 running multiple BBS's on the same computer and therefore need a different
210 port for each one.
211  
212   The next step is to arrange for the server to start.  The "citserver"
213 program is the main Citadel server.  Before we cover the recommended method of
214 starting the server, let's examine its usage options:
215  
216  citserver [-hHomeDir] [-xDebugLevel] [-tTraceFile] [-d] [-f]
217  
218  The options are as follows:
219  
220  -hHomeDir     - the directory your BBS data files live in.  This should, of
221 course, be a directory that you've run the "setup" program against to set up
222 some data files.  If a directory is not specified, the directory name which
223 was specified in the Makefile will be used.
224  
225  -xDebugLevel  - Set the verbosity of trace messages printed.  The available 
226 debugging levels are:
227     1 - Internal errors (failed thread creation, malloc problems, etc.)
228     2 - Network errors (broken sockets, failed socket creation)
229     3 - Begin and end of sessions, startup/shutdown of server
230     5 - Server commands being sent from clients
231     7 - Entry and exit of various functions 
232     8 - Entry and exit of critical sections
233     9 - Various debugging checkpoints (insanely verbose)
234   
235  -tTraceFile   - Tell the server where to send its debug/trace output.  
236 Normally it is sent to stdout.
237  
238  -d            - Run as a daemon.  This switch would be necessary if you were 
239 starting the Citadel server, for example, from an rc.local script (which is 
240 not recommended, because this won't allow the server to automatically restart
241 when it is shut down).
242  
243  -f            - Defragment all the databases upon startup.  This isn't
244 normally necessary due to the nature of the data stored in Citadel, but the
245 option is provided in case you need it.
246  
247  
248    The preferred method of starting the Citadel server is to place an entry in
249 your /etc/inittab file.  This will conveniently bring the server up when your 
250 system is up, and terminate it gracefully when your system is shutting down.  
251 The exact syntax for your system may vary, but here's the entry that I use on 
252 my Linux system:
253   
254  cit:2345:respawn:/appl/citadel/citserver -h/appl/citadel -t/dev/tty6 -x3
255  
256  What I've done here is to set debugging level 3, and have the trace stuff
257 output to one of my virtual consoles.  It's important to remember to turn off
258 any getty that is set up on that virtual console, if you do this.  After
259 making this change, the command "init q" works on most systems to tell init
260 to re-read the file.  If in doubt, just reboot your computer.
261    
262    
263  LOGGING IN FOR THE FIRST TIME
264    
265    At this point, your system is ready to run. Run the citadel program from
266 the shell and it will automatically create your account.  NOTE: the first
267 user account to be created will automatically be set to access level 6
268 (Aide).  This overcomes some obvious logistical problems - normally, Aide
269 access is given by another Aide, but since there aren't any on your system
270 yet, this isn't possible.
271     
272    
273  SPACE FOR ADDING YOUR OWN FEATURES (doors)
274  
275    *** PLEASE TAKE NOTE!! ***   This function really represents the "old"
276 way of doing things, and it doesn't fit in well with the client/server
277 paradigm.  Please consider it "deprecated" because it may be removed at any
278 time.
279  
280    The "doorway" feature is just a generic way to add features to the system.
281 I called it "Doorway" to make it resemble the doors on non-Unix boards, but as
282 we all know, us Unix types don't have to write special code to access the
283 modem. :-)  Anyway, when a user hits the <*> (doorway) command, Citadel does...
284  
285    USERNAME=<username>; export USERNAME
286    ./subsystem <user number> <screen width> <access level>
287  
288    ...so you can put whatever you want in there.  I suggest putting in a menu
289 program to allow the users to pick one of a number of programs, etc.
290  
291    Do be aware that chat and door programs will only be available when two
292 conditions are met:
293  
294     1. The client and server programs are running on the same computer
295     2. The user is running the text-based Unix client.
296  
297    Because of these restrictions, Door programs are being utilized less and
298 less every day.
299  
300
301   
302  SETTING UP CITADEL TO SEND AND RECEIVE INTERNET MAIL
303  
304  Mail programs are now elaborate enough that it is trivial to set up Citadel
305 to act as your system's local mail delivery agent.  It couples easily with
306 either sendmail or qmail, or with any other mail system that is capable of
307 invoking a separate program to deliver local mail.
308  
309  Unlike earlier versions of Citadel/UX, there is no longer a need to play
310 with rmail or to patch other pieces of your system's existing mailer.  Simply
311 make a few quick configurations, compile the Citadel/UX package "as is" and
312 you're ready to go.  Here's how to do it:
313  
314  1. First, open up the config file "internetmail.config" in the "network"
315 directory, and edit the definitions in it to your local configuration.  It's
316 very self-documented; just go through the file making any necessary changes.
317
318  2. Next, you must configure your system's main mail delivery agent to
319 use the "citmail" program to deliver mail to local addresses.  This will
320 change from mailer to mailer, of course.  I'm using sendmail, and although
321 I don't know enough about sendmail to provide really good instructions on
322 sendmail configuration, here's what worked for me:
323     
324   I added the following mailer definition:
325   
326  Mcitadel,  P=/appl/citadel/citmail, F=lsDFMoqeu9S, S=10/30, R=20/40,
327             D=$z:/, T=X-Unix, U=bbs,
328             A=/appl/citadel/citmail $u
329  
330   Then I replaced all instances of "#local" with "#citadel".  This seems to
331 work on my system; your mileage may vary.
332  
333  3. Some mailers will need to be killed and restarted for the changes to
334 take effect.  Once this is done, all of your BBS users now have an Internet
335 e-mail address.  They can use two forms of addresses:
336  
337   user_name@your.system.name
338   cit1234@your.system.name
339  
340  In the first form, the name portion of the user's Internet e-mail address
341 is the name they use on your Citadel system, with all spaces replaced by
342 underscores.  In the second form, the name is the letters "cit" followed
343 by the user's user number.  This is a nice shorthand that is sometimes
344 easier to use.  Note that the help file <.H>elp MAIL is set up to tell users
345 what their address is.
346  
347  NOTE: I cannot and will not answer e-mails regarding the configuration of
348 sendmail or any other mailer.  I am not a sendmail expert; what is written
349 above is everything I know about getting Citadel and sendmail to talk to each
350 other.  Please refer these questions to your local sendmail wizard. 
351  
352  
353  
354  THE PEANUT GALLERY
355   
356    That's just about all the information you need to install the system.
357  For more information, visit the Citadel/UX web site at UNCENSORED! BBS
358  http://uncnsrd.mt-kisco.ny.us
359  
360    Please note: if you intend to report a problem getting the Citadel server
361 to run, please first check the following:
362  
363  1. Did you do ./configure && make && make install  ??
364  2. Did you run setup?
365  3. Did you start the server?
366  
367    To report a problem, you can log on to UNCENSORED! or any other BBS on the
368 Citadel network which carries the Citadel/UX> room.  Please remember to mention
369 all of the following information:
370  
371  1. The exact nature of your difficulty
372  2. A transcript of the error message(s) if possible
373  3. The version of Citadel you are running
374  4. The version of GDBM present on your system
375  5. Which operating system you are running, and what version
376  6. If you are running a Linux system, we need to know which distribution, and
377 the version of the kernel, libc, and pthreads you are using (it would help to
378 post the output of a "ldd ./citserver" command).
379
380