1.modify sql.conf
#vi /etc/raddb/sql.conf
1.1 add sql scetion example use 2 MySQL Database
sql my_database_1 {database = "mysql"driver = "rlm_sql_${database}"server = "192.168.1.2"#port = 3306login = "root"password = "123456"radius_db = "rlm_radius"acct_table1 = "radacct"acct_table2 = "radacct"postauth_table = "radpostauth"authcheck_table = "radcheck"authreply_table = "radreply"groupcheck_table = "radgroupcheck"groupreply_table = "radgroupreply"usergroup_table = "radusergroup"deletestalesessions = yessqltrace = nosqltracefile = ${logdir}/sqltrace.sqlnum_sql_socks = 5connect_failure_retry_delay = 60lifetime = 0max_queries = 0#readclients = yesnas_table = "nas"$INCLUDE sql/${database}/dialup.conf}sql my_database_2 {database = "mysql"driver = "rlm_sql_${database}"server = "192.168.1.3"#port = 3306login = "root"password = "123456"radius_db = "rlm_radius"acct_table1 = "radacct"acct_table2 = "radacct"postauth_table = "radpostauth"authcheck_table = "radcheck"authreply_table = "radreply"groupcheck_table = "radgroupcheck"groupreply_table = "radgroupreply"usergroup_table = "radusergroup"deletestalesessions = yessqltrace = nosqltracefile = ${logdir}/sqltrace.sqlnum_sql_socks = 5connect_failure_retry_delay = 60lifetime = 0max_queries = 0#readclients = yesnas_table = "nas"$INCLUDE sql/${database}/dialup.conf}
2.modify sites-available/default
#vi /etc/raddb/sites-available/default
2.1 find all "sql" in all section for example
authorize {.......
sql
........
}
2.2 replace all "sql" with sql scetion name in sql.conf (step 1.1) for example
my_database_1authorize {.......
#sql
my_database_2
........
}
2.3 save and restart radius service
#service radiusd restart
0 ความคิดเห็น:
แสดงความคิดเห็น