Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:install_apache_freeradius_daloradius_and_mariadb_on_ubuntu_20.04 [2021/06/22 11:44]
vern created
linux:install_apache_freeradius_daloradius_and_mariadb_on_ubuntu_20.04 [2021/07/05 17:11] (current)
vern
Line 1: Line 1:
-=====Install Apache, FreeRadius, daloRADIUS, and MariaDB on Ubuntu 20.04====+===== 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. 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 apache2, MariaDB, and PHP ====
  
 **Install Apache** **Install Apache**
  
-<code>apt install apache2</code>+ ''apt install apache2 ''
  
 **Install PHP** **Install PHP**
-<code>sudo apt install php libapache2-mod-php php-{gd,common,mail,mail-mime,mysql,pear,db,mbstring,xml,curl}</code>+ 
 + ''sudo apt install php libapache2-mod-php php-{gd,common,mail,mail-mime,mysql,pear,db,mbstring,xml,curl} ''
  
 **Install MariaDB** **Install MariaDB**
-<code> 
-apt install mariadb-server 
-mysql_secure_installation 
-</code> 
  
-====Install FreeRADIUS w/ MariaDB====+ '' apt install mariadb-server mysql_secure_installation '' 
 +==== Install FreeRADIUS w/ MariaDB ====
  
 **Install FreeRADIUS** **Install FreeRADIUS**
-<code> 
-apt install freeradius freeradius-mysql freeradius-utils 
-systemctl enable --now freeradius 
-</code> 
  
-====Use MariaDB with 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. **Login to MariaDB with the password you just created** (Remember to replace password with your own password.
  
-<code>mysql -u root -p</code>+ ''mysql -u root -p ''
  
 **Create database and database user** **Create database and database user**
  
-<code> + '' MariaDB [(none)]> CREATE DATABASE radius; MariaDB [(none)]> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "password"; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> quit ''
-MariaDB [(none)]> CREATE DATABASE radius; +
-MariaDB [(none)]> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "password"; +
-MariaDB [(none)]> FLUSH PRIVILEGES; +
-MariaDB [(none)]> quit +
-</code>+
  
 **Import FreeRADIUS schema into MariaDB** **Import FreeRADIUS schema into MariaDB**
  
-<code>mysql -u root -p radius < /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql</code>+ ''mysql -u root -p radius < /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql''
  
 **Link to the SQL module** **Link to the SQL module**
  
-<code>ln -s /etc/freeradius/3.0/mods-available/sql /etc/freeradius/3.0/mods-enabled/</code>+ ''ln -s /etc/freeradius/3.0/mods-available/sql /etc/freeradius/3.0/mods-enabled/ ''
  
-**Edit the FreeRADIUS config file at ''/etc/freeradius/3.0/mods-enabled/sql''**+**Edit the FreeRADIUS config file at ''/etc/freeradius/3.0/mods-enabled/sql'' **
  
-  * Change ''dialect = "sqlite"'' to ''dialect = "mysql"''+   * Change ''dialect = "sqlite"''  to ''dialect = "mysql"''
-  * Comment out ''driver = "rlm_sql_null"'' and uncomment ''driver = "rlm_sql_${dialect}"''+  * 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.   * 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.\\ {{:linux:screenshot_2021-06-22_113505.png?direct|}}+  * Uncomment the ''Connection info:''  section and fill out the database details using the values you created previously. \\ {{:linux:screenshot_2021-06-22_113505.png?direct&}}
   * Uncomment ''read_clients = yes''.   * Uncomment ''read_clients = yes''.
  
 **Fix file ownership** **Fix file ownership**
  
-<code> +'' chgrp -h freerad /etc/freeradius/3.0/mods-available/sql chown -R freerad:freerad /etc/freeradius/3.0/mods-enabled/sql ''
-chgrp -h freerad /etc/freeradius/3.0/mods-available/sql +
-chown -R freerad:freerad /etc/freeradius/3.0/mods-enabled/sql +
-</code>+
  
 **Restart FreeRADIUS** **Restart FreeRADIUS**
  
-<code> +'' systemctl restart freeradius.service ''
-systemctl restart freeradius.service +
-</code>+
  
 *this is unfinished* *this is unfinished*
 +
 +