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.