Installation process
In the following, MariaDB is used as the database.
Create database
Linux
- In the terminal, change to the
<Install-path>\<database>\bin
directory.
With MariaDB as the database, it is the<Install-path>
\mariadb\bin
directory Execute the command mysql.exe -u "username" -p
BASHmysql -u root -p -h localhost
Note
The username and password of the database must be used here.
When the connection is established, create the required database (in the MariaDB shell)
BASHcreate database ece2;
Enter the following commands with the corresponding variables for
%mariadb-db-name%,%mariadb-wildfly-user%, %
mariadb-wildfly-pw%
, and%host%
and have them executed.XMLGRANT ALL PRIVILEGES ON ece2.* TO %mariadb-wildfly-user%@'localhost' IDENTIFIED BY '%mariadb-wildfly-pw%'; GRANT ALL PRIVILEGES ON ece2.* TO %mariadb-wildfly-user%@'127.0.0.1' IDENTIFIED BY '%mariadb-wildfly-pw%'; GRANT ALL PRIVILEGES ON ece2.* TO %mariadb-wildfly-user%@'::1' IDENTIFIED BY '%mariadb-wildfly-pw%'; GRANT ALL PRIVILEGES ON ece2.* TO %mariadb-wildfly-user%@'%host%' IDENTIFIED BY '%mariadb-wildfly-pw%'; FLUSH PRIVILEGES;
Exit mySQL shell
- Install JDBC driver
- Restart Wildfly service
Prepare RE cockpit environment
Linux
To prepare and structure the RE Cockpit environment, directories must be created in the shell.
cd /opt
sudo mkdir re-environment
cd re-environment
Install Wildfly
Linux
Download Wildfly
BASHcd ~/Downloads wget http://download.jboss.org/wildfly/18.0.1.Final/wildfly-18.0.1.Final.zip sudo mv ~/Downloads/wildfly-18.0.1.Final.zip /opt/re-environment/ cd /opt/re-environment
Extract content from the
/opt/re-environment
directoryEdit
standalone-full.xml
so that it can access Wildfly.Search the IP address
127.0.0.1
and replace it with the IP address of the serverwildfly-18.0.1.Final/standalone/configuration/standalone.xml
XML<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl> ... <interface name="management"> <inet-address value="${jboss.bind.address.management:127.0.0.1}"/> </interface> <interface name="public"> <inet-address value="${joss.bind.address:127.0.0.1}"/> </interface> <interface name="insecure"> <inet-address value="${joss.bind.address.unsecure:127.0.0.1}"/> </interface>
Windows
- Download Wildfly
Extract the content
- In the installation directory, create a new folder named "WildFly"
Copy Wildfly to the installation directory
Note
A JDBC driver must exist in the
<WildFly_home>\modules\system\layers\base\com\mysql\main
directory.- Copy
module.xml
to the<Install-path>\WildFly\modules\system\layers\base\com\mysql\main
directory - Copy
standalone.xml
to the<Install-path>\WildFly\standalone\configuration
directory
Configure Wildfly
Linux
- Start Wildfly in the foreground
Create a Wildfly administrator
Open the terminal as an administrator
Change to the <Install-path>/WildFly/bin directory
- Execute
add-user.sh
Answer the questions as follows:
Question Answer What type of user do you wish to add? a Username: e.g., wfadmin Password: e.g,. wild_fly1 What groups do you want this user to belong to: blank About to add user 'wfadmin' for realm 'ManagementRealm' yes Is this new user going to be used for one AS process to connect to another AS process? yes
Open the Firewall and edit it so that Wildfly can be accessed via the network
BASHsudo systemctl enable firewalld sudo systemctl start firewalld sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent sudo firewall-cmd --zone=public --add-port=9990/tcp --permanent sudo firewall-cmd --reload
Start Wildfly as service
BASHcd /opt/re-environment sudo cp ./wildfly-18.0.1.Final/docs/contrib/scripts/init.d/wildfly-init-redhat.sh /etc/init.d/wildfly sudo cp ./wildfly-18.0.1.Final/docs/contrib/scripts/init.d/wildfly.conf /etc/default
Create a Wildfly user and set as the owner
BASHsudo useradd wildfly sudo chown wildfly:wildfly -R /opt/re-environment/wildfly-18.0.1.Final
Create link in
/opt-directory
BASHsudo ln -s /opt/re-environment/wildfly-18.0.1.Final /opt/wildfly
Edit configuration. Find the
JBOSS_CONFIG
line and change it as follows:/etc/default/wildfly.conf
XML## Location of JDK JAVA_HOME="/usr/java/jdk-9.0.4" ## Location of WildFly JBOSS_HOME="/opt/re-environment/wildfly-18.0.1.Final" ## The username who should own the process. JBOSS_USER=wildfly ## The mode WildFly should start, standalone or domain JBOSS_MODE=standalone ## Configuration for standalone mode JBOSS_CONFIG=standalone-full.xml ## Configuration for domain mode # JBOSS_DOMAIN_CONFIG=domain.xml # JBOSS_HOST_CONFIG=host-master.xml ## The amount of time to wait for startup # STARTUP_WAIT=60 ## The amount of time to wait for shutdown # SHUTDOWN_WAIT=60 ## Location to keep the console log JBOSS_CONSOLE_LOG="/var/log/wildfly/console.log" ## Additionals args to include in startup # JBOSS_OPTS="--admin-only -b 127.0.0.1"
Enable
service-control
BASHsudo systemctl enable wildfly
Note
(Without this the server is not reachable via the hostname or IP address)
Currently, the configuration selection inwildfly.conf
is not working properly! So the next step is a temporary workaround!Copy
standalone.xml
to the<Install-path>/WildFly/standalone/configuration
directoryCODEcd /opt/re-environment/wildfly-18.0.1.Final/standalone/configuration sudo cp standalone.xml standalone.xml.original sudo cp standalone-full.xml standalone.xml
Stop Wildfly and close the terminal while it is running in the foreground.
Start Wildfly in the background
BASHsudo systemctl start wildfly
Info
Under http://
servername
:8080 you can now check whether Wildfly was started correctly.Stop Wildfly
Download the
mySQL
connector and install itBASHsudo cd /opt sudo wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.17.tar.gz sudo tar -xvzf mysql-connector-java-8.0.17.tar.gz
Create the
<Install-path>/WildFly/modules/system/layers/base/com/mysql/main
directory and copy theJDBC
driver into the directory.BASHsudo mkdir -p /opt/wildfly/modules/system/layers/base/com/mysql/main sudo cp mysql-connector-java-8.0.17/mysql-connector-java-8.0.17.jar /opt/wildfly/modules/system/layers/base/com/mysql/main
Create
module.xml
in the<Install-path>/WildFly/modules/system/layers/base/com/mysql/main
directory with the following content:wildfly/modules/system/layers/base/com/mysql/main/module.xml
XML<module xmlns="urn:jboss:module:1.3" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-8.0.17.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
- Edit the
standalone.xml
Insert the system properties between
</extensions>
and<management>
standalone.xml
XML<system-properties> <property name="resteasy.preferJacksonOverJsonB" value="true"/> </system-properties>
Configure JAAS under
<security-realms>
standalone.xml
XML<security-realm name="ECEApplicationRealm"> <authentication> <jaas name="ECE"/> </authentication> </security-realm>
Insert the log level under
<subsystem xmlns="urn:jboss-domain:logging:5.0">
standalone.xml
XML<logger category="com.innoface.ece"> <level name="TRACE"/> </logger> <!-- enable SQL Logging --> <logger category="org.hibernate.SQL"> <level name="DEBUG"/> </logger> <!-- enable logging of BIND parameters --> <logger category="org.hibernate.type.descriptor.sql"> <level name="TRACE"/> </logger>
Insert the JDBC datasource under
<datasources>
standalone.xml
XML<datasource jta="true" jndi-name="java:jboss/datasources/ECE" pool-name="ECESqlDS" enabled="true" use-java-context="true" use-ccm="true"> <connection-url>jdbc:mysql://localhost:3306/ece2?useSSL=false&serverTimezone=Europe/Berlin</connection-url> <driver>mysql-connector-java-8.0.17.jar</driver> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> <use-strict-min>false</use-strict-min> <flush-strategy>FailingConnectionOnly</flush-strategy> </pool> <security> <user-name>root</user-name> <password>dbmaster</password> </security> </datasource>
Insert the JDBC driver under
<drivers>
standalone.xml
XML<driver name="mysql-connector-java-8.0.17.jar" module="com.mysql"> <driver-class>com.mysql.cj.jdbc.Driver</driver-class> <xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class> </driver>
Insert the JMS topic queue under
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
standalone.xml
XML<jms-topic name="topic/ecedaemon" entries="java:jboss/exported/jms/topic/innoface/ecedaemon"/>
Insert the security domain under
<security-domains>
standalone.xml
XML<security-domain name="ECE"> <authentication> <login-module code="com.innoface.ece.wildfly.ECELoginModule" flag="required"> <module-option name="password-stacking" value="useFirstPass"/> </login-module> </authentication> </security-domain>
Windows
Edit the
standalone.xml
Exchange the
jdbc-version-template
twice with the jdbc version, e.g.,mysql-connector-bin.jar
<Install-path>\WildFly\standalone\configuration\standalone.xml
XMLjdbc:mysql://localhost:template-db-port/ece2</connection-url> <driver>jdbc-version-template</driver> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> <use-strict-min>false</use-strict-min> <flush-strategy>FailingConnectionOnly</flush-strategy>
<Install-path>\WildFly\standalone\configuration\standalone.xml
XML<drivers> <driver name="jdbc-version-template" module="com.mysql"> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> </driver> <driver name="h2" module="com.h2database.h2"> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> </driver> </drivers>
Replace the
template-db-user
with the mariadb-wildfly-user, e.g.,root
<Install-path>\WildFly\standalone\configuration\standalone.xml
XMLFailingConnectionOnly</flush-strategy> </pool> <security> <user-name>template-db-user</user-name> <password>template-db-password</password>
Replace
template-db-password
with the mariadb-wildfly-user-password<Install-path>\WildFly\standalone\configuration\standalone.xml
XMLFailingConnectionOnly</flush-strategy> </pool> <security> <user-name>template-db-user</user-name> <password>template-db-password</password> </security>
Replace the
wildfly-template-port
with the WildFly port, usually8080
<Install-path>\WildFly\standalone\configuration\standalone.xml
XMLinterface="public" port-offset="${jboss.socket.binding.port-offset:0}"> <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/> <socket-binding name="http" port="${jboss.http.port:wildfly-template-port}"/> <socket-binding name="https" port="${jboss.https.port:8443}"/>
Replace the
template-db-port
with the database port, e.g.3306
<Install-path>\WildFly\standalone\configuration\standalone.xml
XMLjdbc:mysql://localhost:template-db-port/ece2</connection-url> <driver>jdbc-version-template</driver> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> <use-strict-min>false</use-strict-min> <flush-strategy>
Edit the
module.xml
Replace the
jdbc-version-template
with the jdbc version, e.g.,mysql-connector-bin.jar
<Install-path>\WildFly\modules\system\layers\base\com\h2database\h2\main\module.xml
XML<module xmlns="urn:jboss:module:1.3" name="com.mysql"> <resources> <resource-root path="jdbc-version-template"/> </resources> <dependencies>
Edit the
add-user.bat
in the<Install-path>\WildFly\bin
directory and exchangetemplate_path
with theJAVA_HOME-SED
directory.<Install-path>\WildFly\bin\add-user.bat
XMLset JAVA_HOME=template_path rem -------------------------------------------------------------------------
Edit the
standalone.bat
in the<Install-path>\WildFly\bin
directory and exchangetemplate_path
with theJAVA_HOME-SED
directory.<Install-path>\WildFly\bin\standalone.bat
XMLset JAVA_HOME=template_path rem -------------------------------------------------------------------------
Edit the
standalone.conf.bat
in the<Install-path>\WildFly\bin
directory and exchangetemplate_path
with theJAVA_HOME-SED
directory.<Install-path>\WildFly\bin\standalone.conf.bat
XMLrem set "JAVA_HOME=C:\opt\jdk1.6.0_23" set JAVA_HOME=template_path
Create a Wildfly administrator
Open the terminal as an administrator
Change to the
<Install-path>/WildFly/bin
directoryRun
add-user.bat
Answer the questions as follows:<
Question
Answer What type of user do you wish to add? a Username: e.g., wfadmin Password: e.g,. wild_fly1 What groups do you want this user to belong to: blank About to add user 'wfadmin' for realm 'ManagementRealm' yes Is this new user going to be used for one AS process to connect to another AS process? yes
- Set up a Wildfly service
- Copy the
service
folder from the<Install-path>\WildFly\docs\contrib\scripts
directory into the<Install-path>\WildFly\bin
directory. - In the terminal change to the
<Install-path>\bin\service
directory Run the following command with the respective variables for
%wildfly-servicename%
,%wildfly-ipaddr%
, and%wildfly-managementport%
<Install-path>\bin\service
BASHservice.bat install /startup /name=%wildfly-servicename% /display=%wildfly-servicename% /controller=%wildfly-ipaddr%:%wildfly-managementport% /config standalone.xml
- Copy the
8. Create database
a. In the terminal, change to the <Install-path>\<database>\bin
directory.
b. With a MariaDB database, the directory is <Install-path>
\mariadb\bin,d
en, run the mysql.exe -u "username" -p commands
Note
The username and password of the database must be used here.
c. Enter the following commands with the corresponding vairables for %mariadb-db-name%,%
mari
adb-wildfly-user%, %mariadb-wildfly-pw%
, and %host%
, and have them executed.
CREATE DATABASE %mariadb-db-name%;
GRANT ALL PRIVILEGES ON ece2.* TO %mariadb-wildfly-user%@'localhost' IDENTIFIED BY '%mariadb-wildfly-pw%';
GRANT ALL PRIVILEGES ON ece2.* TO %mariadb-wildfly-user%@'127.0.0.1' IDENTIFIED BY '%mariadb-wildfly-pw%';
GRANT ALL PRIVILEGES ON ece2.* TO %mariadb-wildfly-user%@'::1' IDENTIFIED BY '%mariadb-wildfly-pw%';
GRANT ALL PRIVILEGES ON ece2.* TO %mariadb-wildfly-user%@'%host%' IDENTIFIED BY '%mariadb-wildfly-pw%';
FLUSH PRIVILEGES;
d. Stop mysql.exe
Install RE Cockpit
Linux
Copy
ece.ear
to the <Install-path>/WildFly/standalone/deployments directory.- Start the
WildFly
service ece.ear
deploys automatically, as should be seen in the directory- Afterward, the RE Cockpit can be accessed with a web browser under the following link:
http://%hostname%:8080/ece-web-client/
Windows
Copy
ece.ear
to the <Install-path>/WildFly/standalone/deployments directory.- Start the
IF_WildFly
service ece.ear
deploys automatically, as should be seen in the directory- Afterward, the RE Cockpit can be accessed with a web browser under the following link:
http://%hostname%:8080/ece-web-client/