reeradius服务官网:FreeRADIUS
daloradius Web管理页面官网:daloRADIUS download | SourceForge.net
CentOS6.5下搭建LAMP+FreeRadius+Daloradius Web管理和TP-LINK路由器、H3C交换机连接,实现,上网认证和记账功能:https://www.cnblogs.com/opsprobe/p/9420502.html
一、搭建LAMP服务环境:
(1)安装Apache服务器
yum -y install httpd httpd-devel
systemctl enable httpd # 设置http服务为开机启动
systemctl start httpd # 启动http服务
(2)安装MariaDB
为什么不用Mysql?
因为MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可。开发这个分支的原因之一是:甲骨文公司收购了MySQL后,有将MySQL闭源的潜在风险,因此社区采用分支的方式来避开这个风险。
安装
yum install -y mariadb-server mariadb
设置MariaDB开机启动和启动MariaDB服务
systemctl start mariadb
systemctl enable mariadb
查看MariaDB状态,running表示已经在运行
systemctl status mariadb
初始设置MariaDB,设置root密码,出于安全考虑,考虑删除匿名用户和禁用远程根登录,参见下面的示例配置。
mysql_secure_installation
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
创建radius数据库和用户名密码
mysql -u root -p 回车后输入mysql的root管理员帐号密码,然后
MariaDB [(none)]> create database radius; # 创建radius数据库
MariaDB [(none)]> grant all on radius.* to radius@"localhost" identified by "radpass"; # GRANT 权限 ON 数据库.* TO 用户名@主机名IDENTIFIED BY "密码"; 对某个特定数据库中的所有表单给予授权和创建数据库管理账户
MariaDB [(none)]> flush privileges; # mysql 新设置用户或更改密码后需用flush privileges刷新 mysql 的系统权限相关表,否则会出现拒绝访问,还有一种方法,就是重新启动mysql服务器,来使新设置生效。
MariaDB [(none)]> exit # 退出MariaDB数据库
(3)安装PHP7
curl 'https://setup.ius.io/' -o setup-ius.sh
bash setup-ius.sh
yum remove php-cli mod_php php-common
yum -y install mod_php70u php70u-cli php70u-mysqlnd php70u-devel php70u-gd php70u-mcrypt php70u-mbstring php70u-xml php70u-pear
查看php版本
php -version
PHP 7.0.32 (cli) (bui