Apache Casbin Gateway
5. 运维

5.5 升级、停止与卸载

命令

命令作用
casbin-gateway start在后台启动服务端
casbin-gateway stop停止
casbin-gateway status是否在运行,以及跑在哪
casbin-gateway在前台运行,Ctrl-C停止
casbin-gateway uninstall把Gateway写在自己目录之外的东西都还原回去

这些命令在哪个目录执行都一样:它是个包装器,永远在安装目录里启动Gateway,数据也在那里。

后台运行时,控制台输出写到logs/casbin-gateway.out。

升级

右上角是当前运行的版本和构建日期;已发布版本更新时会显示新。

点开它再按立即升级:Gateway下载适合这台机器的构建,确认它能跑起来,替换掉自己,然后重启到新版本。回来之后页面会在新版本上重新加载。

别的什么都不用动——数据、设置和casbin-gateway命令都留在原处。

用别的方式装的、或者装在它自己写不了的目录里的Gateway,会直说,并给出让你手动执行的安装命令。重新执行一次安装命令永远是合法的升级方式;两种方式下你的数据库和设置都不受影响。

卸载

先执行casbin-gateway uninstall。

删目录这件事你自己能做。它做不了的是撤销Gateway写在目录之外的所有东西:

  • 每个Agent自己配置里的监控钩子,
  • 每个Agent被指向的那个供应商,
  • 开机启动项,
  • 桌面入口,
  • 以及ccswitch://协议注册,

否则这些都会留在那儿,指着一个已经不存在的程序。

uninstall会把这些都还原,然后告诉你剩下两样需要手动删:

平台删除
Linux、macOS~/.local/share/casbin-gateway和~/.local/bin/casbin-gateway
Windows%LOCALAPPDATA%\casbin-gateway及其PATH项

Agent本身、它们的登录和历史,完全保持原样。

下一节:6.1 常见问题。

在GitHub上编辑
Apache Incubator

Apache Casbin (Incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright © 2026 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.

Apache, Apache Casbin, the names of Apache projects, and the feather logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and/or other countries. All other marks mentioned may be trademarks or registered trademarks of their respective owners.

本页内容