FreeRADIUS WikiMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy

Build

From FreeRADIUS Wiki

Contents

Building FreeRADIUS

Supported Platforms

FreeRADIUS is known to run on a large number of 32 and 64bit platforms, however building on some of them may require following special procedures here

Building from Source

If your operating system has support for a package manager such as .deb or .rpm file format, we recommend that you follow the instructions in the next section instead.

bash$ tar zxvf freeradius-[version].tar.gz	 
bash$ ./configure	 
bash$ make	 
bash$ su - root	 
bash# make install	 

Don't forget to read supplied documentation first, including the configuration files. As with many free software projects, FreeRADIUS could use more documentation. Until such documentation is available, the only place that configuration items are documented is in the configuration files themselves.

If you have problems when trying to run FreeRADIUS, and you see error messages like:

rlm_sql: Could not link driver rlm_sql_mysql: file not found	 

Then the shared libraries on your system are misconfigured.

Building on MAC OSX

Note: These instructions are for FreeRADIUS 1.1.3

 # ./configure --enable-developer
 # make
 # sudo make install

and freeradius runs and responds to radtest.

another way would be "./configure", then remove the option "-s" in the line "INSTALLSTRIP = -s", then "make", "sudo make install", dont now about additional differences to "--enable-developer" (except from warning flags).

but i should point out that i do not use any sql-module (do not have the libraries installed which were required) or unixodbc, and have no libgdbm, so there is no rlm_counter, rlm_ippool. maybe there is your problem? i am using a recent mac os 10.4.7 on an "ancient" g4 powerbook.

Building on Solaris 10

Method 1

I am quite pleased to report I have, with minimal discomfort, version 1.1.3 running on Solaris 10 (sparc). These instructions should also work on Solaris 10 (x86_64) with minimal changes.

The source actually compiles perfectly once OS dependencies etc. are met. I will share a few tips here for any who may be attempting the same. My main goal was LDAP functionality. Other bells and whistles might require additional steps.


Solaris System Headers

Solaris 10 will likely require you to fix the system headers.

http://sunfreeware.com/indexsparc10.html

Do the following as root:

cd /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools/
vi mkheaders.conf

Then put the line "SHELL=/bin/sh" on the first line of the mkheaders.conf file. It should look something like the following:

SHELL=/bin/sh
SYSTEM_HEADER_DIR="/usr/include"
OTHER_FIXINCLUDES_DIRS=""
FIXPROTO_DEFINES=""
STMP_FIXPROTO="stmp-fixproto"
STMP_FIXINC="stmp-fixinc"

Then you run the following command as root. It may take several minutes to rebuild the headers.

./mkheaders
Solaris Packages

Solaris 10 has versions of openssl and openLDAP installed I believe with the system however they do not fullfill the compile requirements for freeradius functionality. You should go to http://sunfreeware.com/ and get the packages there, and also resolve any unmet dependencies.

If you have other modules you are concerned with that are not building correctly, don't trust the OS packages. Look for equiv packages and try the build with them installed as well.

download package
gunzip packagename.gz
sudo pkgadd -d packagename
Installing FreeRadius

Installing actually went off without a hitch. ./configure, make, sudo make install

No problems except I needed the packages so rlm_ldap would compile properly.

Runtime Environment

In order for the ldap queries to work, the following needs to be set as an environmental variable, OR if you're handy with compiler flags you can take care of it during the compile with the `-RLIBDIR' linker flag.

export LD_LIBRARY_PATH="/usr/local/lib/;/usr/local/freeradius-1.1.3/lib"

The two locations in the above path are for access to the libgcc_s.so.1 libraries and the rlm_ldap libraries respectively.

Method 2

Notes for building on Solaris. (SPARC or x86 shouldn't matter)

Specific info for this method.
Building

From the above the next few lines can be used to build freeradius on solaris. (realistically I use this approach to build any software.)

# export PATH=/usr/sbin:/usr/bin:/opt/csw/bin:/opt/csw/gcc3/bin:/usr/ccs/bin:/opt/SUNWspro/bin
# export CFLAGS='-I/usr/local/openldap/include/ -I/usr/local/mysql/include/mysql/ -I/opt/csw/include/'
# export LDFLAGS='-L/usr/local/openldap/lib/ -R/usr/local/openldap/lib -L/usr/local/mysql/lib -R/usr/local/mysql/lib -L/opt/csw/lib -R/opt/csw/lib'
# export LD_OPTIONS='-L/usr/local/openldap/lib/ -R/usr/local/openldap/lib -L/usr/local/mysql/lib -R/usr/local/mysql/lib -L/opt/csw/lib -R/opt/csw/lib'
# ./configure --prefix=/usr/local/freeradius-1.1.2-mysql-ldap --with-ldap --with-mysql-dir=/usr/local/mysql-5.0.21
# gmake
# gmake install
Running

Building Packages

If your operating system has a packaging system (dpkg, rpm, tgz), its usually better to build and install a new package instead of directly installing from source.

Note: Prebuilt binary packages are available for a number of Operating Systems.

Building Debian packages

If you're using Debian GNU/Linux, it's best to build FreeRADIUS packages using dpkg-buildpackage (Installing directly from source confuses dpkg about the files installed on the system and it's not possible to uninstall the files later)

$ tar zxf freeradius-server-2.X.Y.tar.gz
$ cd freeradius-server-2.X.Y
$ fakeroot dpkg-buildpackage -b -uc	 
$ sudo dpkg -i ../freeradius_2.X.Y-0_i386.deb

Notes:

- If you don't have dpkg-buildpackage do the following :

# apt-get install dpkg-dev

- If you build the package as root (not recommended) you won't need fakeroot and sudo.

- The default Debian / Ubuntu build rules include OpenSSL support. For license reasons, the official Debian / Ubuntu FreeRADIUS packages do not include OpenSSL support. You can install the needed OpenSSL libraries by doing:

# apt-get install libssl-dev

Building Ubuntu packages

Please see the Debian section immediately above

Building RedHat packages

Please refer to the information on the Red Hat specific page Red Hat FAQ.

Building SUSE packages

On SUSE Linux it should be a simple matter of taking the latest FreeRADIUS release tarball and dropping it in /usr/src/packages/SOURCES along with the other files from the suse/ directory inside the tarball with the exception of freeradius.spec which goes in /usr/src/packages/SPECS

Then simply run:

rpmbuild -ba /usr/src/packages/SPECS/freeradius.spec

rpmbuild will tell you if you are missing any build dependencies. If so, simply install them with yast2 -i packagename-devel then rerun rpmbuild

Building SUSE packages with Oracle Support

If you wish to use Oracle you will need to recompile FreeRADIUS on a machine that has Oracle development libraries installed. FreeRADIUS is known to work both with a full Oracle installation as well as with the Oracle Instant Client SDK. Once built the resulting RPM package can be deployed with just the Oracle Instant Client (No need for the SDK on production machines)

Most rpm packages available do not included oraclesql.conf due to the fact that they also don't contain the Oracle driver module (due to copyright reasons)

On SUSE Linux if you have the Oracle header files in a sane location it should be a simple matter of taking the latest FreeRADIUS release tarball and dropping it in /usr/src/packages/SOURCES along with the other files from the suse/ directory inside the tarball with the exception of freeradius.spec which goes in /usr/src/packages/SPECS

Then edit /usr/src/packages/SPECS/freeradius.spec and change

%define _oracle_support 0

to

%define _oracle_support 1

Then simply run:

rpmbuild -ba /usr/src/packages/SPECS/freeradius.spec

See Also

Retrieved from "http://wiki.freeradius.org/Build"

This page has been accessed 90,894 times. This page was last modified on 11 March 2009, at 07:36.


Find

Browse
Main Page
Community portal
Current events
Recent changes
Random page
Help
Edit
View source
Editing help
This page
Discuss this page
New section
Printable version
Context
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list
Statistics
More…