1. 配置数据库
sudo su postgres -c 'createuser radius --no-superuser --no-createdb --no-createrole -P'
sudo su postgres -c 'createdb radius --owner=radius'
create database with the following tables:
/etc/freeradius/sql/postgresql/schema.sql
/etc/freeradius/sql/postgresql/nas.sql
INSERT INTO radcheck VALUES (1, 'test','Cleartext-Password',':=','test');
INSERT INTO radcheck VALUES (2, 'test1','Cleartext-Password',':=','test1');
2. 配置freeradius
uncomment sql line in /etc/freeradius/sql.conf
change default database name to postgresql
uncomment sql line in radiusd.conf
3. 验证
radtest test test 127.0.0.1 0 testing123testing