centos7搭建hwtacacs服务器完整步骤
时间: 2023-06-17 15:03:49 浏览: 242
步骤如下:
1. 安装必要软件:
```
yum install epel-release -y
yum install wget gcc make readline-devel perl -y
```
2. 下载hwtacacs:
```
wget http://www.shrubbery.net/hwtacacs/hwtacacs-1.0.4.tar.gz
```
3. 解压并编译:
```
tar -zxf hwtacacs-1.0.4.tar.gz
cd hwtacacs-1.0.4
make
make install
```
4. 配置hwtacacs:
```
cd /usr/local/etc
cp hwtacacs.conf.sample hwtacacs.conf
vi hwtacacs.conf
```
修改配置文件中的以下参数:
```
key = hwtacacs
auth = login
authen = /usr/local/sbin/hwauthen.pl
authorize = /usr/local/sbin/hwauthorize.pl
```
5. 配置认证和授权脚本:
```
cp /usr/local/sbin/hwauthen.pl.sample /usr/local/sbin/hwauthen.pl
cp /usr/local/sbin/hwauthorize.pl.sample /usr/local/sbin/hwauthorize.pl
chmod +x /usr/local/sbin/hwauthen.pl
chmod +x /usr/local/sbin/hwauthorize.pl
```
6. 启动hwtacacs:
```
/usr/local/sbin/hwtac_plus -d
```
7. 设置hwtacacs开机自启:
```
cp /usr/local/src/hwtacacs-1.0.4/hwtac_plus /etc/init.d/
chmod +x /etc/init.d/hwtac_plus
chkconfig --add hwtac_plus
chkconfig hwtac_plus on
```
至此,hwtacacs服务器搭建完成。
阅读全文
相关推荐


















