not logged in | [Login]

Building on RHEL7 or Centos7

There are only a few requirements to building on RHEL, or CentoS

Hard dependencies

yum -y install libtalloc-devel

Getting the source

Do one of the following:

  • From the git repository (version 3.0.x)
git clone
cd freeradius-server
git checkout v3.0.x
  • From the git repository (version 3.0.18 - latest released version)
git clone
cd freeradius-server
git checkout release_3_0_18
  • From a zip file (version 3.0.x - most recent stable version, though unreleased)
cd freeradius-server-3.0.x/
  • From a zip file
cd freeradius-server-release_3_0_18/

Building from source

# Use ./configure --enable-developer if you're debugging issues, or using unstable code.
sudo make install

Building 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 restrictions).

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/ or redhat/ 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


%define _oracle_support 1

Upgrading GCC (>= v4.0.x and master branch only)

GCC upgrade only required for versions >= v4.0.x you can skip this step for v3.0.x and below.

RHE7 ships with GCC 4.8.5 but we require GCC >= 4.9.0 for FreeRADIUS >= v4.0.x.

Fortunately, the devtoolset-3 series of packages provides a later version of GCC.

Follow the instructions here to enable the devtoolset-3 repository.

To install:

yum -y install devtoolset-3-gcc devtoolset-3-gcc-c++

and then to get to a shell with the correct environment:

scl enable devtoolset-3 bash

Or can set CC=/opt/rh/devtoolset-3/root/usr/bin/gcc in your environment, which works just as well.

If you're building on older versions of RedHat then you'll need to compile GCC from source.


libkqueue required for >= v4.0.x, you can skip this step for v3.0.x and below.

Unfortunately neither RHEL nor Centos provide an RPM for libkqueue. The instructions below will produce a libkqueue RPM, which can then be installed for building from source, or distributed with the FreeRADIUS RPMs when building packages.

Building the libkqueue RPM will require these packages:

yum -y install wget automake autoconf libtool rpm-build

Latest version of libkqueue can be found here.

# Replace v2.1.0 with latest version
tar -xvzf v${VERSION}.tar.gz
cd ./libkqueue-${VERSION}
sed -ie "s/Version:.*/Version:    ${VERSION}/" ./libkqueue.spec
sed -ie "s/%{_mandir}\/man2\/kevent.2.*//" ./libkqueue.spec
sed -ie "s/^%{make_install}.*/%{make_install} \&\& rm -rf %{_libdir}\/*.a \&\& rm -rf %{_libdir}\/*.la/" ./libkqueue.spec
autoreconf -i
cd ..
tar -czf ./libkqueue-${VERSION}.tar.gz ./libkqueue-${VERSION}

# Only required if you don't already have a build environment setup
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp ./libkqueue-${VERSION}.tar.gz ~/rpmbuild/SOURCES/libkqueue-${VERSION}.tar.gz
rpmbuild -ba ./libkqueue-${VERSION}/libkqueue.spec