操做系统建议:centos7linux
服务器配置建议: CPU:1核心(或以上),内存:2G(或以上),硬盘:50G(或以上)redis
不要与生产环境同一个服务器,避免影响生产环境,除非肯定执行升级sql
cd /opt curl http://www.toughstruct.net/download/toughee-stable-linux-x64.tar.xz -o /opt/toughee-linux-x64.tar.xz数据库
cd /opt tar xvf toughee-linux-x64.tar.xzjson
解压缩获得 /opt/toughee 目录centos
注意: /opt/toughee 是默认目录,若是要修改此目录,必须同时修改 Makefile 和 radiusctl, toughee.conf 文件中的对应路径。服务器
执行 make all 安装curl
cd /opt/toughee make allurl
首次使用还需初始化数据库,根据实际状况修改 /opt/toughee/etc/toughee.json 的数据库配置,默认采用 sqlite 数据库。centos7
/opt/toughee/radiusctl initdb -c /opt/toughee/etc/toughee.json
service toughee start
全部日志在 /var/toughee 目录
注意修改 /opt/toughee/etc/toughee.json 中 system 选项下的 secret 值,和老系统保持一致,避免密码没法加解密
执行升级脚本
/opt/toughee/radiusctl importe2 -i oldconfig.json -c /opt/toughee/etc/toughee.json -r 1000
说明:
/opt/toughee/radiusctl importe2 是导入脚本程序 -i oldconfig.json 是指企业版2.0的配置文件,通常是 /etc/radiusd.json -c /opt/toughee/etc/toughee.json 是指当前的新配置文件 -r 1000 表示一次批量插入数据的最大数,对于 sqlite,最大只能49条。
须要保证安装服务器能访问企业版2.0的数据库,脚本会自动分析数据并插入新数据库
系统使用的端口能够在 /opt/toughee/etc/toughee.json 中修改
默认端口以下: