百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 热门文章 > 正文

FreeRadius安装

bigegpt 2024-09-03 11:03 3 浏览


?、环境准备[root@localhost library]# cat /etc/redhat-release //查看内核版本CentOS Linux release 7.3.1611 (Core)[root@localhost library]#

1 在开始安装前建议关闭SELinux或将其设置为disabled,最好建议永久关闭SELinux

# sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config

2 重启系统:reboot ,重启完成后查看SELinux

[root@localhost library]# /usr/sbin/sestatus -vSELinux status: disabled[root@localhost library]#

3 查看防?墙状态,以及关闭防?墙

# firewall-cmd —-state

关闭防?墙及关闭开机启动防?墙:直接关闭防?墙# systemctl stop firewalld.service禁?firewall开机启动# systemctl disable firewalld.service

?、安装Apache服务器 1 安装

# yum -y install httpd httpd-devel

2 设置开机启动并且启动Apache服务

# systemctl enable httpd# systemctl start httpd

3 启动后浏览器输?本机ip,可以看到Apache主?

三 、 安装MariaDB1 安装

# yum install -y mariadb-server mariadb

2 设置MariaDB开机启动和启动MariaDB服务

# systemctl start mariadb

# systemctl enable mariadb

3 查看MariaDB状态,running已经运?

# systemctl status mariadb

4 初始设置MariaDB,设置root密码

出于安全考虑,考虑删除匿名?户和禁?远程根登录,参?下?的示例配置

[root@localhost ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the currentpassword for the root user. If you've just installed MariaDB, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.

Enter current password for root (enter for none):OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDBroot user without the proper authorisation.

Set root password? [Y/n] yNew password:Re-enter new password:Password updated successfully!Reloading privilege tables..... Success!

By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.

Remove anonymous users? [Y/n] y... Success!

Normally, root should only be allowed to connect from 'localhost'. Thisensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y... Success!

By default, MariaDB comes with a database named 'test' that anyone canaccess. This is also intended only for testing, and should be removedbefore moving into a production environment.

Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!

Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.

Reload privilege tables now? [Y/n] y... Success!

Cleaning up...

All done! If you've completed all of the above steps, your MariaDBinstallation should now be secure.

Thanks for using MariaDB!

5 创建Radius数据库和?户名密码

[root@localhost ~]# mysql -u root -pEnter password:Welcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 11Server version: 5.5.68-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE radius;Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY "radius";Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exitBye[root@localhost ~]#

四 、 安装php

1 修改yum源

# yum install epel-release -y# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

2 清除历史版本为了防?冲突

# yum -y remove php*

3 安装拓展包

# yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml

如果出现卡的请求ctrl+c 推出后重新执?命令

4 查看php的版本

# php -v

5 测试php

Apache?站跟?录下新建info.php??,按Ins输?内容后按esc,:wq 保存退出

# vi /var/www/html/info.php

填?以下测试内容:<?php phpinfo(); ?>

6 重启Apache服务器,浏览器输?php测试?

# systemctl restart httpd.service

浏览器输?:http://192.168.0.107/info.php

五、安装FreeRadius

1 安装

# yum -y install freeradius freeradius-utils freeradius-mysql

2 启动且设置为开机?启

3 配置Freeradius连接MariaDB数据

#mysql -u root -p radius < /etc/raddb/mods-config/sql/main/mysql/schema.sql

1

4 修改FreeRadius配置?件

# vi /etc/raddb/mods-available/sql 修改为如下图所示

# chgrp -h radiusd /etc/raddb/mods-available/sql //配置?件权限,将所属组更改为radiusd# systemctl restart radiusd.service //重启radius服务

5 添加客户端连接设置,添加允许所以?户接?

# vi /etc/raddb/clients.conf

添加如下内容

client all_client {ipaddr = 0.0.0.0/0secret = testing123require_message_authenticator = no}

七、安装FreeRadius管理界?Daloradius1 进?Apache?站根?录,下载源?件

# cd /var/www/html/# wget https://github.com/lirantal/daloradius/archive/master.zip 如出现 -bash: wget: command not found 等就安装相应软件,没出现忽略这步。# yum -y install wget# unzip master.zip //解压# rm -f master.zip # mv daloradius-master/ /var/www/html/daloradius //移动?件夹

2 设置DaloRadius?录权限及属主信息

# chown -R apache:apache /var/www/html/daloradius# mv /var/www/html/daloradius/library/daloradius.conf.php.sample /var/www/html/daloradius/library/daloradius.conf.php. //修改php.sample为php(这个好像跟版本有关系)# chmod -R 664 /var/www/html/daloradius/library/daloradius.conf.php

3 在MariaDB中创建DaloRadius数据对象

[root@localhost html]# mysql -u root -p radius < /var/www/html/daloradius/contrib/db/fr2-mysql-daloradius-and-freeradius.sql Enter password:[root@localhost html]# mysql -u root -p radius < /var/www/html/daloradius/contrib/db/mysql-daloradius.sql Enter password:[root@localhost html]#

4 修改DaloRadius配置?件

# vi /var/www/html/daloradius/library/daloradius.conf.php //使?VI编辑器修改DaloRadius配置?件

5 重启服务

# systemctl restart radiusd.service# systemctl restart mariadb.service# systemctl restart httpd

如果提示:Warning: radiusd.service changed on disk. Run 'systemctl daemon-reload' to reload units

没有上?提示就忽略此步

# systemctl daemon-reload

# systemctl restart radiusd.service

? 、 安装php-pear# yum install -y php-pear-DB --skip-broken

九、登陆web??默认?户名: administrator 密码: radius

http://192.168.0.107/daloradius/login.php添加?户

windows端测试

其它事项:在其安装过程中碰到,dologin.php 500 后查找发现为 php-pear-DB没有安装,安装后问题解决。

后查看php错误信息发现为

[root@localhost daloradius]# php dologin.phpPHP Notice: Undefined index: REMOTE_ADDR in /var/www/html/daloradius/dologin.php on line 27PHP Notice: Undefined index: location in /var/www/html/daloradius/dologin.php on line 45PHP Warning: include_once(DB.php): failed to open stream: No such file or directory in /var/www/html/daloradius/library/opendb.php on line 84PHP Warning: include_once(): Failed opening 'DB.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/daloradius/library/opendb.php on line 84PHP Fatal error: Uncaught Error: Class 'DB' not found in /var/www/html/daloradius/library/opendb.php:86Stack trace:#0 /var/www/html/daloradius/dologin.php(49): include()#1 {main} thrown in /var/www/html/daloradius/library/opendb.php on line 86[root@localhost daloradius]#

cat /etc/httpd/logs/error_log # 查看 http 服务的?志,发现有以下错误:PHP Fatal error: Uncaught Error: Class 'DB' not found in /var/www/html/daloradius/library/opendb.php:86\nStack trace:\n#0 /var/www/html/daloradius/dologin.php(49): include()\n#1 {main}\n thrown in /var/www/html/daloradius/library/opendb.php on line 86解决?法:安装php-pear-DByum install -y php-pear-DB现在打开浏览器访问 http://your ip address//daloradius 就可以看到daloradius的界?了,默认登录的?户名和密码分别为 username: administrator password: radius

在其安装过程中碰到?户名密码正确被拒:解决三部曲

1 创建软连接

# ln -s /etc/raddb/mods-available/sql /etc/raddb/mods-enabled/ 为/etc/raddb/mods-enabled //创建软连接

2 将raad_clients打开 将client_table 打开

3 重读配置?件,重启radius服务

# systemctl daemon-reload# systemctl restart radiusd.service

参考资料:

https://www.cnblogs.com/opsprobe/p/9769555.html (解决了DB没装报错)

https://blog.csdn.net/qq_29056051/article/details/81066205(主要参考来源)

https://www.cnblogs.com/lamp01/p/10101659.html (解决php安装)

https://www.cnblogs.com/travis-li/p/12711355.html(解决Daloradius,以及FreeRadius安装)

相关推荐

当Frida来“敲”门(frida是什么)

0x1渗透测试瓶颈目前,碰到越来越多的大客户都会将核心资产业务集中在统一的APP上,或者对自己比较重要的APP,如自己的主业务,办公APP进行加壳,流量加密,投入了很多精力在移动端的防护上。而现在挖...

服务端性能测试实战3-性能测试脚本开发

前言在前面的两篇文章中,我们分别介绍了性能测试的理论知识以及性能测试计划制定,本篇文章将重点介绍性能测试脚本开发。脚本开发将分为两个阶段:阶段一:了解各个接口的入参、出参,使用Python代码模拟前端...

Springboot整合Apache Ftpserver拓展功能及业务讲解(三)

今日分享每天分享技术实战干货,技术在于积累和收藏,希望可以帮助到您,同时也希望获得您的支持和关注。架构开源地址:https://gitee.com/msxyspringboot整合Ftpserver参...

Linux和Windows下:Python Crypto模块安装方式区别

一、Linux环境下:fromCrypto.SignatureimportPKCS1_v1_5如果导包报错:ImportError:Nomodulenamed'Crypt...

Python 3 加密简介(python des加密解密)

Python3的标准库中是没多少用来解决加密的,不过却有用于处理哈希的库。在这里我们会对其进行一个简单的介绍,但重点会放在两个第三方的软件包:PyCrypto和cryptography上,我...

怎样从零开始编译一个魔兽世界开源服务端Windows

第二章:编译和安装我是艾西,上期我们讲述到编译一个魔兽世界开源服务端环境准备,那么今天跟大家聊聊怎么编译和安装我们直接进入正题(上一章没有看到的小伙伴可以点我主页查看)编译服务端:在D盘新建一个文件夹...

附1-Conda部署安装及基本使用(conda安装教程)

Windows环境安装安装介质下载下载地址:https://www.anaconda.com/products/individual安装Anaconda安装时,选择自定义安装,选择自定义安装路径:配置...

如何配置全世界最小的 MySQL 服务器

配置全世界最小的MySQL服务器——如何在一块IntelEdison为控制板上安装一个MySQL服务器。介绍在我最近的一篇博文中,物联网,消息以及MySQL,我展示了如果Partic...

如何使用Github Action来自动化编译PolarDB-PG数据库

随着PolarDB在国产数据库领域荣膺桂冠并持续获得广泛认可,越来越多的学生和技术爱好者开始关注并涉足这款由阿里巴巴集团倾力打造且性能卓越的关系型云原生数据库。有很多同学想要上手尝试,却卡在了编译数据...

面向NDK开发者的Android 7.0变更(ndk android.mk)

订阅Google官方微信公众号:谷歌开发者。与谷歌一起创造未来!受Android平台其他改进的影响,为了方便加载本机代码,AndroidM和N中的动态链接器对编写整洁且跨平台兼容的本机...

信创改造--人大金仓(Kingbase)数据库安装、备份恢复的问题纪要

问题一:在安装KingbaseES时,安装用户对于安装路径需有“读”、“写”、“执行”的权限。在Linux系统中,需要以非root用户执行安装程序,且该用户要有标准的home目录,您可...

OpenSSH 安全漏洞,修补操作一手掌握

1.漏洞概述近日,国家信息安全漏洞库(CNNVD)收到关于OpenSSH安全漏洞(CNNVD-202407-017、CVE-2024-6387)情况的报送。攻击者可以利用该漏洞在无需认证的情况下,通...

Linux:lsof命令详解(linux lsof命令详解)

介绍欢迎来到这篇博客。在这篇博客中,我们将学习Unix/Linux系统上的lsof命令行工具。命令行工具是您使用CLI(命令行界面)而不是GUI(图形用户界面)运行的程序或工具。lsoflsof代表&...

幻隐说固态第一期:固态硬盘接口类别

前排声明所有信息来源于网络收集,如有错误请评论区指出更正。废话不多说,目前固态硬盘接口按速度由慢到快分有这几类:SATA、mSATA、SATAExpress、PCI-E、m.2、u.2。下面我们来...

新品轰炸 影驰SSD多款产品登Computex

分享泡泡网SSD固态硬盘频道6月6日台北电脑展作为全球第二、亚洲最大的3C/IT产业链专业展,吸引了众多IT厂商和全球各地媒体的热烈关注,全球存储新势力—影驰,也积极参与其中,为广大玩家朋友带来了...