2 Citadel/UX Installation Procedure
3 See copyright.txt for copyright information
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 an ordinary Linux system. The current distribution includes:
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)
19 - A set of utilities for system administration and maintenance
22 Some knowledge of the Unix system is necessary to install and manage the
23 system. It is mandatory that the sysop have "root" access to the operating
24 system. The following are required to install Citadel/UX:
26 - A Unix operating system (Linux, BSD, Solaris, Tru64, HP/UX)
27 - C compiler (such as gcc or egcs) and "make"
28 - POSIX threads (the "pthreads" library)
30 - Berkeley DB v3.1 or newer, or GDBM 1.8 or newer
31 - Enough disk space to hold all of the programs and data
33 If you are running Citadel/UX on a Linux system, it is STRONGLY recommended
34 that you run it on a recent distribution (such as Red Hat 7.0 or newer). A
35 new-ish distribution will have most or all of the prerequisite tools and
36 libraries already integrated for you.
41 - "WebCit", a gateway program to allow full access to Citadel/UX BBS's
42 via the World Wide Web. Interactive access through any Web browser.
46 - Newer and better GUI based clients.
50 EVERYTHING IN ITS PLACE...
52 Hopefully you've unpacked the distribution archive into its own directory.
53 This is the directory in which all Citadel files are located and in which all
54 BBS activity will take place. Several subdirectories have already been created
55 during the unpacking process, and others may be created by the software if
58 Make sure you have either Berkeley DB, or GDBM installed on your system, and
59 that you have all the development libraries and headers in place so that you
60 can compile against them. If you don't, you can get the latest Berkeley DB
61 at http://www.sleepycat.com *or* you can get GDBM from http://www.gnu.org or
62 one of its mirrors. We strongly recommend Berkeley DB for all but the lightest
63 of installations, as it is far more robust and reliable.
65 If your operating system uses a separate library to support POSIX threads
66 (pthreads), make sure that library is installed as well.
71 There will be one account in /etc/passwd which all BBS users will use to
72 login to the system. This account is typically called "bbs" or "citadel" or
73 something to that effect. You will tell Citadel what the user-id of that
74 account is, and when someone logs in under that account, Citadel will prompt
77 The BBS login should have a unique uid. The home directory should be the
78 one your BBS resides in (in this example we will use /usr/citadel) and the
79 shell should be either "citadel" in that directory, or a script that will start
80 up citadel (you may wish to set up an external text editor; see below).
83 bbs::100:1:BBS Login:/usr/citadel:/usr/citadel/citadel
85 When you run setup later, you will be required to tell it what the BBS
86 login's numeric user ID is, so it knows what user to run as. If you create
87 an account called bbs, guest, or citadel, the setup program will automatically
88 pick up the user ID by default.
90 For all other users in /etc/passwd, Citadel will automatically set up an
91 account using the "full name" field. No password is required, since it
92 assumes that if a user is logged in, he/she has already entered a password.
93 Note that this does have to be enabled at compile time (see ENABLE_AUTOLOGIN
94 in the Makefile). If such an account needs to be accessed remotely (such as
95 from client software), these users can use *either* their Citadel login name
96 or their login name on the host computer, and their password on the host
100 BYPASSING THE login: PROMPT
102 If you normally log in to your host system using some method other than
103 telnet (such as ssh), you might want the telnet service to go straight to
104 the Citadel BBS, instead of displaying the "login:" prompt first. You can
105 do this using the "loginwrapper.sh" wrapper program.
107 telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd -L /usr/local/citadel/loginwrapper.sh
109 Please make sure you know what you're doing before you install this!
113 COMPILING THE PROGRAMS
116 You can easily compile Citadel with the following commands:
122 The 'configure' script will generate a Makefile from the Makefile.in, and
123 it will also write the file "sysdep.h" to your Citadel directory. Please do
124 not edit sysdep.h or Makefile.in yourself. The configure script will figure
125 out your system dependencies and set everything correctly.
127 By default, the Citadel system will install in /usr/local/citadel. If you
128 wish to place it in a different directory, you can instead do:
130 ./configure --prefix=/usr/local/citadel (or whatever)
132 If you've got Berkeley DB installed in a non-standard location, you can
133 help the configure script find it by doing something like this:
135 ./configure --with-db=/usr/local/BerkeleyDB-3.1
137 The configure script prefers Berkeley DB if it is available, but will fall
138 back to GDBM if it has to.
140 File permissions are always a bother to work with. You don't want the
141 board to crash because someone couldn't access a file, but you also don't
142 want shell users peeking into the binaries to do things like reading others'
143 mail, finding private rooms, etc. The Citadel server needs to be started
144 as root in order to bind to a privileged port, but as soon as its
145 initialization is finished, it changes its user ID to your BBS user ID in
146 order to avoid security holes.
151 Upgrading to a new version uses the same build procedure as compiling the
152 program for a fresh install, except that you want to do "make install-exec"
153 instead of "make install". This will overwrite the programs but not your
154 data. Be sure to shut down citserver during this process!
159 This is a change from the way things were done before. All client-side setup
160 is in a "citadel.rc" file. The standard client looks for this file in:
162 2. /usr/local/lib/citadel.rc
163 3. <compiled BBSDIR>/citadel.rc
165 The next couple of sections deal with client-side configuration.
167 USING AN EXTERNAL EDITOR FOR MESSAGES
169 Citadel/UX has a built-in message editor. However, you can also use your
170 favorite text editor to write messages. To do this you simply put a line in
171 your citadel.rc file like:
175 ...would make Citadel call the vi editor when using the .<E>nter <E>ditor
176 command. You can also make it the default editor for the <E>nter command by
177 editing the citadel.rc file. (WARNING: external editors on public systems
178 can create a security hole. Make sure there is absolutely no way for users
179 to drop into the shell from the editor, or save files other than the temp file
182 Using this mechanism, shell users can pick their favorite editor for Citadel.
183 BBS users can use external editors too; just have the bbs login call a script
184 that sets the variables and then calls citadel. I used to recommend using
185 an external editor as the default, but the built-in editor is now a bit more
186 robust, so the use of an external editor is definitely optional. By the
187 way, be VERY careful what editor you choose and how you set up its options.
188 Giving the general public to an editor like vi or emacs can open up lots of
194 Citadel/UX can send messages to a printer, or just about anywhere else in
195 your system. The variable PRINTCMD in citadel.rc specifies what command you
196 use to print. Text is sent to the standard input (stdin) of the print command.
200 printcmd="nl|pr|lpr -dlocal"
202 ...that would add line numbers, then paginate, then print on the printer
203 named "local". There's tons of stuff you can do with this feature. For
204 example, you could use a command like "cat >>$HOME/archive" to save copies
205 of important messages in a textfile.
210 urlcmd=netscape -remote "openURL(%s)"
212 ...that would mean that typing 'u' in a room prompt after seeing a url in
213 one of the room's messages netscape will open up for you and run that url.
217 Before logging in for the first time, you must run the setup program. Type
218 "./setup" to begin this procedure.
220 The setup program will ask you what directory to place your data files in.
221 You can use this functionality to keep your programs and data in different
222 directories, or to run more than one BBS on the same computer. If you don't
223 use the default directory (the one specified in the Makefile), remember to
224 specify the directory name again when you start up the server later on.
226 If you've used older versions of Citadel/UX before, you'll notice that the
227 setup program does much less than it did before. It won't create any empty
228 data files; that's now done automatically by the server the first time it
229 starts. It also asks only a few questions; that's because the rest of the
230 global configuration is now done from within Citadel.
233 PREPARING TO START THE SERVER
235 The files /etc/services and /etc/inittab must be modified in order to run
236 the Citadel server. The setup program will perform the correct modifications
237 for you if you allow it to. If you'd prefer to do it manually, or if you're
238 interested in what these modifications are, then read on...
240 Before you can use Citadel, you must define the "citadel" service to your
241 system. This is accomplished by adding a line to your /etc/services file that
242 looks something like this:
244 citadel 504/tcp # Citadel/UX Server
246 504 is the port number officially designated by the IANA for use by Citadel.
247 There should not be any need to use a different port number, unless you are
248 running multiple BBS's on the same computer and therefore need a different
251 The next step is to arrange for the server to start. The "citserver"
252 program is the main Citadel server. Before we cover the recommended method of
253 starting the server, let's examine its usage options:
255 citserver [-hHomeDir] [-xDebugLevel] [-tTraceFile] [-d] [-f]
257 The options are as follows:
259 -hHomeDir - the directory your BBS data files live in. This should, of
260 course, be a directory that you've run the "setup" program against to set up
261 some data files. If a directory is not specified, the directory name which
262 was specified in the Makefile will be used.
264 -xDebugLevel - Set the verbosity of trace messages printed. The available
265 debugging levels are:
266 1 - Internal errors (failed thread creation, malloc problems, etc.)
267 2 - Network errors (broken sockets, failed socket creation)
268 3 - Begin and end of sessions, startup/shutdown of server
269 5 - Server commands being sent from clients
270 7 - Entry and exit of various functions
271 8 - Entry and exit of critical sections
272 9 - Various debugging checkpoints (insanely verbose)
274 -tTraceFile - Tell the server where to send its debug/trace output.
275 Normally it is sent to stdout.
277 -d - Run as a daemon. This switch would be necessary if you were
278 starting the Citadel server, for example, from an rc.local script (which is
279 not recommended, because this won't allow the server to automatically restart
280 when it is shut down).
282 -f - Defragment all the databases upon startup. This isn't
283 normally necessary due to the nature of the data stored in Citadel, but the
284 option is provided in case you need it. (Note that this only applies to
285 GDBM installations; if you are using Berkeley DB it has no effect.)
288 The preferred method of starting the Citadel server is to place an entry in
289 your /etc/inittab file. This will conveniently bring the server up when your
290 system is up, and terminate it gracefully when your system is shutting down.
291 The exact syntax for your system may vary, but here's the entry that I use on
294 cit:2345:respawn:/appl/citadel/citserver -h/appl/citadel -t/dev/tty6 -x3
296 What I've done here is to set debugging level 3, and have the trace stuff
297 output to one of my virtual consoles. It's important to remember to turn off
298 any getty that is set up on that virtual console, if you do this. After
299 making this change, the command "init q" works on most systems to tell init
300 to re-read the file. If in doubt, just reboot your computer.
303 LOGGING IN FOR THE FIRST TIME
305 At this point, your system is ready to run. Run the citadel program from
306 the shell and it will automatically create your account. NOTE: the first
307 user account to be created will automatically be set to access level 6
308 (Aide). This overcomes some obvious logistical problems - normally, Aide
309 access is given by another Aide, but since there aren't any on your system
310 yet, this isn't possible.
313 SPACE FOR ADDING YOUR OWN FEATURES (doors)
315 *** PLEASE TAKE NOTE!! *** This function really represents the "old"
316 way of doing things, and it doesn't fit in well with the client/server
317 paradigm. Please consider it "deprecated" because it may be removed someday.
319 The "doorway" feature is just a generic way to add features to the system.
320 I called it "Doorway" to make it resemble the doors on non-Unix boards, but as
321 we all know, us Unix types don't have to write special code to access the
322 modem. :-) Anyway, when a user hits the <*> (doorway) command, Citadel does...
324 USERNAME=<username>; export USERNAME
325 ./subsystem <user number> <screen width> <access level>
327 ...so you can put whatever you want in there. I suggest putting in a menu
328 program to allow the users to pick one of a number of programs, etc.
330 Do be aware that chat and door programs will only be available when two
333 1. The client and server programs are running on the same computer
334 2. The user is running the text-based Unix client.
336 Because of these restrictions, Door programs are being utilized less and
342 TROUBLESHOOTING AND GETTING HELP
344 That's just about all the information you need to install the system.
345 For more information, visit the Citadel/UX web site at UNCENSORED! BBS,
346 http://uncensored.citadel.org
348 Please note: if you intend to report a problem getting the Citadel server
349 to run, please first check the following:
351 1. Did you do ./configure && make && make install ??
352 2. Did you run setup?
353 3. Did you start the server?
355 To report a problem, you can log on to UNCENSORED! or any other BBS on the
356 Citadel network which carries the Citadel/UX> room. Please DO NOT e-mail the
357 developers directly. Post a request for help on the BBS, with all of the
358 following information:
360 1. The exact nature of your difficulty
361 2. A transcript of the error message(s) if possible
362 3. The version of Citadel you are running
363 4. The version of Berkeley DB or GDBM present on your system
364 5. Which operating system you are running, and what version
365 6. If you are running a Linux system, we need to know which distribution, and
366 the version of the kernel, libc, and pthreads you are using (it would help to
367 post the output of a "ldd ./citserver" command).