CentOS7源码编译安装FreeRadius3.17

(一)环境简介
1.OS:Centos7.4
2.软件:Freeradiusd3.17(ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-3.0.17.tar.gz)
3.网站:https://freeradius.org/

(二)安装
1.yum安装所需的依赖包
[[email protected] raddb]#yum install openssl openssl-devel libtalloc-devel libtalloc* -y

2.解压和编译安装。由于编译安装默认的路径是/usr/local/etc/raddb/下

[[email protected] opt]#wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-3.0.17.tar.gz
[[email protected] opt]# tar xf freeradius-server-3.0.17.tar.gz
[[email protected] opt]#cd freeradius-server-3.0.17
[[email protected] freeradius-server-3.0.17]#./configure
[[email protected] freeradius-server-3.0.17]#make && make install
[[email protected] freeradius-server-3.0.17]# cd /usr/local/etc/raddb/
[[email protected] raddb]# ls
certs         experimental.conf  mods-available  panic.gdb   radiusd.conf     sites-enabled   users
clients.conf  hints              mods-config     policy.d    README.rst       templates.conf
dictionary    huntgroups         mods-enabled    proxy.conf  sites-available  trigger.conf

3.配置radiusd启动服务文件

[[email protected] ~]# groupadd radiusd
[[email protected] ~]# useradd -g radiusd radiusd -s /sbin/nologin
[[email protected] ~]# vim /usr/lib/systemd/system/radiusd.service
[Unit]
Description=FreeRADIUS high performance RADIUS server.
After=syslog.target network.target ipa.service dirsrv.target krb5kdc.service

[Service]
Type=forking
PIDFile=/usr/local/var/run/radiusd/radiusd.pid
ExecStartPre=-/bin/chown -R radiusd.radiusd /usr/local/var/run/radiusd
ExecStartPre=/usr/local/sbin/radiusd -C
ExecStart=/usr/local/sbin/radiusd -d /usr/local/etc/raddb
ExecReload=/usr/local/sbin/radiusd -C
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

4.创建启动服务

[[email protected] opt]# systemctl enable radiusd
[[email protected] opt]# systemctl start radiusd
[[email protected] opt]# systemctl status radiusd
● radiusd.service - FreeRADIUS high performance RADIUS server.
   Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-08-14 14:11:51 CST; 13min ago
 Main PID: 26259 (radiusd)
   CGroup: /system.slice/radiusd.service
           └─26259 /usr/local/sbin/radiusd -d /usr/local/etc/raddb

Aug 14 14:11:51 localhost.localdomain systemd[1]: Starting FreeRADIUS high performance RADIUS server....
Aug 14 14:11:51 localhost.localdomain systemd[1]: Started FreeRADIUS high performance RADIUS server..
[[email protected] opt]# systemctl restart radiusd
[[email protected] opt]# systemctl status radiusd
● radiusd.service - FreeRADIUS high performance RADIUS server.
   Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2018-08-14 14:25:31 CST; 1s ago
  Process: 29267 ExecStart=/usr/local/sbin/radiusd -d /usr/local/etc/raddb (code=exited, status=0/SUCCESS)
  Process: 29263 ExecStartPre=/usr/local/sbin/radiusd -C (code=exited, status=0/SUCCESS)
  Process: 29261 ExecStartPre=/bin/chown -R radiusd.radiusd /usr/local/var/run/radiusd (code=exited, status=0/SUCCESS)
 Main PID: 29270 (radiusd)
   CGroup: /system.slice/radiusd.service
           └─29270 /usr/local/sbin/radiusd -d /usr/local/etc/raddb

Aug 14 14:25:31 localhost.localdomain systemd[1]: Starting FreeRADIUS high performance RADIUS server....
Aug 14 14:25:31 localhost.localdomain systemd[1]: Started FreeRADIUS high performance RADIUS server..

备注:如果系统是centos6.x以下的版本,具体配置如下

[[email protected] raddb]# cp /usr/local/sbin/rc.radiusd /etc/init.d/radiused
[[email protected] raddb]# /etc/init.d/radiused start

当出现报错的时候“/usr/local/etc/raddb/mods-enabled/ldap[1]: Failed to link to module ‘rlm_ldap‘: /usr/local/lib/rlm_ldap.so: cannot open shared object file: No such file or directory

造成服务起不来
[[email protected] mods-available]# yum install freeradius-ldap -y
既可以解决。

原文地址:http://blog.51cto.com/liqingbiao/2159741

时间: 2024-07-30 08:54:30

CentOS7源码编译安装FreeRadius3.17的相关文章

centos7 源码编译安装TensorFlow CPU 版本

一.前言 我们都知道,普通使用pip安装的TensorFlow是万金油版本,当你运行的时候,会提示你不是当前电脑中最优的版本,特别是CPU版本,没有使用指令集优化会让TensorFlow用起来更慢. 但是在编译之中,发现很多坑,由此记录一下. 环境相关: 系统:centos7 python版本:2.7.5 二.准备 1. 安装相关依赖 # 一般会缺失的依赖 yum -y install java-1.8.0-openjdk-devel automake autoconf libtool libi

centos7 源码编译安装 nginx

安装步骤 下载 nginx 源码包 官网 $ wget http://nginx.org/download/nginx-1.16.0.tar.gz 解压 nginx 压缩包 $ tar -zxvf nginx-1.16.0.tar.gz 运行 configure 文件检测程序 $ cd nginx-1.16.0 $ ./configure --prefix=/usr/local/nginx checking for OS + Linux 3.10.0-957.12.2.el7.x86_64 x8

centos7 源码编译安装heartbeat 以及结合nginx测试高可用

1.环境CentOS Linux release 7.4.1708 (Core) 3.10.0-693.el7.x86_64主(heartbeat27=uname -n)10.0.0.27(ip) 10.0.10.27(心跳) 10.0.0.29(vip)备(heartbeat28=uname -n)10.0.0.28(ip) 10.0.10.28(心跳) 10.0.0.29(vip)2.cat /etc/hosts10.0.0.27 heartbeat2710.0.0.28 heartbeat

CentOS7 源码编译安装Tengine

简介 Tengine是由淘宝网发起的Web服务器项目.它在Nginx的基础上,针对大访问量网站的需求,添加了很多高级功能和特性.它的目的是打造一个高效.安全的Web平台. 发展 Tengine的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验. 从2011年12月开始,Tengine成为一个开源项目,Tengine团队在积极地开发和维护着它.Tengine团队的核心成员来自于淘宝.搜狗等互联网企业.Tengine是社区合作的成果,我们欢迎大家参与其中,贡献自己的力量. 一.安装编

CentOS7源码编译安装PHP7.2

一.环境 CentOS7 二.相关资源 PHP官方网站 PHP官方下载页 三.编译安装 1. 下载php 下载并解压 # 下载php wget https://www.php.net/distributions/php-7.2.16.tar.gz # 解压 tar -zxvf php-7.2.16.tar.gz 查看目录 [[email protected] ~]# ll 总用量 19232 drwxrwxr-x 14 root root 4096 3月 5 19:05 php-7.2.16 -

centos7 源码编译安装 php

准备工作 下载 PHP 源码包并解压 $ wget https://www.php.net/distributions/php-7.2.19.tar.bz2 $ tar -jxvf php-7.2.19.tar.bz2 进入 PHP 源码包目录 $ cd php-7.2.19 配置和构建 PHP 常用配置项及其说明 如果看着麻烦可以直接看下面的总结步骤 --prefix=/usr/local/php7 # 配置安装目录 --with-config-file-path=/usr/local/php

centos7 源码编译安装nginx教程 nginx安装脚本

安装nginx需要pcre zlib openssl的库,下文都是在官网直接下载用作编译安装 该nginx安装教程,有安装maxmind IP 库 该nginx安装教程有安装openrestry 系统使用了centos 7 该教材有修改最大打开文件描述符数到最大 该教程是nginx安装的shell脚本 #!/bin/bash yum install epel-release -y yum install gcc gcc-c++ make automake autoconf libtool ipt

centos7源码编译安装Ansible详细部署

一.基础介绍==========================================================================================ansible是新出现的自动化运维工具,基于Python开发,集合了众多运维工具(puppet.cfengine.chef.func.fabric)的优点,实现了批量系统配置.批量程序部署.批量运行命令等功能.ansible是基于模块工作的,本身没有批量部署的能力.真正具有批量部署的是ansible所运行的

centos7源码编译安装httpd、加入systemctl并设置开机自启动

所需软件: apr-1.6.3.tar.gz (下载地址:http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.3.tar.gz) apr-util-1.6.1.tar.gz (下载地址:http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz) httpd-2.4.29.tar.gz (下载地址:http://mirrors.shu.edu.cn/apac