Difference between revisions of "Wildfly"
Line 27: | Line 27: | ||
=Enable remote access= | =Enable remote access= | ||
− | By default you can only access your server locally. You need to adjust the binding interface. | + | By default you can only access your server locally. You need to adjust the binding interface and hostname. |
+ | |||
+ | |||
+ | ==Quick fixes== | ||
+ | |||
+ | Since there are a lot of files to edit you can use ''sed''. See below for detail explanations. | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
+ | ## Adjust binding | ||
+ | sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/domain/configuration/host.xml | ||
+ | sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/standalone/configuration/standalone.xml | ||
+ | sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/standalone/configuration/standalone-ha.xml | ||
+ | sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/standalone/configuration/standalone-full.xml | ||
+ | sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/standalone/configuration/standalone-full-ha.xml | ||
+ | |||
+ | ## Adjust hostname | ||
+ | sed 's/localhost/myServer/g' -i $wildfly/domain/configuration/host.xml | ||
+ | sed 's/localhost/myServer/g' -i $wildfly/standalone/configuration/standalone.xml | ||
+ | sed 's/localhost/myServer/g' -i $wildfly/standalone/configuration/standalone-ha.xml | ||
+ | sed 's/localhost/myServer/g' -i $wildfly/standalone/configuration/standalone-full.xml | ||
+ | sed 's/localhost/myServer/g' -i $wildfly/standalone/configuration/standalone-full-ha.xml | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Binding interface== | ||
+ | |||
+ | Edit your configuration file | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 52: | Line 80: | ||
Replace '''127.0.0.1''' by the IP you'd like to use, ex: '''192.168.1.100'''. | Replace '''127.0.0.1''' by the IP you'd like to use, ex: '''192.168.1.100'''. | ||
+ | |||
+ | |||
+ | ==hostname== | ||
+ | |||
+ | Edit your configuration file | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
+ | vim $wildfly/standalone/configuration/standalone.xml | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | Adjust the hostname: | ||
+ | |||
+ | <syntaxhighlight lang="xml"> | ||
+ | <host name="default-host" alias="localhost"> | ||
+ | .... | ||
+ | </host> | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | replace ''localhost'' by your server name (FQDN), ex: ''nuc-media-center.daxiongmao.eu'' |
Revision as of 19:20, 25 October 2014
JBOSS Wildfly is an application server fully compatible with the JEE standard, like Glassfish.
- Official website: http://wildfly.org/
- Download: http://www.wildfly.org/downloads/
- Documentation: https://docs.jboss.org/author/display/WFLY8/Getting+Started+Guide
Official JEE 7 examples: https://github.com/javaee-samples/javaee7-samples
Get Wildfly
Download latest Wildfly server: http://wildfly.org/downloads/
Unzip it and launch
$wildfly/bin/standalone.sh
You can test the server on http://localhost:8080
Enable remote access
By default you can only access your server locally. You need to adjust the binding interface and hostname.
Quick fixes
Since there are a lot of files to edit you can use sed. See below for detail explanations.
## Adjust binding
sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/domain/configuration/host.xml
sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/standalone/configuration/standalone.xml
sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/standalone/configuration/standalone-ha.xml
sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/standalone/configuration/standalone-full.xml
sed 's/127.0.0.1/172.16.100.61/g' -i $wildfly/standalone/configuration/standalone-full-ha.xml
## Adjust hostname
sed 's/localhost/myServer/g' -i $wildfly/domain/configuration/host.xml
sed 's/localhost/myServer/g' -i $wildfly/standalone/configuration/standalone.xml
sed 's/localhost/myServer/g' -i $wildfly/standalone/configuration/standalone-ha.xml
sed 's/localhost/myServer/g' -i $wildfly/standalone/configuration/standalone-full.xml
sed 's/localhost/myServer/g' -i $wildfly/standalone/configuration/standalone-full-ha.xml
Binding interface
Edit your configuration file
vim $wildfly/domain/configuration/host.xml
Adjust the bindings:
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<!-- Used for IIOP sockets in the standard configuration. To secure JacORB you need to setup SSL -->
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
Replace 127.0.0.1 by the IP you'd like to use, ex: 192.168.1.100.
hostname
Edit your configuration file
vim $wildfly/standalone/configuration/standalone.xml
Adjust the hostname:
<host name="default-host" alias="localhost">
....
</host>
replace localhost by your server name (FQDN), ex: nuc-media-center.daxiongmao.eu