7d5d54af85cb8f17d5e0eb13960d597f7e31100b
[citadel.git] / citadel / docs / binaries.txt
1
2 BUILDING THE CITADEL SYSTEM WITH PRIVATE LIBRARIES
3 --------------------------------------------------
4
5 This method is known to work on Linux and FreeBSD systems.  It is a way of
6 building the Citadel system with its own private copy of Berkeley DB.  This
7 avoids conflicts with any other version of these libraries which may already
8 exist on your host system.
9
10 You can perform your builds in any directory (such as /usr/src or even your
11 home directory).  The target directories will be:
12
13 * /usr/local/citadel           (Citadel server, text client, utilities)
14 * /usr/local/webcit            (the WebCit front end)
15 * /usr/local/ctdlsupport       (libdb, libcitadel, and their headers, etc.)
16
17 If you're running the containerized distribution of Citadel, or have done
18 the Easy Install script, your installation is based on this methodology.
19
20 1. Unpack the Berkeley DB tarball.  chdir to the "build_unix" directory
21    and build the package with these commands:
22  
23  ../dist/configure --prefix=/usr/local/ctdlsupport
24  make
25  make install
26
27 2. Unpack the libical tarball and build it with these commands:
28  
29  ./configure --prefix=/usr/local/ctdlsupport
30  make
31  make install
32  
33 3. Set these environment variables for the rest of the build.
34    (This assumes you're using the 'bash' shell.  Otherwise you're on your own.)
35  
36 export CFLAGS='-I/usr/local/ctdlsupport/include'
37 export CPPFLAGS='-I/usr/local/ctdlsupport/include'
38 export LDFLAGS='-L/usr/local/ctdlsupport/lib -Wl,--rpath -Wl,/usr/local/ctdlsupport/lib'
39  
40  -L tells the build system where to find libraries during the build process,
41 while -Wl,--rpath inserts that same library path into the Citadel binaries
42 so they know where to find the libs at runtime.  Since we can't depend on
43 the correct version of Berkeley DB already being on the system, this is how
44 we carry our own along.  It's better than static linking everything.
45
46 4. If LDAP support is required, unpack the OpenLDAP tarball and build with:
47
48 ./configure --prefix=/usr/local/ctdlsupport --with-db=/usr/local/ctdlsupport
49 make
50 make depend
51 make install
52
53 5. Now you're ready to build the Citadel server.  Unpack the Citadel tarball
54    and build it with these commands:
55
56 ./configure --prefix=/usr/local/citadel --with-db=/usr/local/ctdlsupport
57 make
58 make install
59  
60  ** NOTE: if you already have a Citadel server in /usr/local/citadel, change
61  the 'make install' to 'make upgrade'.  And I'm sure you remembered to shut
62  down your Citadel service and make a backup before starting, right?
63
64 6. Finally, unpack the WebCit tarball and build it with these commands:
65
66 ./configure --prefix=/usr/local/webcit
67 make
68 make install
69
70
71
72 All of your software is now in place.  Run /usr/local/citadel/setup to configure
73 the Citadel server, and /usr/local/webcit/setup to configure WebCit.  If you are
74 on a Linux machine, setup will tweak /etc/inittab to automatically start the
75 services.  If you are on a FreeBSD machine, you will need to manually configure
76 your startup scripts to start the services.