Skip to content
Menu
vernon.wenberg.net
vernon.wenberg.net
May 28, 2021February 21, 2022

Install Apache, FreeRadius, daloRADIUS, and MariaDB on Ubuntu 20.04

This quick guide assumes you are root or using sudo on a fresh install of Ubuntu Server 20.04.

Install apache2, MariaDB, and PHP

Install Apache

apt install apache2

Install PHP

sudo apt install php libapache2-mod-php php-{gd,common,mail,mailmime,mysql,pear,db,mbstring,xml,curl}

Install MariaDB

apt install mariadb-server mysql_secure_installation

Install FreeRADIUS w/ MariaDB

Install FreeRADIUS

apt install freeradius freeradius-mysql freeradius-utils systemctl enable
–now freeradius

Use MariaDB with FreeRADIUS

Login to MariaDB with the password you just created. Remember to replace password with
your own password.

mysql -u root -p

Create database and database user.

MariaDB [(none)]> CREATE DATABASE radius; 
MariaDB [(none)]> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY “password”; 
MariaDB [(none)]>FLUSH PRIVILEGES; 
MariaDB [(none)]> quit

Import FreeRADIUS schema into MariaDB.

mysql -u root -p radius < /etc/freeradius/3.0/modsconfig/sql/main/mysql/schema.sql

Link to the SQL module.

ln -s /etc/freeradius/3.0/mods-available/sql /etc/freeradius/3.0/modsenabled/

Edit the FreeRADIUS config file at /etc/freeradius/3.0/mods-enabled/sql

  • Change dialect = “sqlite” to dialect = “mysql”.
  • Comment out driver = “rlm_sql_null” and uncomment driver = “rlm_sql_${dialect}”
  • Comment out the entire tls section. We will not be using TLS here.
  • Uncomment the Connection info: section and fill out the database details using the values you created previously.
    connection info
  • Uncomment read_clients = yes.

Fix file ownership.

chgrp -h freerad /etc/freeradius/3.0/mods-available/sql chown -R
freerad:freerad /etc/freeradius/3.0/mods-enabled/sql

Restart FreeRADIUS.

systemctl restart freeradius.service

*this is unfinished*

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to print (Opens in new window) Print
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Like this:

Like Loading...

Related

Disclaimer

These posts are notes for me. These are not guides and you should not use these instructions as step-by-step instructions without knowing what they do.

Recent Posts

  • Docker Reference
  • Useful Commands for Windows Subsystem for Linux
  • FortiManager Local-In Policy
  • Mount Google Drive in Linux using rclone
  • Restore original Explorer context menus in Windows 11

Mastodon

  1. Loading Mastodon feed...

©2025 vernon.wenberg.net | Powered by WordPress and Superb Themes!
%d