centos6.5 安装freeradius

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Centos 6.5上编译安装freeradius3.0.10

平台:Centos 6.5 x86_64

1,安装源并更新

Rpm -Uvh

/pub/epel/6/x86_64/epel-RELEASE-6-8.noarch.rpm

rpm -Uvh /enterprise/remi-RELEASE-6.rpm

yum UPDATE -y

2,安装相关库

yum -y install wget expat-devel gcc make gmp-devel gmp pkgconfig perl libpcap gcc-c++ logrotate tar cpio gawk flex bison bison-devel lsof libpcap-devel patch openssl openssl-devel libgcrypt* crypt* autoconf automake libtasn1-devel zlib zlib-devel trousers trousers-devel texinfo libnl-devel libnl dbus dbus-devel ncurses-devel readline-devel libtool-ltdl libtalloc* hiredis* redhat-lsb python mysql-devel

3,安装Mysql和Apache

yum --enablerepo=remi -y install mysql mysql-server mysql-devel httpd httpd-devel chkconfig httpd on

chkconfig mysqld on

service mysqld start

mysql_secure_installation

mysql -u root -p 输入密码

创建你需要的数据库

4,安装php

yum --enablerepo=remi install -y php php-mysql php-common php-devel php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash php-snmp php-process libmcrypt libmcrypt-devel

wget /cont/download/ioncube_loaders_lin_x86-64.tar.gz tar zxvf ioncube_loaders_lin_x86-64.tar.gz

cp -rf ioncube /usr/local/

sed -i 's/post_max_size = 8M/post_max_size = 50M/g' /etc/php.ini

sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 50M/g' /etc/php.ini

sed -i 's/;date.timezone =/date.timezone = PRC/g' /etc/php.ini

sed -i 's/; cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php.ini

sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /etc/php.ini

sed -i 's/disable_functions =.*/disable_functions = passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_ge t_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepas sthru,stream_socket_server/g' /etc/php.ini

echo "zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.4.so">> /etc/php.ini

wget /pub/Releases/3.2.0/xcache-3.2.0.tar.gz

tar -zxvf xcache-3.2.0.tar.gz

cd xcache-3.2.0

phpize --clean

phpize

./configure --enable-xcache

make && make install

cat xcache.ini >> /etc/php.ini

service httpd restart

5,编译安装freeradius

wget ftp:///pub/freeradius/freeradius-server-3.0.10.tar.gz

tar zxvf freeradius-server-3.0.10.tar.gz

cd freeradius-server-3.0.10

./configure --with-modules=rlm_sql_mysql (各种WARNING,没有ERROR) make && make install

6,测试

调试模式命令:

radiusd -X

提示Refusing to start with libssl version OpenSSL 1.0.1e

vi /usr/local/etc/raddb/radiusd.conf

找到allow_vulnerable_openssl = no,修改成allow_vulnerable_openssl = yes 再次启动radiusd -X

新打开一个终端

vi /usr/local/etc/raddb/users

找到这一行

#steve Cleartext-Password:="testing"

将前面的#去掉

radtest steve testing localhost 0 testing123

radtest 17000001111 111111 localhost 0 testing123

获得结果:

Sent Access-Request Id 41 from 0.0.0.0:35117 to 127.0.0.1:1812 length 75 User-Name = "steve"

User-Password = "testing"

NAS-IP-Address = 106.185.45.18

NAS-Port = 0

Message-Authenticator = 0x00

Cleartext-Password = "testing"

Received Access-Accept Id 41 from 127.0.0.1:1812 to 0.0.0.0:0 length 20

相关文档
最新文档