Rasiud 安装配置

1.配置环境

apt-get install gcc libmysqlclient-dev flex bison make libssl-dev libcurl4-openssl-dev  libxml2-dev libpcre3-dev

2.radius安装

参考资料:
http://www.kamailio.org/docs/openser-radius-1.0.x.html
http://www.kamailio.org/docs/kamailio-radius-1.0.x.html#freeradius_clients_conf

使用源码安装,下载源码后,解压进入目录;
./configure 
make 
make install

添加radius用户
useradd radiusd
groupadd radiusd
usermod -G radiusd radiusd

3.radiusd -x 常见问题

/sbin/ldconfig -v 查看 是否有这个包
http://xia-siyu.blog.163.com/blog/static/2748304120101261026411/

我的安装在这一步出现问题,
“error while loading shared libraries:libfreeradius-radius-2.1.8.so: cannot open shared object file : no such file or directory.”

采取的解决方式是将/usr/local/lib添加到/etc/ld.so.conf中
ld.so.conf文件内容如下:

include /etc/ld.so.conf.d/*.conf

添加一行 /usr/local/lib
完成后输入/sbin/ldconfig,再重新进行上面步骤。

Ldconfig命令是将/etc/ld.so.conf列出的路径下的库文件缓存到/etc/ld.so.cache以供使用

4.启动

pkill -9 radiusd
启动radiusd
radiusd -Xx > /usr/local/var/log/radius/radiusd-debug.log &
radiusd -Xx > /usr/local/var/log/radius/radius.log &

5.radius服务器添加client允许ip

/usr/local/etc/raddb/clients.conf
/usr/local/etc/raddb/radiusd.conf 
/usr/local/etc/radiusclient-ng/servers
/usr/local/etc/radiusclient-ng/radiusclient.conf

6.每天自动创建radiusd 日志文件
编辑/etc/logrotate.conf ,加入以下内容

/usr/local/var/log/radius/*.log {
       daily
       missingok
       rotate 120
       compress
       delaycompress
       notifempty
       create 666 radiusd radiusd
       sharedscripts
       prerotate
               /usr/bin/pkill -9 radiusd
       endscript
       sharedscripts
       postrotate
               /usr/local/sbin/radiusd -Xx > /usr/local/var/log/radius/radius.log&
       endscript
}

你可能感兴趣的:(Rasiud 安装配置)