Difference between revisions of "Wildfly"
Idoimaging (talk | contribs) |
Idoimaging (talk | contribs) |
||
Line 8: | Line 8: | ||
* The <tt>wildfly.conf</tt> file can be left largely as supplied mostly is overridden by default options in the <tt>init.d</tt> startup script (see below). However some notes: | * The <tt>wildfly.conf</tt> file can be left largely as supplied mostly is overridden by default options in the <tt>init.d</tt> startup script (see below). However some notes: | ||
** <tt>JAVA_HOME</tt> is the location from which the Java executable is <tt>bin/java</tt>. So if your Java executable is <tt>/usr/bin/java</tt>, your <tt>JBOSS_HOME</tt> is <tt>/usr</tt> | ** <tt>JAVA_HOME</tt> is the location from which the Java executable is <tt>bin/java</tt>. So if your Java executable is <tt>/usr/bin/java</tt>, your <tt>JBOSS_HOME</tt> is <tt>/usr</tt> | ||
+ | * For external use (client is not on the same computer as the server): | ||
+ | ** * Open ports 8080 and 9990 in the firewall of your server | ||
** The default installation will bind only to <tt>localhost</tt> (<tt>127.0.0.1</tt>), so it will not respond to any external interfaces. To change this, specify the <tt>-b</tt> option when Wildfly starts up. This can be configured with the <tt>-b</tt> option by adding the line <tt>JBOSS_OPTS="-b 0.0.0.0"</tt> to <tt>wildfly.conf</tt>. WIldfly will then listen on its default port (8080) to all interfaces. | ** The default installation will bind only to <tt>localhost</tt> (<tt>127.0.0.1</tt>), so it will not respond to any external interfaces. To change this, specify the <tt>-b</tt> option when Wildfly starts up. This can be configured with the <tt>-b</tt> option by adding the line <tt>JBOSS_OPTS="-b 0.0.0.0"</tt> to <tt>wildfly.conf</tt>. WIldfly will then listen on its default port (8080) to all interfaces. | ||
** Also add <tt>-bmanagement 0.0.0.0</tt> to <tt>JBOSS_OPTS</tt> to allow Wildfly to listen to all interfaces for its management console (<tt>:9090/management</tt>) | ** Also add <tt>-bmanagement 0.0.0.0</tt> to <tt>JBOSS_OPTS</tt> to allow Wildfly to listen to all interfaces for its management console (<tt>:9090/management</tt>) | ||
* Copy the <tt>wildfly-init-redhat.sh</tt> file to <tt>/etc/init.d/wildfly</tt> (or use its Debian equivalent). This file can be left as-is. | * Copy the <tt>wildfly-init-redhat.sh</tt> file to <tt>/etc/init.d/wildfly</tt> (or use its Debian equivalent). This file can be left as-is. | ||
* Add Wildfly to the services list with <tt>chkconfig</tt> as in the guide above. | * Add Wildfly to the services list with <tt>chkconfig</tt> as in the guide above. | ||
− | * Start Wildfly with <tt>service wildfly start</tt> and check it is running with <tt>service wildfly status</tt> | + | * Start Wildfly with <tt>service wildfly start</tt> and check it is running with <tt>service wildfly status</tt> or <tt>systemctl status wildfly</tt> |
Latest revision as of 13:44, 20 September 2018
Installation
Installation documentation is sparse on the Wildfly site. This document and this video had some useful information. Installing Wildfly 10 on Debian/Ubuntu has useful information about the practical aspects of deploying a Wildfly server.
In summary:
- Install Wildfly to /opt or another location of your choice.
- Copy the wildfly.conf file supplied with Wildfly (probably in docs/contrib/scripts/init.d or similar) to /etc/default
- The wildfly.conf file can be left largely as supplied mostly is overridden by default options in the init.d startup script (see below). However some notes:
- JAVA_HOME is the location from which the Java executable is bin/java. So if your Java executable is /usr/bin/java, your JBOSS_HOME is /usr
- For external use (client is not on the same computer as the server):
- * Open ports 8080 and 9990 in the firewall of your server
- The default installation will bind only to localhost (127.0.0.1), so it will not respond to any external interfaces. To change this, specify the -b option when Wildfly starts up. This can be configured with the -b option by adding the line JBOSS_OPTS="-b 0.0.0.0" to wildfly.conf. WIldfly will then listen on its default port (8080) to all interfaces.
- Also add -bmanagement 0.0.0.0 to JBOSS_OPTS to allow Wildfly to listen to all interfaces for its management console (:9090/management)
- Copy the wildfly-init-redhat.sh file to /etc/init.d/wildfly (or use its Debian equivalent). This file can be left as-is.
- Add Wildfly to the services list with chkconfig as in the guide above.
- Start Wildfly with service wildfly start and check it is running with service wildfly status or systemctl status wildfly