Installing and Configuring Radius Server

Installing Freeradius Server
Download the latest version of freeradius 2x from fedora repository using the command below.

yum -y install freeradius freeradius-mysql freeradius-utils

Enable MySQL support for Freeradius
Enable sql and sql counter module in the Freeradius main configuration file.

vi /etc/raddab/radiusd.conf

Please see the changes highlighted in bold

# Include another file that has the SQL-related configuration.
# This is another file only because it tends to be big.
#
$INCLUDE sql.conf

#
# This module is an SQL enabled version of the counter module.
#
# Rather than maintaining seperate (GDBM) databases of
# accounting info for each counter, this module uses the data
# stored in the raddacct table by the sql modules. This
# module NEVER does any database INSERTs or UPDATEs. It is
# totally dependent on the SQL module to process Accounting
# packets.
#
$INCLUDE sql/mysql/counter.conf

Edit /etc/raddab/sql.conf and enter your MySQL username and password

login = "root"
password = "your_password"

Edit the file /etc/raddab/sites-enabled/default and enable sql module by uncommenting the line below in the authorize, accounting and post-auth section of this file.
authorize section:

authorize {
...some entries here...
sql
}

accounting section:

accounting {
...some entries here...
sql
}

session section:

session {
...some entries here...
sql
}

post-auth section:

post-auth {
...some entries here...
sql
}

Enable sql counter module by placing the below lines inside the authorize section.

authorize {
...some entries here...
monthlycounter
dailycounter
noresetcounter
}

Importing Freeradius MySQL database schema
Login to MySQL and create freeradius database

mysql -u root -p
create database radius;

Import Freeradius schema

cd /etc/raddb/sql/mysql
mysql -u root -p radius < schema.sql

Add a NAS

client 192.168.1.1 {
secret = your_radius_secret
shortname = nas1
}