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