您的位置:时时app平台注册网站 > 时时app平台注册网站 > LNMP环境下安装freeradius radius manager3.9【时时app平台

LNMP环境下安装freeradius radius manager3.9【时时app平台

2019-11-01 21:15

第生机勃勃为Radius Manager建构三个web

采纳lnmp vhost add,本次无需创设mysql数据库了,在上边我们早就创办好了。

不可能动用这一个命令:ifconfig eth0 down(禁止使用网卡),你是ssh链接的利用了那几个,你当时就掉线了,不用本身说原因吗。

改善个中的"HWADD本田UR-V=xx:xx:xx:xx:xx:xx"为"MACADDTucson=00:D0:09:B8:B7:34"

对于配置radius文件有二种艺术:

3.安装FreeRadius
wget
tar xvf freeradius-server-2.1.8-dmamod-1.tar.gz
cd freeradius-server-2.1.8
./configure
make
make install

拍卖措施(暴力点)
kill 11163(radius进度的PID,centos查看进度PID命令:ps -ef)
如开掘并未有这一个命令能够使用yum install psmisc举行设置

#加上以下内容
ATTRIBUTE Max-Monthly-Traffic 3003 integer
ATTRIBUTE Monthly-Traffic-Limit 3004 integer
ATTRIBUTE Acct-Interim-Interval 85 integer
ATTRIBUTE Max-Yearly-Traffic 3003 integer
ATTRIBUTE Yearly-Traffic-Limit 3004 integer

能够一步到位安装好radius,作者个人建议选择安装包一步步装置,那样开掘难点得以每二十七日找到标题并肃清

  1. New installation
  2. Upgrade old system
    Choose an option: [1](全新安装)

ld.so.conf文件内容如下:
include /etc/ld.so.conf.d/*.conf
加上大器晚成行 /usr/local/lib
成功后输入/sbin/ldconfig,再另行张开上面步骤。
Ldconfig命令是将/etc/ld.so.conf列出的门径下的库文件缓存到/etc/ld.

在最后插足
sqlcounter monthlytrafficcounter {
counter-name = Monthly-Traffic
check-name = Max-Monthly-Traffic
reply-name = Monthly-Traffic-Limit
sqlmod-inst = sql
key = User-Name
reset = monthly
query = " SELECT ABS(SUM(acctinputoctets acctoutputoctets) DIV 1048576) FROM radacct WHERE UserName='%{%k}' AND AcctStartTime >= date_sub(curdate(),interval 30 day)"
}

重启服务器。访谈地址 账号admin 密码1111
顾客访谈地址 账号user 密码1111

7.创制MySql相关的数据库并作设置
两种方法如下:
A。使用phpmyadmin建立
LNMP意况下带phpmyadmin,
确立多少个数据库radius和conntrack
跻身后点:账号---新扩大客户账号
填写好客户名和密码,一定点击(客户账号数据库下的创设与客商同名的数据库并授予全体权限。)

13.修正RM文件从根目录到主目录
cd radiusmanager --> mv * ../ --> cd ../

10.矫正机器MAC地址,因为小编下载RM3.9版本是破解的,授权文件和MAC地址都是破解者发表的(供给重启生效PS:RM4.16是或不是也能够接纳近似方法管理,有研商出来的心上人,可以和自家调换一下)

到那边freeradius已经设置成功了

使用winscp上传radiusmanager-3.9.0.tar.gz到root目录
tar zxvf radiusmanager-3.9.0.tar.gz
cd radiusmanager-3.9.0
chmod 755 install.sh
./install.sh

  1. Redhat (Fedora, CentOS etc.)
  2. Debian (Ubuntu etc.)
    Choose an option: [1](我的是centos系统)

这里要特地说美赞臣(Meadjohnson)(Aptamil)下,要是在设置freeraduis是应用的是第6点里yun直接设置的话,那么sql.conf那个文件
在/etc/raddb/sql.conf 这么些目录里。

Selected operating system is: REDHAT
Select installation type:

B。使用ssh登陆命令创建
mysql -u root -p密码 #签到mysql,一级账号root和密码
CREATE DATABASE radius; #创建radius数据库
CREATE DATABASE conntrack; #创建conntrack数据库
CREATE USER ‘radius’@'localhost’ IDENTIFIED BY ‘radius123′; #创建顾客radius,密码radius123
CREATE USER ‘conntrack’@'localhost’ IDENTIFIED BY ‘conn123′; #开创顾客conntrack,密码conn123
GRANT ALL ON radius.* TO radius@localhost; #给radius数据库设置访问权限
GRANT ALL ON conntrack.* TO conntrack@localhost; #给conntrack数据库设置访问权限

上传覆盖,重启机器未来生效。

sqlcounter yearlytrafficcounter {
counter-name = Yearly-Traffic
check-name = Max- Yearly-Traffic
reply-name = Yearly-Traffic-Limit
sqlmod-inst = sql
key = User-Name
reset = never
query = " SELECT ABS(SUM(acctinputoctets acctoutputoctets) DIV 1048576) FROM radacct WHERE UserName='%{%k}' AND AcctStartTime >= date_sub(curdate(),interval 365 day)"
}

运用的减轻办法是将/usr/local/lib增添到/etc/ld.so.conf中

 

#编辑/usr/local/etc/raddb/sql/mysql/dialup.conf文件
vi /usr/local/etc/raddb/sql/mysql/dialup.conf

14.改进目录文件权限
chattr -i /home/wwwroot/你的域名/.user.ini
chown www:www -大切诺基 /home/wwwroot/你的域名
chmod -Evoque 777 /home/wwwroot/你的域名
chmod 755 /usr/local/bin/rmauth
chmod 755 /usr/local/bin/rmacnt
chmod 755 /usr/local/bin/rmpoller
chmod 600 /etc/radiusmanager.cfg
chmod 755 /usr/local/bin/rmconntrack
chmod 4755 /usr/local/sbin/rootexec

yum install perl-DBI

2.安装到位后,安装LNMP贫乏的机件
ionCube组件安装
跻身lnmp解压后的目录,推行:./addons.sh install ionCube
回车确认后就能活动安装ionCube loader。

4.文本全部者和权杖配置
chmod 644 /usr/local/etc/raddb/dictionary
chown www /usr/local/etc/raddb
chown www /usr/local/etc/raddb/clients.conf

端口占用难点.
动用命令lsof -i:1812
得到
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
radiusd 11163 radiusd 5u IPv4 949974 0t0 UDP *:radius
发掘依然是radius本身攻克了

#清空/usr/local/etc/raddb/sites-enabled/inner-tunnel文件,直接把早就陈设好的文件内容复制进去保存
cat /dev/null > /usr/local/etc/raddb/sites-enabled/inner-tunnel
vi /usr/local/etc/raddb/sites-enabled/inner-tunnel

12.修正RM配置文件
/etc/radiusmanager.cfg
/home/wwwroot/你的域名/radiusmanager/config/system_cfg.php

B:详细的手动配置如下
#编辑/usr/local/etc/raddb/radiusd.conf文件

Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on command file /usr/local/var/run/radiusd/radiusd.sock
Listening on proxy address * port 1814
Ready to process requests.

5.测试FreeRadius
radiusd -X
并发谬误
“error while loading shared libraries:libfreeradius-radius-2.1.8.so: cannot open shared object file : no such file or directory.”

#编辑/usr/local/etc/raddb/modules/mschap文件,修正为如下内容
vi /usr/local/etc/raddb/modules/mschap
mschap { use_mppe = yes require_encryption = yes require_strong = yes }

#编辑/usr/local/etc/raddb/sql/mysql/counter.conf文件,加多自定义总结函数
monthlytrafficcounter(每月计算流量) 和 yearlytrafficcounter(一年一度总结流量)
vi /usr/local/etc/raddb/sql/mysql/counter.conf

#编辑/usr/local/etc/raddb/eap.conf,修正MD5验证方式为peap格局
vi /usr/local/etc/raddb/eap.conf
第30行default_eap_type = md5改为default_eap_type = peap

在那命令调节和测量检验radiusd -X
现身谬误
Failed binding to authentication address * port 1812: Address already in use
/usr/local/etc/raddb/radiusd.conf[240]: Error binding to port for 0.0.0.0 port 1812

再次radiusd -X调试
显示Ready to process requests.

出现Radius Manager installer
Copyright 2004-2011, DMA Softlab LLC
All right reserved.
(Use CTRL C to abort any time)
Select the type of your operating system:

#编写制定字典文件/usr/local/etc/raddb/dictionary
vi /usr/local/etc/raddb/dictionary

Selected installation method: NEW INSTALLATION
WWW root path: [/var/www/html] 这里改成大家建构的web目录/home/wwwroot/你的域名
RADIUS database host: [localhost]
RADIUS database username: [radius] #使用radius
RADIUS database password: [radius123] 你创设的radius数据库的密码
CTS database host: [localhost]
CTS database username: [conntrack] #使用conntrack
CTS database password: [conn123] 你构建的conntrack的密码
Freeradius UNIX user: [root] #使用root
Httpd UNIX user: [apache] 改成WWW
Create rmpoller service: [y]
Create rmconntrack service: [y]
Back up RADIUS database: [y]
WARNING! If You continue You will overwrite the existing RADIUS database!
Are You sure to start the installation? [n] y
Starting installation process…
Copying WEB content to /home/wwwroot/你的域名/radiusmanager
Copying binaries to /usr/local/bin
Copying rootexec to /usr/local/sbin
Copying radiusmanager.cfg to /etc
Backing up RADIUS database…
Creating MySQL tables
Creating rmpoller service
Creating rmconntrack service
Copying logrotate script
Setting permission on raddb files
Copying radiusd init script to /etc/init.d
Installation finished!

11.安装Radius Manager

9.关闭SELINUX(需重启机器生效)
/etc/sysconfig/selinux
SELINUX=disabled

6.对freeradius详细配置,因为大家供给和RM整合,这里就须要详细的配置radius文件
第一说Bellamy下在选拔LNMP碰着包,也得以省略的装置freeradius,轻易安装步骤如下
应用命令:yum install perl-DBI freeradius freeradius-mysql freeradius-utils

A:轻便的艺术运用glzjin(赵朝气蓬勃当初的愿景)写好的公文直接覆盖
wget -O /etc/raddb/radiusd.conf
wget -O /etc/raddb/sites-enabled/default
LNMP环境下安装freeradius radius manager3.9【时时app平台注册网站】。wget -O /etc/raddb/sql/mysql/dialup.conf
wget -O /etc/raddb/dictionary
wget -O /etc/raddb/sql/mysql/counter.conf

1.设置web遭遇,使用LNMP风度翩翩键安装包
现实安装步骤参照他事他说加以考查

#清空/usr/local/etc/raddb/sites-enabled/default文件,直接把早就计划好的文本内容复制进去保存
cat /dev/null > /usr/local/etc/raddb/sites-enabled/default
vi /usr/local/etc/raddb/sites-enabled/default

是的的章程:
使用winscp下载 /etc/sysconfig/network-scripts里ifcfg-eth0

8.配置freeradius数据库
/usr/local/etc/raddb/sql.conf #使用radius/radius123
# Connection info:
server = “localhost”
#port = 3306
login = “radius”
password = “radius123″

vi /usr/local/etc/raddb/radiusd.conf
查找"allow_vulnerabel_openssl = no"改为yes
查找" $INCLUDE sql.conf”(743行),去掉#号
查找" $INCLUDE sql/mysql/counter.conf”(712行),去掉#号

查找simul_count_query将279-282行注释去掉,展开simul_count_query函数

yum freeradius-mysql freeradius-utils

找到readclients黄金时代行,设为yes并去掉注释符号#

本文由时时app平台注册网站发布于时时app平台注册网站,转载请注明出处:LNMP环境下安装freeradius radius manager3.9【时时app平台

关键词: