howtos/Linux/wildfly.txt

73 lines
3.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Install Wildfly on Ubuntu
sudo apt update
sudo apt upgrade
sudo apt install nginx php-fpm mariadb-server default-jdk
wget https://github.com/wildfly/wildfly/releases/download/27.0.1.Final/wildfly-27.0.1.Final.tar.gz
tar -xf wildfly-*.Final.tar.gz
sudo mv wildfly-*Final /opt/wildfly
sudo groupadd -r wildfly
sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
sudo chown -RH wildfly:wildfly /opt/wildfly
sudo mkdir -p /etc/wildfly
sudo chmod +x /opt/wildfly/bin/*.sh
Arranque systemd:
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/
sudo systemctl enable --now wildfly
sudo systemctl daemon-reload
systemctl status wildfly
Arranque init.d:
sudo cp /opt/wildfly/docs/contrib/scripts/init.d/wildfly-init-debian.sh /etc/init.d/wildfly
sudo cp /opt/wildfly/docs/contrib/scripts/init.d/wildfly.conf /etc/default/wildfly
sudo nano /etc/default/wildfly
sudo service wildfly start
Create WildFly Management Console and Application user
sh /opt/wildfly/bin/add-user.sh
Configure Wildfly Admin Hal Management Console
By default, you wont be able to access the Admin interface because as you do, the system will give the following error:
Unable to redirect.
An automatic redirect to the Administration Console is not currently available. This is most likely due to the administration console being exposed over a network interface different from the one to which you are connected to.
To access the Administration console you should contact the administrator responsible for this WildFly installation and ask them to provide you with the correct address.
To remove this error and login to Management console on the system where you have installed WildFly, edit its configuration file:
sudo nano /etc/wildfly/wildfly.conf
Replace 0.0.0.0 with 127.0.0.1 in the following line:
WILDFLY_BIND= 127.0.0.1
Restart WildFly service:
sudo systemctl restart wildfly
Open 8080 port in Firewall:
If you are using a firewall then open the port it:
sudo ufw allow 8080/tcp
sudo ufw allow 9090/tcp
Access web interface, open your browser on the server or desktop where you have installed this Application server. And then point to-
http://127.0.0.1:8080
Access WildFly Remotely
sudo nano /opt/wildfly/standalone/configuration/standalone.xml
Scroll to the end of the file and find the Interfaces section and edit the Ip-address from 127.0.0.1 to 0.0.0.0
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
</interfaces>
sudo nano /etc/wildfly/wildfly.conf
change the address to 0.0.0.0
sudo systemctl restart wildfly
Uninstall WildFly
sudo rm -r /opt/wildfly
sudo rm -r /etc/wildfly
sudo rm -r /etc/systemd/system/wildfly.service
sudo rm -r /etc/init.d/wildfly