Centos 7上编译安装freeradius3.0

平台:Centos 7 x86_64

1,安装源并更新

yum install -y epel-release

rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

yum update -y

2,安装基本库

yum install -y install mc wget crontabs vixie-cron make gcc libtool-ltdl curl gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre pcre-devel ntp sendmail sendmail-cf alpine mutt net-snmp net-snmp-utils libgcrypt* crypt* libtalloc* hiredis* ykclient libpcap libpcap-devel libnl-devel libnl redhat-lsb python perl 

3,安装Apache

yum -y install httpd httpd-manual mod_ssl

4,安装mysql

yum -y install mysql-community-server mysql-devel mysql-connector-odbc libdbi-dbd-mysql

5,安装php

yum install -y php php-devel php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel


wget http://www.dmasoftlab.com/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/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php.ini

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/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_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server/g' /etc/php.ini

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


wget http://xcache.lighttpd.net/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


systemctl enable mysqld.service

systemctl enable httpd.service

systemctl start mysqld.service

systemctl restart httpd.service

mysql_secure_installation

mysql -u root -p 输入密码,建立数据库

CREATE DATABASE radius;

FLUSH PRIVILEGES;

6,安装freeradius

wget ftp://ftp.freeradius.org/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

make && make install

(提示mkdir: cannot create directory ?usr/local/etc/raddb/? File exists   

make: *** [/usr/local/etc/raddb/] Error 1

make install          (再次执行就成功了,不知为何)

7.测试

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

结果:Received Access-Accept

貌似成了,小记


简单安装:

yum install -y freeradius freeradius-utils freeradius-mysql


你可能感兴趣的:(Centos 7上编译安装freeradius3.0)