컴파일된 소스를 사용하여 Centos 7에 freeradius 서버를 설정했습니다.ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-3.0.18.tar.gz
다시 시작할 때마다 서비스가 실행되지 않는다는 점을 제외하면 모든 것이 잘 작동합니다. 명령을 내려야 하는데...
sudo systemctl start radiusd
서비스가 성공적으로 실행됩니다. 다음은 로그입니다
● radiusd.service - FreeRADIUS config by ME.
Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2022-01-22 00:10:50 +08; 7s ago
Process: 2036 ExecStart=/opt/freeradius/sbin/radiusd -d /opt/freeradius/etc/raddb (code=exited, status=0/SUCCESS)
Process: 2028 ExecStartPre=/opt/freeradius/sbin/radiusd (code=exited, status=0/SUCCESS)
Process: 2023 ExecStartPre=/opt/freeradius/sbin/radiusd -C (code=exited, status=0/SUCCESS)
Process: 2020 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)
Main PID: 2039 (radiusd)
CGroup: /system.slice/radiusd.service
└─2039 /opt/freeradius/sbin/radiusd -d /opt/freeradius/etc/raddb
이것은 내 radiusd.service의 시스템 콘텐츠입니다.
[Unit]
Description=FreeRADIUS config by ME.
After=syslog.target network.target ipa.service dirsrv.target krb5kdc.service smb.service nmb.service
[Service]
Type=forking
#PIDFile=/var/run/radiusd/radiusd.pid
ExecStartPre=-/bin/chown -R radiusd.radiusd /var/run/radiusd
ExecStartPre=/opt/freeradius/sbin/radiusd -C
ExecStart=/opt/freeradius/sbin/radiusd -d /opt/freeradius/etc/raddb
ExecReload=/opt/freeradius/sbin/radiusd
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
재시작 후 시스템 로그입니다.
● radiusd.service - FreeRADIUS config by ME.
Loaded: loaded (/usr/lib/systemd/system/radiusd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2022-01-22 00:32:31 +08; 48s ago
Process: 1320 ExecStartPre=/opt/freeradius/sbin/radiusd -C (code=exited, status=1/FAILURE)
Process: 1284 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)
Jan 22 00:32:22 myhost systemd[1]: Starting FreeRADIUS config by ME....
Jan 22 00:32:31 myhost systemd[1]: radiusd.service: control process exited, code=exited status=1
Jan 22 00:32:31 myhost systemd[1]: Failed to start FreeRADIUS config by ME..
Jan 22 00:32:31 myhost systemd[1]: Unit radiusd.service entered failed state.
Jan 22 00:32:31 myhost systemd[1]: radiusd.service failed.
이것이 제가 찾은 유일한 기록이기 때문에 어디를 더 봐야 할지 모르겠습니다.
답변1
매뉴얼 페이지에서 ...
The server can return a zero status code when run with -C, but may still exit with an error when run normally.
내 생각엔 내가 없애버릴 것 같아 ExecStartPre=/opt/freeradius/sbin/radiusd -C
.
변경 사항이 없으면 검사를 실행해도 아무런 의미가 없는 것 같습니다.