Debian’s FreeRADIUS packages are a little out of date, but thankfully it’s easy building packages from source. Instructions below tested on Debian Squeeze, but should also apply to Lenny (you should upgrade), or Ubuntu and other Debian-derivatives.

You’ll need git and the Debian development packages installed:

user@fr:~$ sudo apt-get install git-core dpkg-dev

Get a copy of the FreeRADIUS repository:

user@fr:~$ git clone git://github.com/FreeRADIUS/freeradius-server.git
Cloning into freeradius-server...
Receiving objects: 100% (78345/78345), 15.52 MiB | 671 KiB/s, done.
Resolving deltas: 100% (61479/61479), done.

Now you can pick which version you want to build. This example is for version 2.1.12, the current latest stable version. Use git tag to see the versions available, or git branch -r to see the development branches. For the latest version 2 branch, you’d do git checkout origin/v2.1.x instead.

user@fr:~$ cd freeradius-server/
user@fr:~/freeradius-server$ git checkout release_2_1_12
Note: checking out 'release_2_1_12'.
...
HEAD is now at 70c2285... Last set of changes

We need to install any packages that the build process depends on. First get a list of the packages, then install them:

user@fr:~/freeradius-server$ dpkg-checkbuilddeps
dpkg-checkbuilddeps: Unmet build dependencies: debhelper (>= 6.0.7) quilt
autotools-dev libtool libltdl3-dev libssl-dev libpam0g-dev libmysqlclient-dev
libgdbm-dev libldap2-dev libsasl2-dev libiodbc2-dev libkrb5-dev libperl-dev
libpcap-dev python-dev libsnmp-dev libpq-dev

user@fr:~/freeradius-server$ sudo apt-get install debhelper quilt
autotools-dev libtool libltdl3-dev libssl-dev libpam0g-dev libmysqlclient-dev
libgdbm-dev libldap2-dev libsasl2-dev libiodbc2-dev libkrb5-dev libperl-dev
libpcap-dev python-dev libsnmp-dev libpq-dev

Now, build the packages. This doesn’t take that long on a recent machine.

user@fr:~/freeradius-server$ dpkg-buildpackage -us -uc -rfakeroot
...
dpkg-buildpackage: full upload; Debian-native package (full source is included)

You’re done – packages are now available, ready to install with dpkg -i.

user@fr:~/freeradius-server$ cd ..

user@fr:~$ ls -l *deb
-rw-r--r-- 1 root root  269510 Jan 23 16:24 freeradius-common_2.1.12+git_all.deb
-rw-r--r-- 1 root root 1162088 Jan 23 16:23 freeradius-dbg_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root  134858 Jan 23 16:24 freeradius-dialupadmin_2.1.12+git_all.deb
-rw-r--r-- 1 root root   34936 Jan 23 16:23 freeradius-iodbc_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root   35756 Jan 23 16:23 freeradius-krb5_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root   54024 Jan 23 16:23 freeradius-ldap_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root   43252 Jan 23 16:23 freeradius-mysql_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root   53966 Jan 23 16:23 freeradius-postgresql_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root   99578 Jan 23 16:23 freeradius-utils_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root 1486262 Jan 23 16:23 freeradius_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root  156212 Jan 23 16:23 libfreeradius-dev_2.1.12+git_amd64.deb
-rw-r--r-- 1 root root  116128 Jan 23 16:23 libfreeradius2_2.1.12+git_amd64.deb

(21 Aug 2013: edited with new github location)
(24 Apr 2014: corrected dpkg-buildpackage command)

2 Thoughts on “Compiling FreeRADIUS from git on Debian”

Leave a Reply to mcnewton Cancel reply

Your email address will not be published. Required fields are marked *