Radius安装配置维护文档

一、下载软件包

freeradius-server-3.0.9.tar.gz和talloc-2.1.3.tar.gz

二、配置/root目录下的.bash_profile文件,添加如下内容

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.4

export ORACLE_SID=radiusdb

export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

三、编译安装

1、  安装talloc

./configure --prefix=/usr/local/talloc

make;make install

2、  安装freeradius

1)       进入freeradius-server-3.0.9/src/modules/rlm_sql/drivers/rlm_sql_oracle目录

2)       执行./configure --with-oracle-include-dir=/u01/app/oracle/product/11.2.4/rdbms/public --with-oracle-lib-dir=/u01/app/oracle/product/11.2.4/lib,编译oracle连接驱动库文件

3)       在freeradius-server-3.0.9目录下执行

./configure --with-oracle-include-dir=/u01/app/oracle/product/11.2.4/rdbms/public --with-oracle-lib-dir=/u01/app/oracle/product/11.2.4/lib --with-talloc-lib-dir=/usr/local/talloc/lib/ --with-talloc-include-dir=/usr/local/talloc/include --with-openssl=no

make;make install

3、  freeradius配置

1)  进入/usr/local/etc/raddb,编辑文件clients.conf,sites-available/default,mods-available/sql

2)  Client.conf文件

添加如下内容:

client test {

ipaddr          = 10.55.0.0/16

secret          = testing

}

定义可接入radius的客户端ip

3)  sites-available/default

将该文件中authorize、eap、accounting、session、post-auth模块中sql前的注释全部去掉,让radius使用数据库进行验证。

4)  mods-available/sql(配置文件中的红字部分需做修改)

sql {

driver = "rlm_sql_oracle"  #数据库驱动使用oracle

dialect = "oracle"

server = "10.55.1.3"

#       port = 3306

login = "radius"

password = "123456"

# Database table configuration for everything except Oracle

#       radius_db = "radius"  #这行注释掉

# If you are using Oracle then use this instead

radius_db = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.55.1.3)(PORT=1521))(CONNECT_DATA=(SID=radiusdb)))"

#       radius_db = "dbname=radius host=localhost user=radius password=raddpass"

acct_table1 = "radacct"

acct_table2 = "radacct"

# Allow for storing data after authentication

postauth_table = "radpostauth"

# Tables containing 'check' items

authcheck_table = "radcheck"

groupcheck_table = "radgroupcheck"

# Tables containing 'reply' items

authreply_table = "radreply"

groupreply_table = "radgroupreply"

# Table to keep group info

usergroup_table = "radusergroup"

#       read_groups = yes

#       read_profiles = yes

# Remove stale session if checkrad does not see a double login

delete_stale_sessions = yes

# Write SQL queries to a logfile. This is potentially useful for tracing

# issues with authorization queries.

#       logfile = ${logdir}/sqllog.sql

#       sql1 {

#           ...

#           pool {

#                ...

#           }

#       }

#

#       # sql2 will use the connection pool from sql1

#       sql2 {

#            ...

#            pool = sql1

#       }

#

pool {

start = ${thread[pool].start_servers}

min = ${thread[pool].min_spare_servers}

max = ${thread[pool].max_servers}

spare = ${thread[pool].max_spare_servers}

uses = 0

retry_delay = 30

lifetime = 0

idle_timeout = 60

}

#       read_clients = yes

client_table = "nas"

#       group_attribute = "${.:instance}-SQL-Group"

group_attribute = "SQL-Group"

$INCLUDE ${modconfdir}/${.:name}/main/${dialect}/queries.conf

}

4)       在mods-enabled文件夹中做mods-available/sql的软连接

sql -> ../mods-available/sql

5)       切换到oracle用户,进入到mods-config/sql/main/oracle目录下,运行schema.sql脚本,创建应用表。

四、radius维护

1、  停机重启

1)  重启数据库

切换到oracle账户

#su - oracle

$sqlplus / as sysdba

SQL>startup

启动监听

$lsnrctl start

检查监听状态,有显示红字部分即为正常。

$lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 20-AUG-2015 10:27:27

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Radius)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date                20-AUG-2015 10:20:15

Uptime                    0 days 0 hr. 7 min. 12 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/11.2.4/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/Radius/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Radius)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service "radiusdb" has 1 instance(s).

Instance "radiusdb", status READY, has 1 handler(s) for this service...

Service "radiusdbXDB" has 1 instance(s).

Instance "radiusdb", status READY, has 1 handler(s) for this service...

The command completed successfully

切换为root账户,执行radiusd启动radius服务

#radiusd

检查1812、1813端口是否存在

#netstat –lntup|grep 1812

如果存在即为正常,如果失败检查/usr/local/var/log/radius/radius.log日志文件

freeradius + oracle 无限认证的更多相关文章

  1. ORACLE OCP认证

    基本情况介绍 Oracle产品非常多,这里说的是Oracle数据库认证体系. Oracle数据库认证体系包括3层,分别是OCA(助理),OCP(专家),OCM(大师) 一般情况下,需一级一级认证,也就 ...

  2. oracle登陆认证方式

    转自:http://blog.itpub.net/14359/viewspace-683064/ 案例: 1,发现此时操作系统认证不成功: C:\Users\Administrator.WIN-201 ...

  3. Oracle OS认证 口令文件 密码丢失处理

    Oracle OS认证 口令文件 密码丢失处理 分类: Oracle Basic Knowledge2009-10-19 14:24 5031人阅读 评论(9) 收藏 举报 oracleos数据库sq ...

  4. Oracle登录认证

    oracle 登录认证 Table of Contents 1. 简介 2. authentication_services 2.1. 不同登录方式的写法 3. sysdba角色登录认证 3.1. 无 ...

  5. 使用JDBC实现Oracle用户认证

    两天时间写的小品,以前的J2EE环境基本使用框架.现在使用JDBC配合Oracle存储过程模拟了一下用户注册和用户认证. 一.添加必须的jar包 需要JDBC连接Oracle的包和shiro-core ...

  6. Oracle身份认证方式

    Oracle对于普通账户和超级管理员(指sysdba和sysoper)的认证机制不一样,前者是通过数据字典,后者主要是通过操作系统验证和密码文件验证.因此一般提到操作系统认证或密码文件认证,针对的都是 ...

  7. ASP.NET MVC5+ORACLE 身份认证

    菜鸟来的,刚接触mvc,看到mvc5上默认带有identity身份验证的东西,公司用的oracle数据库,便想着东西能不能支持oracle数据库,折腾了半天弄出下面的东西来,有些东西可能不太准确,望大 ...

  8. Freeradius+Cisco2500AC+OpenLdap认证

    为了将公司内部认证统一化,启用了802.1x认证,认证流程如下: UserClient->AC控制器->Freeradius->OpenLdap 其中: Freeradius做认证使 ...

  9. Oracle OS认证和口令文件认证方法

    OS认证 1.在SQLNET.ORA(位于$ORACLE_HOME/NETWORK/ADMIN文件夹中)文件里,使用vi编辑,凝视掉#SQLNET.AUTHENTICATION_SERVICES = ...

随机推荐

  1. mysql创建定时执行存储过程任务

    sql语法很多,是一门完整语言.这里仅仅实现一个功能,不做深入研究. 目标:定时更新表或者清空表. 案例:曾经做过定时清空位置信息表的任务.(然而,当时并未考虑服务器挂掉后的情况) 本次测试:每5s更 ...

  2. HTML元素坐标定位,这些知识点得掌握

    文档坐标和视口坐标 视口坐标是相对于窗口的坐标,而文档坐标是相对于整个文档而言.例如,在文档坐标中如果一个元素的相对于文档的Y坐标是200px,并且用户已经把浏览器向下滚动了75px,那么视口坐标中元 ...

  3. JAVA keytool 使用详解

      Keytool是一个Java数据证书的管理工具 ,Keytool将密钥(key)和证书(certificates)存在一个称为keystore的文件中在keystore里,包含两种数据: 密钥实体 ...

  4. 记dynamic的一个小坑 -- RuntimeBinderException:“object”未包含“xxx”的定义

    创建一个控制台程序和一个类库, 在控制台创建一个匿名对象,然后再在类库中访问它,代码如下: namespace ConsoleApplication1 { class Program { static ...

  5. httpRuntime与ASP.NET 运行时及IIS处理模型

    配置 ASP.NET HTTP 运行时设置,以确定如何处理对 ASP.NET 应用程序的请求,配置节及其描述如下所示. <httpRuntime executionTimeout="1 ...

  6. NIOS II 中直接调用Modelsim仿真

    STEP1:创建一个工程,实现并编译该工程,编写TestBench文件. STEP2:设置启动Modelsim的路径 选择Nios II菜单Tools->Options..,在弹出的界面中,选择 ...

  7. 手动获取spring的ApplicationContext和bean对象

    WEB项目: 方法1: 1 ApplicationContext ac1 = WebApplicationContextUtils.getRequiredWebApplicationContext(S ...

  8. N-Tier Entity Framework开源项目介绍

               N-Tier Entity Framework是一个基于微软Entity Framework的N层.NET解决方案. 并且与以下这此技术点无缝集成了: § WCF RIA Ser ...

  9. [翻译]Apache Spark入门简介

    原文地址:http://blog.jobbole.com/?p=89446 我是在2013年底第一次听说Spark,当时我对Scala很感兴趣,而Spark就是使用Scala编写的.一段时间之后,我做 ...

  10. js(jquery)解决input元素的blur事件和其他非表单元素的click事件冲突的方法

    HTML结构:很简单,就一个input,一个div,能说明问题就OK了: <input type="text" value="默认值"><br ...