centos8安装mysql_CentOS8+FreeRadius+Mysql8.0+daloRadius建立Radius服务器

Linux发行版:CentOS8-1905

数据库:Mysql8.0

create 

WEB软件:httpd

daloRadius前端使用PHP

yum -y install update 
yum -y install httpd       //web服务器
yum -y install vim         //
yun -y install wget        //
yum -y install net-tools   //
yum -y install php         //php

yum -y install php-common php-gd php-curl php-mysqli -y

yum -y install mysql-server  //数据库

安装freeradius:

yum -y install freeradius freeradius-mysql freeradius-utils

导入数据库表

mysql -uroot -p radius </etc/raddb/mods-config/sql/main/mysql/schema.sql

配置freeradius使用Mysql:

cd /etc/raddb/mods-enabled
ln -s ../mods-available/sql sql

修改Mysql参数:

vim /etc/raddb/sites-available/default

把authorize,accounting,post-auth,session中sql的行,把注释去掉或者-。

编辑Mysql的参数:

vim /etc/raddb/mods-available/sql

修改值

driver = "rlm_sql_mysql"

dialect = "mysql"

server = "localhost"
port = 3306
login ="root"
password = "password"
radius_db = “radius"

read_clients = yes

测试命令:

radiusd -X

本地执行验证命令:

radtest testing password 127.0.0.1 0 testing123

安装daloradius

644 /var/www/html/daloradius/library/daloradius.conf.php
mysql -uroot -ppassword radius < /var/www/html/contrib/db/mysql-daloradius.sql

编辑daloradius的配置文件

$configValues['DALORADIUS_VERSION'] = '1.1-3 BETA';
$configValues['DALORADIUS_DATE'] = '12 Nov 2019';
$configValues['FREERADIUS_VERSION'] = '2';
$configValues['CONFIG_DB_ENGINE'] = 'mysqli';
$configValues['CONFIG_DB_HOST'] = 'localhost';
$configValues['CONFIG_DB_PORT'] = '3306';
$configValues['CONFIG_DB_USER'] = 'root';
$configValues['CONFIG_DB_PASS'] = 'password';
$configValues['CONFIG_DB_NAME'] = 'radius';
$configValues['CONFIG_DB_TBL_RADCHECK'] = 'radcheck';
$configValues['CONFIG_DB_TBL_RADREPLY'] = 'radreply';
$configValues['CONFIG_DB_TBL_RADGROUPREPLY'] = 'radgroupreply';
$configValues['CONFIG_DB_TBL_RADGROUPCHECK'] = 'radgroupcheck';

启动服务

systemctl start radiusd
systemctl start httpd
systemctl start mysqld

自启服务

systemctl enable radiusd
systemctl enable httpd
systemctl enable mysqld

访问并登录daloradius

http://server_ip_address//daloradius

默认的登录

username:administrator
password:radius

登录截图

589773a6-db18-eb11-8da9-e4434bdf6706.png
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值