Aug 022011
架设一台服务器,实现用户认证及计费的功能,我们首选考滤Radius,Radius首选考滤FreeRadius。选择好FreeRadius,数据库自然选择Mysql,操作系统选择Linux,Debian.
安装前的准备工作
-
- Debian系统安装盘或ISO映像文件
- 服务器
下面开始我们的安装过程:
一、安装操作系统
将光盘或ISO映像载入,并按引导提示进行安装,在Debian的最后一个,只选择Standard system这个选项。
二、更新APT
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | radius:~# cat /etc/apt/sources.list # # deb cdrom:[Debian GNU/Linux 5.0.0 _Lenny_ - Official i386 CD Binary-1 20090214-16:29]/ lenny main #deb cdrom:[Debian GNU/Linux 5.0.0 _Lenny_ - Official i386 CD Binary-1 20090214-16:29]/ lenny main # Line commented out by installer because it failed to verify: #deb http://security.debian.org/ lenny/updates main # Line commented out by installer because it failed to verify: #deb-src http://security.debian.org/ lenny/updates main # Line commented out by installer because it failed to verify: #deb http://volatile.debian.org/debian-volatile lenny/volatile main # Line commented out by installer because it failed to verify: #deb-src http://volatile.debian.org/debian-volatile lenny/volatile main deb http://mirrors.163.com/debian unstable main contrib non-free deb-src http://mirrors.163.com/debian unstable main contrib non-free radius:~# radius:~# apt-get update ....... ...... 获取:79 http://mirrors.163.com unstable/contrib 2011-06-02-1409.24.pdiff [606B] 下载 16.5MB,耗时 6s (2734kB/s) 正在读取软件包列表... 完成 radius:~# apt-get upgrade radius:~# apt-get install SSH |
如果提示NO_PUBKEY AED4B06F473041FA 或其它,请参考NO_PUBKEY解决方法
三、安装Mysql
1 | apt-get install mysql-server mysql-client mysql-common |
四、安装FreeRadius
1 | apt-get install freeradius freeradius-common freeradius-mysql freeradius-utils |
五、查看服务
1 2 3 4 5 | radius:~# netstat -an|grep LISTEN tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN radius:~# |
六、配置FreeMysql
在/etc/freeradius目录下,开启Sql的相关配置,配置内容您可以到http://blog.it580.com去查看详细的配置。
七、Radius验证
Radius验证需要涉及到Radius的RFC标准参数的配置,请关注本Blog的其它文章。