Re-arranged the documentation, to make it easier to follow for
[freeradius.git] / INSTALL
1 1. INSTALLATION
2
3   Ignore this file if you have a pre-installed binary package.
4
5
6 1a. SIMPLE INSTALLATION
7
8   If you do not need to modify the default configuration, then take
9 the following steps to build and install the server:
10
11
12         $ ./configure
13         $ make
14         $ make install
15
16
17 1b. CUSTOM INSTALLATION
18
19   FreeRADIUS has autoconf support. This means you have to run
20 ./configure, and then run make.  To see which configuration options
21 are supported, run './configure --help', and read it's output.  The
22 following list is a selection from the available flags:
23
24   --enable-shared[=PKGS]  build shared libraries [default=yes]
25   --enable-static[=PKGS]  build static libraries [default=yes]
26   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]
27   --with-logdir=DIR       Directory for logfiles [LOCALSTATEDIR/log] 
28   --with-radacctdir=PATH  Directory for detail files [LOGDIR/radacct] 
29   --with-raddbdir=DIR     Directory for config files [SYSCONFDIR/raddb] 
30   --with-threads          Use threads, if available.  (default=yes) 
31   --with-snmp             Compile in SNMP support. (default=yes)
32   --disable-ltdl-install  Do not install libltdl
33   --with-experimental-modules      Use experimental and unstable modules. (default=no) 
34   --enable-developer      Turns on super-duper-extra-compile-warnings
35                               when using gcc.
36
37   To get the defaults that Cistron Radius used up to 1.5.4.3-beta18, use:
38
39         ./configure --localstatedir=/var --sysconfdir=/etc
40
41   That means binaries will get installed in /usr/local/{bin,sbin},
42 manpages in /usr/local/man, configuration files in /etc/raddb, and
43 logfiles in /var/log and /var/log/radacct.
44
45   Now type "make". The binaries will be compiled.
46
47   Then do "make install". That will install the binaries, the 'man'
48 pages, and MAY install the configuration files.  If you have not
49 installed a RADIUS server before, then the configuration files for
50 FreeRADIUS will be installed.  If you already have a RADIUS server
51 installed, then FreeRADIUS WILL NOT over-write your current
52 configuration.  It will warn you about the files it could not install.
53
54   If you DO see a warning message about files that could not be
55 installed, then you should manually 'diff' the files.  There MAY be
56 changes in the dictionary files which are REQUIRED for a new version
57 of the software.  These files will NOT be installed over your current
58 configuration, so you MUST verify and install any problem files by
59 hand.
60
61   It is EXTREMELY helpful to read the output of both 'configure',
62 'make', and 'make install'.  If a particular module you expected to be
63 installed was NOT installed, then the output of the
64 'configure;make;make install' sequence will tell you why that module
65 was not installed.  Please do NOT post questions to the FreeRADIUS
66 users list without carefully reading the output of this process.
67
68
69 2. RUNNING THE SERVER
70
71   If the server builds and installs, but doesn't run correctly, then
72 you may use debugging mode to figure out the problem. 
73
74   This is your BEST HOPE for understanding the problem.  Read ALL of
75 the messages which are printed to the screen, the answer to your
76 problem will often be in a warning or error message.
77
78   We really can't emphasize that last sentence enough.  Configuring a
79 RADIUS server for complex local authentication isn't a trivial task.
80 Your ONLY method for debugging it is to read the debug messages, where
81 the server will tell you exactly what it's doing, and why.  You should
82 then compare its behaviour to what you intended, and edit the
83 configuration files as appropriate.
84
85   If you don't use debugging mode, then you will look dumb when you
86 ask questions on the 'freeradius-users' list, and the final answer
87 turns out to have been sitting in front of you all along.  Since the
88 main developers of FreeRADIUS use debugging mode to track down their
89 configuration problems with the server, it's probably a good idea for
90 you to use it, too.
91
92   To start the server in debugging mode, do:
93
94         $ radiusd -X
95
96   You should see a lot of text printed on the screen as it starts up.
97 If you don't, or if you see error messages, please read the FAQ:
98
99         http://www.freeradius.org/faq/
100
101   If the server says "Ready to process requests.", then it is running
102 properly.  From another shell (or another window), type:
103
104         $ radtest test test localhost 0 testing123
105
106   You should see the server print out more messages as it receives the
107 request, and responds to it.  The 'radtest' program should receive the
108 response within a few seconds.  It doesn't matter if the
109 authentication request is accepted or rejected, what matters is that
110 the server received the request, and responded to it.
111
112   You can now edit the 'radiusd.conf' file for your local system.
113 Please read the ENTIRE file carefully, as many configuration options
114 are only documented in comments in the file.
115
116   Configuring and running the server MAY be complicated.  Please read
117 the documentation in the doc/ directory for further information.  If
118 you have any issues, the FAQ is also a good place to check.