1.下载锐捷,解压后给rjsupplicant.sh 添加可执行权限

2.创建一个 systemd 启动脚本并将其放在 /etc/systemd/system/ 目录中,内容如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# ruijie.service

[Unit]
Description=Run ruijie
After=network.target

[Service]
ExecStart=/home/rjsupplicant/rjsupplicant.sh -u stuxxxx -p passwordxxxx -d 0
ExecStop=/home/rjsupplicant/rjsupplicant.sh -q
ExecReload=/home/rjsupplicant/rjsupplicant.sh -u stuxxxx -p passwordxxxx -d 0
Restart=on-failure
KillMode=control-group


[Install]
WantedBy=multi-user.target

3.运行以下命令启动服务

1
2
3
4
systemctl daemon-reload
systemctl enable ruijie.service
systemctl start ruijie #启动锐捷
systemctl status ruijie #查看锐捷状态

image-20250810002421258

4.重启检查是否启动

1
2
3
reboot
ps aux|grep rjsupplicant
ping www.baidu.com