This short tutorial will guide you how to Install FreeRadius + mysql support on Centos 6.2 x64. An ideal base to use with HostBill FreeRadius module
For other OS/versions/architectures installation process is very similar
Install packages
Login to your server/vps shell, execute following commands:
# yum install mysql-server.x86_64 freeradius.x86_64 freeradius-mysql.x86_64 freeradius-utils.x86_64 -y
This will install latest stable freeRADIUS server
Create Database
First you need to start mysql server, do so using:
# service mysqld start
Next, login into mysql as root using command:
# mysql
In mysql console create new database for freeradius
mysql> CREATE DATABASE freeradius;
You need to create new user for freeradius db.
mysql> GRANT ALL ON freeradius.* TO radius@localhost IDENTIFIED BY "FreeRadiusPassword";
Note: If your HostBill resides on different server you need to add remote access, do so using:
mysql> GRANT ALL ON freeradius.* TO radius@'HOSTBILL_IP' IDENTIFIED BY "FreeRadiusPassword";
Now its time to create required tables. Exit mysql console, and type in:
mysql freeradius < /etc/raddb/sql/mysql/schema.sql
Enabling sql support in FreeRADIUS
Edit file:
# vi /etc/raddb/sql.conf
Under #Connection info update your db details:
server = "localhost" login = "radius" password = "FreeRadiusPassword" radius_db = "freeradius"
Edit file:
# vi /etc/raddb/radiusd.conf
Uncomment this line:
$INCLUDE sql.conf
Edit file:
# vi /etc/raddb/sites-available/default
Uncomment this line:
sql
under sections:
authorize { accounting {
Ucomment sql line in /etc/raddb/sites-available/inner-tunnel under authorize {
Edit secret word
Go to file
# vi /etc/raddb/clients.conf
and edit secret to new value