RADIUS是Remote Access Dial In User Service的简称。

RADIUS主要用来提供认证(Authentication)机制,用来辨认使用者的身份与密码 –> 确认通过之后,经由授权 (Authorization)使用者登入网域使用相关资源 –> 并可提供计费(Accounting)机制,保存使用者的网络使用记录。

FreeRADIUS是一款OpenSource软件,基于RADIUS协议,实现RADIUS AAA(Authentication、Authorization、Accounting)功能。


#wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

#wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-3.0.6.tar.gz   下载freeraduis源码包

#yum install httpd httpd-devel mysql mysql-server mysql-develphp php-devel php-mysql php-common php-gd php-mbstring php-mcrypt php-xml gcc gcc-c++ libtalloc-devel php-pear* LAMP环境安装

#chkconfig httpd on && service httpd restart

#chkconfig mysqld on && service mysqld restart

#mysqladmin -uroot password '数据库管理员密码'

#tar -zxvf freeradius-server-3.0.6.tar.gz

#cd freeradius-server-3.0.6

#./configure

#make && make install

#radiusd -X        测试,centos用了openssl-1.0.1e版本号为打过滴血补丁的,在配置文件中改allow_vulnerable_openssl = yes

#radiusd        启动服务模式

#vim /usr/local/etc/raddb/user.conf

取消73-81  steve   Cleartext-Password := "testing"  下面的注释

#radtest steve testing localhost 0 testing123   模拟测试

#mysql -uroot -p密码

 >create database radius;

 >grant all on radius.* to radius@localhost identified by "radius";

 >exit

#mysql -uroot -p密码 radius < /usr/local/etc/raddb/mods-config/sql/main/mysql/schema.sql  导入表结构

#cd /usr/local/etc/raddb/mods-enabled/

#ln -s ../mods-available/sql              建立mysql调用

#vim /usr/local/etc/raddb/mods-available/sql

driver = "rlm_sql_mysql"             改null为mysql

server = "localhost"      打开77-80的注释

port = 3306

login = "radius"

password = "radius"

#wget http://jaist.dl.sourceforge.net/project/daloradius/daloradius/daloradius0.9-9/daloradius-0.9-9.tar.gz

#tar -zxvf daloradius-0.9-9.tar.gz

#mv daloradius-0.9-9 daloradius

#cp -rf daloradius/* /var/www/html/

#chown apache:apache -R /var/www/html/

#chmod 644 /var/www/html/library/daloradius.conf.php

#cd /var/www/html/contrib/db/

#mysql -u root -p密码 radius < fr2-mysql-daloradius-and-freeradius.sql

#mysql -uroot -p密码 radius < mysql-daloradius.sql

#vim /var/www/html/library/daloradius.conf.php

$configValues['CONFIG_DB_USER'] = 'radius';

$configValues['CONFIG_DB_PASS'] = 'radius';

暂时不用改CONFIG_FILE_RADIUS_PROXY = '/usr/local/etc/raddb/proxy.conf'

CONFIG_PATH_DALO_VARIABLE_DATA = '/var/www/html/var'

$configValues['CONFIG_IFACE_PASSWORD_HIDDEN'] = 'yes';