UBUUTU7.10上安装配置freeradius+mysql+rp(2)

5、安装freeradius1.1.2

将源码包解压缩:

# tar –zxvf freeradius_version

进入生成的目录中进行编译安装:

编译之前,先处理一下MySQL的库,freeradius默认查找libmysqlclient_r.so,可是mysql默认为libmysqlclient.so,内容完全一样,做个链接即可:(至关重要,否则启动freeradius的时候会提示找不到rlm_sql_mysql.so:Could not link driver rlm_sql_mysql: file not found)

# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf

# ldconfig


        # cd /usr/local/mysql/lib/mysql/

# ln -s libmysqlclient.so.15.0.0 libmysqlclient_r.so

# cd -


        # ./configure –prefix=/usr/local/freeradius

# make

# make install

附2:测试freeradius:

配置:

添加一个帐户:


    # vi /usr/local/freeradius/etc/raddb/users

加入如下代码在任意地方 


        test    Auth-Type:=local, User-Password=="123456",            


                Service-Type = Framed-User,       


                Framed-Protocol = PPP,               


                Framed-IP-Address = 192.168.0.6,        


                Framed-IP-Netmask = 255.255.255.0
    启动freedius:

# /usr/local/freeradius/sbin/radiusd -X (调试模式)

连接:

# /usr/local/freeradius/bin/radtest test 123456 localhost 0 testing123

可在client.conf里更改服务器的密码;

正常的话能接收到 Access-Accept字样,表示成功。接着做下面的:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wypfff.html