Skip to main content
Skip table of contents

Installation process


In the following, MariaDB is used as the database.


Secure MariaDB

Linux


  1. To secure the installation of MariaDB use the following command

    BASH
    sudo mysql_secure_installation
  2. Give a new password

  3. Remove the anonymous user

  4. Deny remote root login 

  5. Remove the test-database
  6. Reload privilege tables
  7. Check the connection to the database

    BASH
    mysql -u root -p -h localhost
  8. When connected, create the database (in the MariaDB shell) 

    BASH
    create database ece2;
  9. Exit mySQL

  10. Install the JDBC driver



Prepare environment for RE Cockpit

Linux


  1. Create the following directories to structure and prepare the environment for the Cockpit in the terminal. 

    BASH
    cd /opt
    sudo mkdir re-environment
    cd re-environment



Installation of Wildfly

Linux

Windows

  1. Download Wildfly

    BASH
    cd ~/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
  2. Extract content

  3. Edit standalone.xml so that it can access WildFly

    • Search 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>
  1. Download Wildfly
  2. Extract content

  3. Create a new folder 'WildFly' in the installation directory
  4. Copy WildFly to the installation directory 

    Note

    A JDBC driver must exist in the directory <WildFly_home>\modules\system\layers\base\com\mysql\main.

  5. Copy the module.xml to the directory <Install-path>\WildFly\modules\system\layers\base\com\mysql\main
  6. Copy the standalone.xml to the directory <Install-path>\WildFly\standalone\configuration





Configuration of Wildfly

Linux

Windows

  1. Start Wildfly
  2. 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:

      QuestionAnswer
      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
  3. Open the Firewall and edit it so that WildFly can be accessed via the network

    BASH
    sudo 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
  4. Start Wildfly as service

    BASH
    cd /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
  5. Create a Wildfly-user and set as the owner

    BASH
    sudo useradd wildfly
    sudo chown wildfly:wildfly -R /opt/re-environment/wildfly-18.0.1.Final
  6. Create a link in /opt-directory

    BASH
    sudo ln -s /opt/re-environment/wildfly-18.0.1.Final /opt/wildfly
  7. 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"
  8. Enable service-control

    BASH
    sudo 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!

  9. Copy the standalone.xml to the directory <Install-path>/WildFly/standalone/configuration
  10. Stop WildFly

    BASH
    sudo systemctl stop wildfly
  11. Download and install mySQL

    BASH
    sudo 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
  12. Create the directory <Install-path>/WildFly/modules/system/layers/base/com/mysql/main and copy the JDBC-driver into the directory.

    BASH
    sudo 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
  13. 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>
  14. 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>
  1. Edit the standalone.xml

    • Exchange jdbc-version-template twice with the JDBC version e.g mysql-connector-bin.jar

      <Install-path>\WildFly\standalone\configuration\standalone.xml

      XML
      jdbc: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.g root

      <Install-path>\WildFly\standalone\configuration\standalone.xml

      XML
      FailingConnectionOnly</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

      XML
      FailingConnectionOnly</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, usually 8080

      <Install-path>\WildFly\standalone\configuration\standalone.xml

      XML
      interface="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.g 3306

      <Install-path>\WildFly\standalone\configuration\standalone.xml

      XML
      jdbc: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>
  2. Edit the module.xml

    • Exchange jdbc-version-template  with the JDBC version e.g mysql-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>
  3. Edit the add-user.bat from the directory <Install-path>\WildFly\bin and exchange template_path with the directory of JAVA_HOME-SED.

    <Install-path>\WildFly\bin\add-user.bat

    XML
    set JAVA_HOME=template_path
    rem -------------------------------------------------------------------------
  4. Edit the standalone.bat from the directory <Install-path>\WildFly\bin and exchange template_path with the directory of JAVA_HOME-SED.

    <Install-path>\WildFly\bin\standalone.bat

    XML
    set JAVA_HOME=template_path
    rem -------------------------------------------------------------------------
  5. Edit standalone.conf.bat from the directory <Install-path>\WildFly\bin and exchange  template_path with the directory of JAVA_HOME-SED.

    <Install-path>\WildFly\bin\standalone.conf.bat

    XML
    rem set "JAVA_HOME=C:\opt\jdk1.6.0_23"
    set JAVA_HOME=template_path
  6. 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



  7. 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

      BASH
      service.bat install /startup /name=%wildfly-servicename% /display=%wildfly-servicename% /controller=%wildfly-ipaddr%:%wildfly-managementport% /config standalone.xml
  8. 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%,%mariadb-wildfly-user%, %mariadb-wildfly-pw% and %host%

      XML
      CREATE 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
















Installation of RE Cockpit 

Linux

Windows

  1. Copy ece.ear to the directory <Install-path>/WildFly/standalone/deployments

  2. Start the service IF_WildFly
  3. ece.ear deploys automatically, as should be seen in the directory
  4. Now the RE Cockpit can be accessed  with a web browser under the following link:  http://%hostname%:8080/ece-web-client/ 
  1. Copy ece.ear to the directory <Install-path>\WildFly\standalone\deployments

  2. Start the service IF_WildFly
  3. ece.ear deploys automatically, as should be seen in the directory
  4. Now the RE Cockpit can be accessed with a web browser under the following link:  http://%hostname%:8080/ece-web-client/ 


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.