操做系統建議: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 中修改
默認端口以下: