2.2. 从 CLI 运行(JBang)
您可以使用 JBang 从 CLI 安装并运行 HawtIO。
注意
如果您尚未在本地安装 JBang,请先安装它: https://www.jbang.dev/download/
流程
使用
jbang命令在您的机器上安装最新版本的 HawtIO :$ jbang app install -Dhawtio.jbang.version=4.1.0.redhat-00015 hawtio@hawtio/hawtio注意这个安装方法仅适用于 jbang>=0.115.0。
它将安装 HawtIO 命令。使用以下命令启动 HawtIO 实例:
$ hawtio该命令将在 http://localhost:8080/hawtio/ 自动打开控制台。要更改端口号,请运行以下命令:
$ hawtio --port 8090如需有关 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.