Installation process
In the following, MariaDB is used as the database.
Secure MariaDB
Linux
To secure the installation of MariaDB use the following command
BASHsudo mysql_secure_installation
Give a new password
Remove the anonymous user
Deny remote root login
- Remove the test-database
- Reload privilege tables
Check the connection to the database
BASHmysql -u root -p -h localhost
When connected, create the database (in the MariaDB shell)
BASHcreate database ece2;
Exit mySQL
- Install the JDBC driver
Prepare environment for RE Cockpit
Linux
Create the following directories to structure and prepare the environment for the Cockpit in the terminal.
BASHcd /opt sudo mkdir re-environment cd re-environment
Installation of Wildfly
Linux
Windows
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
Edit
standalone.xml
so that it can access WildFlySearch and exchange the IP-Address
127.0.0.1
with the IP-Address of the Server.wildfly-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>
- Download Wildfly
Extract content
- Create a new folder 'WildFly' in the installation directory
Copy WildFly to the installation directory
Note
A JDBC driver must exist in the directory
<WildFly_home>\modules\system\layers\base\com\mysql\main
.- Copy the
module.xml
to the directory<Install-path>\WildFly\modules\system\layers\base\com\mysql\main
- Copy the
standalone.xml
to the directory<Install-path>\WildFly\standalone\configuration
Configuration of Wildfly
Linux
Windows
- Start Wildfly
Create a WildFly administrator
Open the terminal as the administrator
Change to the directory
<Install-path>/WildFly/bin
Run
add-user.sh
Answer the questions as follows:
Question Answer What type of user do you wish to add? a Username: z.B. wfadmin Password: z.B. 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 a link in
/o
p
t-directory
BASHsudo ln -s /opt/re-environment/wildfly-18.0.1.Final /opt/wildfly
Edit configurations
Locate the
JBOSS_CONFIG
-line and edit like bellow:/etc/default/wildfly.conf
XML## Location of JDK # JAVA_HOME="/usr/lib/jvm/default-java" JAVA_HOME="/usr/java/jdk-9.0.4" ## Location of WildFly # JBOSS_HOME="/opt/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.xml 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
Hinweis
(Without this the server is not reachable via the hostname or IP address)
Currently, the configuration selection in wildfly.conf is not working properly! So the next step is a temporary workaround!
- Copy the
standalone.xml
to the directory<Install-path>/WildFly/standalone/configuration
Stop WildFly
BASHsudo systemctl stop wildfly
Download and install mySQL
BASHsudo 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 directory
<Install-path>/WildFly/modules/system/layers/base/com/mysql/main
and copy the JDBC-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 the
module.xml
in the same 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
Add the system-properties inbetweeen
</extensions>
and<management>
standalone.xml
XML<system-properties> <property name="resteasy.preferJacksonOverJsonB" value="true"/> </system-properties>
Configure JAAS in
<security-realms>
standalone.xml
XML<security-realm name="ECEApplicationRealm"> <authentication> <jaas name="ECE"/> </authentication> </security-realm>
Configuration of the log-level in
<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>
Configuration of the JDBC-datasource in
<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>
Configuration of the JDBC-Driver in
<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>
Configuration of the JMS in
<subsystem xmlns="urn:jboss:domain:messaging-activemq:8.0">.
Hinweis
A topic-queue is required.
standalone.xml
XML<jms-topic name="topic/ecedaemon" entries="java:jboss/exported/jms/topic/innoface/ecedaemon"/>
Configuration of the security-domain in
<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>
Edit the
standalone.xml
Exchange
jdbc-version-template
twice with the JDBC version e.gmysql-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
template-db-user
with the database-wildfly-user e.groot
<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 password of the database-wildfly-user<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>
Exchange
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}"/>
Exchange
template-db-port
with the database-port e.g3306
<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
Exchange
jdbc-version-template
with the JDBC version e.gmysql-connector-bin.jar
<Install-path>\WildFly\modules\system\layers\base\com\mysql\main
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
from the directory<Install-path>\WildFly\bin
and exchangetemplate_path
with the directory ofJAVA_HOME-SED.
<Install-path>\WildFly\bin\add-user.bat
XMLset JAVA_HOME=template_path rem -------------------------------------------------------------------------
Edit the
standalone.bat
from the directory<Install-path>\WildFly\bin
and exchangetemplate_path
with the directory ofJAVA_HOME-SED
.<Install-path>\WildFly\bin\standalone.bat
XMLset JAVA_HOME=template_path rem -------------------------------------------------------------------------
Edit
standalone.conf.bat
from the directory<Install-path>\WildFly\bin
and exchangetemplate_path
with the directory ofJAVA_HOME-SED.
<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 the administrator
Change to the directory
<Install-path>\WildFly\bin
Run
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
- Setup WildFly as a service
- Copy the folder
service
from the directory<Install-path>\WildFly\docs\contrib\scripts
into the directory<Install-path>\WildFly\bin
- In the terminal change to the directory
<Install-path>\bin\service
Run the following command with the correct 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 folder
- Create the database
- In the terminal change to the directory
<Install-path>\<database>\bin
.
If the database you use is MariaDB, change to the directory<Install-path>\mariadb\bin
. Run the command
mysql.exe -u "username" -p
Note
Here the username and password from the database have to be used.
Run the following command with the correct variables for
%name%,%
mari
adb-wildfly-user%, %mariadb-wildfly-pw%
and%host%
XMLCREATE DATABASE %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;
- Exit
mysql.exe
- In the terminal change to the directory
Installation of RE Cockpit
Linux
Windows
Copy
ece.ear
to the directory <Install-path>/WildFly/standalone/deployments- Start the service
IF_WildFly
ece.ear
deploys automatically, as should be seen in the directory- Now the RE Cockpit can be accessed with a web browser under the following link:
http://%hostname%:8080/ece-web-client/
Copy
ece.ear
to the directory <Install-path>\WildFly\standalone\deployments- Start the service
IF_WildFly
ece.ear
deploys automatically, as should be seen in the directory- Now the RE Cockpit can be accessed with a web browser under the following link:
http://%hostname%:8080/ece-web-client/