需要使用 asadmin 配置 GlassFish 方面的帮助
由于项目限制,我需要在 shell 脚本 (linux) 中使用 asadmin 配置 GlassFish 安装。我已经配置了所有参数,除了一个。我需要配置的部分是“网络侦听器”部分。默认domain.xml 文件的部分如下所示:
<network-config>
<protocols>
<protocol name="http-listener-1">
<http default-virtual-server="server" max-connections="250" server-name="">
<file-cache enabled="false"></file-cache>
</http>
</protocol>
<protocol security-enabled="true" name="http-listener-2">
<http default-virtual-server="server" max-connections="250" server-name="">
<file-cache enabled="false"></file-cache>
</http>
<ssl ssl3-enabled="false" cert-nickname="s1as"></ssl>
</protocol>
<protocol name="admin-listener">
<http default-virtual-server="__asadmin" max-connections="250" server-name="">
<file-cache enabled="false"></file-cache>
</http>
</protocol>
</protocols>
</network-config>
对于“http-listener-2”部分,我需要对“ssl”部分进行更改。我查看了很多地方,但找不到正确的 asadmin 命令来进行这些更改。我的 ssl 部分需要如下所示:
<ssl key-store="config/xxxxxServer.jks" trust-store="config/xxxxxTrustStore.jks" cert-nickname="xxxxxServer" />
正如我所说,我已经查找了几天,但找不到与 asadmin 一起使用来设置这些参数的正确命令行命令。我认为“asadmin create-ssl”将是我所需要的,但不幸的是,事实并非如此。在查看 GlassFish 的 Web 界面时,我看到了需要设置的参数。这告诉我,我应该能够通过asadmin 配置它。任何帮助我解决此问题的帮助将不胜感激。
感谢您的阅读,祝您有美好的一天。
Due to project limitations, I need to configure my GlassFish installation using asadmin within a shell script (linux). I have all of my parameters configured, except one. The section I need to configure is the "network listener" section. Here is what the section of the default domain.xml file looks like:
<network-config>
<protocols>
<protocol name="http-listener-1">
<http default-virtual-server="server" max-connections="250" server-name="">
<file-cache enabled="false"></file-cache>
</http>
</protocol>
<protocol security-enabled="true" name="http-listener-2">
<http default-virtual-server="server" max-connections="250" server-name="">
<file-cache enabled="false"></file-cache>
</http>
<ssl ssl3-enabled="false" cert-nickname="s1as"></ssl>
</protocol>
<protocol name="admin-listener">
<http default-virtual-server="__asadmin" max-connections="250" server-name="">
<file-cache enabled="false"></file-cache>
</http>
</protocol>
</protocols>
</network-config>
For the "http-listener-2" section, I need to make changes to the "ssl" section. I have looked many places but cannot find the correct asadmin command to make these changes. What my ssl section needs to look like is this:
<ssl key-store="config/xxxxxServer.jks" trust-store="config/xxxxxTrustStore.jks" cert-nickname="xxxxxServer" />
As I have said, I have looked for a couple of days now, and I cannot find the correct command line commands to use with asadmin to set these parameters. I thought "asadmin create-ssl" would be what I needed, but, unfortunately, it was not. In looking at the web interface for GlassFish, I see the parameters I need to set. This tells me that I should be able to configure it via asadmin. Any assistance in helping me with this would be greatly appreciated.
Thanks for reading, and have a great day.
快速回答:使用 asadmin get 和 set。
这是命令的一些输出,以使其更清楚......我希望。
让我们看一下 get 的输出...
现在,使用 set 来更改其他属性之一的值...
使用 get 验证该值‘拿’...
The quick answer : use asadmin get and set.
here is a bit of output from commands to make it clearer... I hope.
Let's take a look at the output from get...
Now, use set to alter the value of one of the other properties...
Use get to verify that the value 'took'...