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