卸载 Agent
以下步骤假设安装时使用了默认配置(服务名 hina-agent,安装目录 /usr/local/bin)。如果安装时自定义了 SERVICE_NAME 或 INSTALL_DIR,请将命令中的对应值替换为实际值。
Linux (systemd)
Section titled “Linux (systemd)”# 停止并禁用服务sudo systemctl stop hina-agentsudo systemctl disable hina-agent
# 删除 systemd 服务文件并重新加载sudo rm /etc/systemd/system/hina-agent.servicesudo systemctl daemon-reload
# 删除二进制文件sudo rm /usr/local/bin/hina-agentmacOS (launchd)
Section titled “macOS (launchd)”# 卸载 daemonsudo launchctl bootout system/hina-agent
# 删除 plist 文件sudo rm /Library/LaunchDaemons/hina-agent.plist
# 删除二进制文件sudo rm /usr/local/bin/hina-agent
# 删除日志文件(可选)sudo rm -f /var/log/hina-agent.log从管理后台移除
Section titled “从管理后台移除”卸载主机上的 Agent 后,该节点在管理后台会显示为离线状态。如果不再需要保留该节点的历史数据,可以在管理后台中将其删除。