Bonjour, si vous voulez installer Wildfly voici comment faire :
Installer OpenJDK :
CentOS / Fedora / RHEL
yum install java-1.8.0-openjdk-devel
Debian / Ubuntu
apt-get install openjdk-8-jdk
Télécharger Wildfly :
mkdir -p /opt/wildfly
wget -O /opt/wildfly/wildfly.tar.gz https://download.jboss.org/wildfly/18.0.1.Final/wildfly-18.0.1.Final.tar.gz
cd /opt/wildfly && tar -xvf wildfly.tar.gz
Créer un utilisateur dédié :
groupadd -r wildfly
useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
chown -R wildfly: /opt/wildfly
Configurer Wildfly :
mkdir -p /etc/wildfly/
cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin
cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/
Démarrer Wildfly :
systemctl enable --now wildfly
Voilà Wildfly est disponible sur le port 8080
ex 192.168.0.30:8080
Configurer la console d'administration :
/opt/wildfly/bin/jboss-cli.sh --connect
Ajouter un utilisateur :
/opt/wildfly/bin/add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a):
Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : adminfly
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
- The password should be different from the username
- The password should not be one of the following restricted values {root, admin, administrator}
- The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password :
Re-enter Password :
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: linuxos
About to add user 'adminfly' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'adminfly' to file '/opt/wildfly/standalone/configuration/mgmt-users.properties'
Added user 'adminfly' to file '/opt/wildfly/domain/configuration/mgmt-users.properties'
Added user 'adminfly' with groups linuxos to file '/opt/wildfly/standalone/configuration/mgmt-groups.properties'
Added user 'adminfly' with groups linuxos to file '/opt/wildfly/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="777777=" />
Editer wildfly.conf :
nano /etc/wildfly/wildfly.conf
# The configuration you want to run
WILDFLY_CONFIG=standalone.xml
# The mode you want to run
WILDFLY_MODE=standalone
# The address to bind to
WILDFLY_BIND=0.0.0.0
# The address console to bind to
WILDFLY_CONSOLE_BIND=0.0.0.0
Editer launch.sh :
nano /opt/wildfly/bin/launch.sh
#!/bin/bash
if [ "x$WILDFLY_HOME" = "x" ]; then
WILDFLY_HOME="/opt/wildfly"
fi
if [[ "$1" == "domain" ]]; then
$WILDFLY_HOME/bin/domain.sh -c $2 -b $3 -bmanagement $4
else
$WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement $4
fi
Appliquer les changements :
systemctl restart wildfly
Editer wildfly.service :
nano /etc/systemd/system/wildfly.service
[Unit]
Description=The WildFly Application Server
After=syslog.target network.target
Before=httpd.service
[Service]
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1
EnvironmentFile=-/etc/wildfly/wildfly.conf
User=wildfly
LimitNOFILE=102642
PIDFile=/var/run/wildfly/wildfly.pid
ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_CONSOLE_BIND
StandardOutput=null
[Install]
WantedBy=multi-user.target
Correction de permission :
mkdir -p /var/run/wildfly/
chown wildfly: /var/run/wildfly/
Recharger le service :
systemctl daemon-reload
systemctl restart wildfly
Et la console de Wildfly est disponible sur le port 9990
ex 192.168.0.30:9990/console