2 Replies Latest reply on Feb 7, 2019 4:12 AM by Szymon K

    How to configure multiple Jboss instances on RHEL 7.X by RPM installation?

    Thomas Chang Newbie

      Hi,

       

      I use to install the Jboss EAP with RPM by from the Satellite (yum groupinstall jboss eap7). And till we change to se the RHEL7 we can configure multiple jboss instances to multiple users, i.e. instance1 -> user1, ... instancen > usern, etc. Now we try to do the same by RHEL7 but it fails since the RHEL7 works quite different that RHEL5, RHEL6.

       

      Here a further question:

      By the RHEL7 after RPM-installing the Jboss EAP7 there is the file "/usr/lib/systemd/system/eap7-standalone.service" and it looks as follow:

      ...

      [Unit]

      Description=JBoss EAP (standalone mode)

      After=syslog.target network.target

      Before=httpd.service

       

      [Service]

      Environment=LAUNCH_JBOSS_IN_BACKGROUND=1

      Environment="JAVA_HOME=/usr/lib/jvm/jre-1.8.0"

      Environment="JAVAPTH=/usr/lib/jvm/jre-1.8.0/bin"

      Environment="WILDFLY_SH=/opt/rh/eap7/root/usr/share/wildfly/bin/standalone.sh"

      Environment="WILDFLY_SERVER_CONFIG=standalone.xml"

      #Environment="WILDFLY_SERVER_CONFIG=/opt/jboss-apps/sample/configuration/standalone.xml"

      #Environment="WILDFLY_CONSOLE_LOG=/var/opt/rh/eap7/log/wildfly/standalone/console.log"

      Environment="WILDFLY_CONSOLE_LOG=/var/log/jboss-apps/weichen/console.log"

      Environment="WILDFLY_MODULEPATH=/opt/rh/eap7/root/usr/share/wildfly/modules"

      Environment="WILDFLY_BIND=0.0.0.0"

      Environment="WILDFLY_OPTS=--properties /opt/jboss-apps/weichen/configuration/standalone.properties"

      EnvironmentFile=-/etc/opt/rh/eap7/wildfly/eap7-standalone.conf

      EnvironmentFile=-/opt/rh/eap7/service-environment

      User=jboss

      Group=jboss

      LimitNOFILE=102642

      PIDFile=/var/opt/rh/eap7/run/wildfly/eap7-standalone.pid

      ExecStart=/usr/bin/scl enable $EAP7_SCLS_ENABLED -- /opt/rh/eap7/root/usr/share/wildfly/bin/launch.sh $JAVA_HOME $JAVAPTH $WILDFLY_MODULEPATH $WILDFLY_SH $WILDFLY_SERVER_CONFIG $WILDFLY_BIND $WILDFLY_CONSOLE_LOG H O$WILDFLY_OPTS

       

      [Install]

      WantedBy=multi-user.target

      ...

       

      And the file "/etc/opt/rh/eap7/wildfly/eap7-standalone.conf" looks as follow:

      ...

      # The configuration you want to run

       

      # Location of java in the JRE (the default)

      #JAVA_HOME=/usr/lib/jvm/jre-1.8.0

      # Use the following for location of java in the SDK

      # JAVA_HOME=/usr/lib/jvm/java-1.8.0

      # Make sure java is on your path

      #JAVAPTH="/usr/lib/jvm/jre-1.8.0/bin"

       

      # Location to keep the console log, the file to be searched for the server

      # start up message besides /var/opt/rh/eap7/log/wildfly/standalone/server.log

      #WILDFLY_CONSOLE_LOG=/var/opt/rh/eap7/log/wildfly/standalone/console.log

       

      # Define the script to use to start wildfly

      #WILDFLY_SH="/opt/rh/eap7/root/usr/share/wildfly/bin/standalone.sh"

       

      # Define server configuration to start, eg. standalone.xml

      WILDFLY_SERVER_CONFIG="/opt/jboss-apps/sample/configuration/standalone.xml"

       

      # Define where wildfly module directory is

      #WILDFLY_MODULEPATH="/opt/rh/eap7/root/usr/share/wildfly/modules"

       

      # The address to bind to

      #WILDFLY_BIND=0.0.0.0

       

       

      # Additionals args to include on startup

      WILDFLY_OPTS="--properties /opt/jboss-apps/sample/configuration/standalone.properties"

      ...

      It looks quite similar to the "/usr/lib/systemd/system/eap7-standalone.service".

       

      1.

      I wonder if the value of JAVA_HOME are set different, which one will be used?

       

      2.

      One can see the value of WILDFLY_SERVER_CONFIG is standalone.xml. I've tried change this to my location such as /opt/jboss/my_conf/standalone.xml. But the jboss can not be started and I got error as follow:

      ...

      java.lang.IllegalStateException: WFLYCTL0214: Could not get main file: /opt/jboss/my_conf/standalone.xml. Specified files must be relative to the configuration dir: /opt/rh/eap7/root/usr/share/wildfly/standalone/configuration

      ...

       

      I wonder how to overcome this problem? I do want the jboss uses the standalone.xml under my defined location.

       

      3.

      I want to change the deploymens to my defined location such as /opt/jboss/my_conf/deployments. How to do that?

       

      Many thanks!