2.2. 从 CLI 运行(JBang)


您可以使用 JBang 从 CLI 安装并运行 HawtIO。

注意

如果您尚未在本地安装 JBang,请先安装它: https://www.jbang.dev/download/

流程

  1. 使用 jbang 命令在您的机器上安装最新版本的 HawtIO :

    $ jbang app install -Dhawtio.jbang.version=4.1.0.redhat-00015 hawtio@hawtio/hawtio
    注意

    这个安装方法仅适用于 jbang>=0.115.0

  2. 它将安装 HawtIO 命令。使用以下命令启动 HawtIO 实例:

    $ hawtio
  3. 该命令将在 http://localhost:8080/hawtio/ 自动打开控制台。要更改端口号,请运行以下命令:

    $ hawtio --port 8090
  4. 如需有关 CLI 配置选项的更多信息,请运行以下代码:

    $ hawtio --help
    Usage: hawtio [-hjoV] [-c=<contextPath>] [-d=<plugins>] [-e=<extraClassPath>]
                  [-H=<host>] [-k=<keyStore>] [-l=<warLocation>] [-p=<port>]
                  [-s=<keyStorePass>] [-w=<war>]
    Run HawtIO
      -c, --context-path=<contextPath>
                          Context path.
      -d, --plugins-dir=<plugins>
                          Directory to search for .war files to install as 3rd
                            party plugins.
      -e, --extra-class-path=<extraClassPath>
                          Extra class path.
      -h, --help          Print usage help and exit.
      -H, --host=<host>   Hostname to listen to.
      -j, --join          Join server thread.
      -k, --key-store=<keyStore>
                          JKS keyStore with the keys for https.
      -l, --war-location=<warLocation>
                          Directory to search for .war files.
      -o, --open-url      Open the web console automatic in the web browser.
      -p, --port=<port>   Port number.
      -s, --key-store-pass=<keyStorePass>
                          Password for the JKS keyStore with the keys for https.
      -V, --version       Print HawtIO version
      -w, --war=<war>     War file or directory of the hawtio web application.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部