Good day, how to transfer / upload settings to WildFly 9 correctly, so that later they can be easily and comfortably applied \ imported to another machine?

I tried this: - I copy the file standalone - *. Xml. I rename it to my own, attach it to the sources, and run it on an empty machine with the command:

./standalone.sh --server-config=standalone-(full)-myProject.xml 

Next, the question arose how to properly unload the installed module for MySQL? On my machine, I configured this article as a module: http://hpehl.info/jdbc-driver-setup.html

    1 answer 1

    A simple way to install a module is to use the Command Line Interface (CLI):

    Example for postgresql driver:

    Open jboss-cli.bat (under linux, this is jboss-cli.sh ) located in the %JBOSS_HOME%/bin and execute the command:

    module add —name = org.postgres —resources = E: \ TMP \ postgresql-9.4-1201.jdbc41.jar —dependencies = javax.api, javax.transaction.api

    In this case, —name=org.postgres .

    —resources=E:\TMP\postgresql-9.4-1201.jdbc41.jar - the path to the Jar archive with the driver

    For mysql, everything is the same. The name and the path to the driver will change.

    In theory, this can be stopped if you transferred standalone.xml from one server to another.

    But you can not transfer standalone.xml , as well as create the necessary Datasource via CLI

    The command to register the driver:

     /subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver) 

    The command to register Datasource:

     data-source add —jndi-name=java:/LiferayDS —name=LiferayPool —connection-url=jdbc:postgresql://localhost/liferay —driver-name=postgres —user-name=dbuser —password=dbuserpwd 

    These commands should be changed under mysql. The driver will change the class to com.mysql.jdbc.Driver name and the name of the module.