关键词不能为空

当前您在: 主页 > 英语 >

radius详细配置步骤

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-06 10:54
tags:

-

2021年2月6日发(作者:porphyria)


江西三友网络科技有限公司





























































绝密文件

















三友认证计费系统详细配置步骤



1




安装< /p>


freeradius1.1.4


的版本




1



# tar -xvf


2



# cd freeradius-1.1.4


3



# ./configure -localstatedir=/var -sysconfdir=/etc


4



# make


5



# make install


至此


freeradius


安装完毕< /p>




二、


mys ql


数据库服务器操作



1



rpm -qa|grep mysql






查看是否安装


mysql

< p>
数据库程序



2



service mysqld start



启动


mysql


数据库程序



3


、< /p>


/usr/bin/mysqladmin password



'336699'


修改


mysql< /p>


用户的


root


的密码

< br>


4



mysql -u root -p





enter password: 336699 (


输入密码,无显示)



5




mysql> CREA


TE DA


TABASE radius;


6




Show databases;



6



mysql> quit


注释:删除


mysql



命令



mysql>dorp databases radius;


Mysql


下的命令都 有“;




三、设置启动的服务



1




# ntsysv


选中


mysqld


和< /p>


httpd


服务,使其开机启动。




四、设置


freeradius


程序



1



# cd /freeradius-1.1.4/doc/examples


2



# mysql -u root -p radius<



生成


fre eradius


的基本数据库的表



3



# cd /etc/raddb/


注释:



i





是编辑的的意思



Esc



退出



“< /p>


shift



+


“;




后输入



wq


保存修改数据



q



”不保存



查找字符



输入



/



后输入要查找的字符






N


”是下一个






shift



+



N


” 是上一个



4



# vi


将以下:





# Connect info










server =










login =










password =


修改为:





# Connect info










server =










login =


内部资料



注意保密































1



































作者:张工




江西三友网络科技有限公司





























































绝密文件











password =


5



# vi


将以下:









#



See








# sql


修改为:









#



See










sql



将以下:



#









See


#









sql


修改为:










#



See










sql



将以下:



post-auth {










#



Get an address from the IP Pool.


#








main_pool



































#


#



If you want to have a log of authentication replies,


#



un-comment the following line, and the 'detail reply_log'


#



section, above.


#








reply_log











#










#



After authenticating the user, do another SQL qeury.










#










#



See


#









sql











#










#



Un-comment the following if you have set










#



'edir_account_policy_check = yes' in the ldap module sub-section of










#



the 'modules' section.


修改为:



post-auth {










#



Get an address from the IP Pool.


#








main_pool











#










#



If you want to have a log of authentication replies,


内部资料



注意保密































2



































作者:张工




江西三友网络科技有限公司





























































绝密文件











#



un-comment the following line, and the 'detail reply_log'











#



section, above.


#








reply_log











#










#



After authenticating the user, do another SQL qeury.










#










#



See










sql











#










#



Un-comment the following if you have set










#



'edir_account_policy_check = yes' in the ldap module sub-section of










#



the 'modules' section.



6



# vi


在文件末尾增加以下


代码:




client 192.168.15.1 {









secret = 336699









shortname = sanyou1








}


注释 :


336699



ros



ip-ppp- secret


密码




7



# /usr/local/sbin/radiusd -X




启动


freeradius


的调试模式



出现


1812



1813


就成功了



8



# cd /etc


9



# vi


在文件末尾加以下代码:



/usr/local/sbin/radiusd




五、配置


apache



php


1



# cd /etc/httpd/conf.d


2



# vi


在文件末尾加以下代码:




AddType application/x-httpd-php .php3



3



# cd /etc/httpd/conf


4



# vi


将以下代码:



# DocumentRoot: The directory out of which you will serve your


# documents. By default, all requests are taken from this directory, but


# symbolic links and aliases may be used to point to other locations.


#


DocumentRoot


内部资料



注意保密































3



































作者:张工




江西三友网络科技有限公司





























































绝密文件



修改为:



# DocumentRoot: The directory out of which you will serve your


# documents. By default, all requests are taken from this directory, but


# symbolic links and aliases may be used to point to other locations.


#


DocumentRoot



将以下代码:



#


# This should be changed to whatever you set DocumentRoot to.


#



修改为:



#


# This should be changed to whatever you set DocumentRoot to.


#




将以下代码:



# more or less alphabetized them here. Y


ou probably want to change this.


#


LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv



zh-CN


zh- TW


修改为:



# more or less alphabetized them here. Y


ou probably want to change this.


#


LanguagePriority zh-CN en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv



zh-TW



将以下代码修改成:



# If your host doesn't have a registered DNS name, enter its IP address here.


# Y


ou will have to access it by its address anyway, and this will make


# redirections work in a sensible way.


#


ServerName localhost:80



将以下代码:



# Specify a default charset for all content served; this enables


# interpretation of all content as UTF-8 by default.



To use the


# default browser choice (ISO-8859-1), or to allow the META


tags


# in HTML content to override this choice, comment out this


# directive:


#




AddDefaultCharset UTF-8


内部资料



注意保密































4



































作者:张工




江西三友网络科技有限公司





























































绝密文件



修改为:



# Specify a default charset for all content served; this enables


# interpretation of all content as UTF-8 by default.



To use the


# default browser choice (ISO-8859-1), or to allow the META


tags


# in HTML content to override this choice, comment out this


# directive:


#


#AddDefaultCharset UTF-8



5



# service httpd restart



6


、找一台同网段的


pc


启动浏览器,输入


http://192.168.15.98,(ip


地址是


radius


服务器的


ip

地址),如果出现


apache


的页面,说明


apache


配置成功。




六、安装配置三友网络认证计费系统管理程序




2



# cd /var/www


3



# mysql -u root -p radius<


4



# cd conf


5



# vi


将以下代码:



# The directory where dialupadmin is installed


#


#general_base_dir: /www


general_base_dir: /www


修改为:



# The directory where dialupadmin is installed


#


#general_base_dir: /www


general_base_dir: /var/www



将以下代码:



sql_type: mysql


sql_server: localhost


sql_port:


sql_username: root


sql_password:



sql_database: radius


sql_accounting_table: radacct


修改为:



sql_type: mysql


sql_server: localhost


sql_port:


sql_username: root


内部资料



注意保密































5



































作者:张工




江西三友网络科技有限公司





























































绝密文件



sql_password: 336699,**.


sql_database: radius


sql_accounting_table: radacct



将以下代码:



#


sql_debug: true


#sql_debug: false


修改为:



#


#sql_debug: true


sql_debug: false



七、配置系统自动扣费程序




1


、先修改


/var/www/


的文件。修改里面的用户密码。



2



chmod 777 /var/www/




前提是在根目录下。



3



crontab -u root -e


增加:




*/20 * * * * /var/www/



八、配置数据库自动备份程序



1



cd /root


2




vi mysqlautoback


3




添加:



mysqldump


--all-databases


-uroot


-p336699



>



+%y%m%d).sql



4



wq


5



chmod 777 /root/mysqlautoback


6




mkdir mysqlbackup


7



cd /etc


8



vi crontab


9


、增加:




01 5 * * * root /mysqlautoback



10



wq


11



/etc/rc.d/init .d/crond restart



九、增加


radius


的属性值



输入命令:


Cd var/www/conf/


目录下



1


、 修改



文件



Framed-IP-Netmask: 255.255.255.255


内部资料



注意保密































6


















/root/mysqlbackup/mysql$$(date


















作者:张工





江西三友网络科技有限公司





























































绝密文件



增加限速的值:



Ascend- Data-Rate:512000


Ascend-Xmit- Rate:1024000


2



[root@syrad conf]# vi p


增加限速的条目:



replyItem






Ascend-Data- Rate












Ascend-Data-Rate


replyItem






Ascend-Xmit-Rate












Ascend-Xmit-Rate


3


、修改



user_


文件



增加以下两行:



Ascend- Data-Rate

















Ascend-Data-Rate


Ascend- Xmit-Rate

















Ascend-Xmit-Rate



十、增加


mac


地址锁定功能





mysql


的数据库


radius


中的表


rad check


增加一个


mac


字段


,varchar(50)


类型




null




gb2312



在上面的



中 加多一个步骤



post-auth {







sql














#


去掉原来的注释语句




}












#



See










sql



(去掉了前面的

< p>
#


号)






中的


authorize _check_query
























authorize_check_query =


alue, op












FROM $${authcheck_table}












WHERE Username = '%{SQL- User-Name}'












ORDER BY


id


修改为:













authorize_check_query =


alue, op












FROM $${authcheck_table}












WHERE Username = '%{SQL- User-Name}'













and (MAC='%{Calling-Station-Id}' or isnull(MAC) or MAC='')













ORDER BY


id




postauth_quer y


语句:(此处一般不用修改的)





















postauth_query =




('', '%{User- Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())



内部资料



注意保密































7



































作者:张工



-


-


-


-


-


-


-


-



本文更新与2021-02-06 10:54,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/607601.html

radius详细配置步骤的相关文章