3DS Server
Application Topology
The following topology shows an example topology with Apache Http Server at the Web layer and JBoss at the App layer.

Java Installation
Java is downloaded using the wget command.
$ cd /tmp && wget https://download.oracle.com/otn/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz
$ mkdir /usr/java
$ tar -xzvf jdk-8u171-linux-x64.tar.gz –-directory=/usr/java/.
$ sudo update-alternatives –install /usr/bin/java java /usr/java/jdk1.8.0_171/bin/java 1200
$ sudo update-alternatives –install /usr/bin/javac javac /usr/java/jdk1.8.0_171/bin/javac 1200
$ update-alternatives --display java
$ update-alternatives --display javac
$ java -versionApache Http Server Installation and mod_jk Configuration
Apache and MOD_JK installations should be done on the server.
sudo apt update
sudo apt install apache2
sudo systemctl status apache2
wget https://dlcdn.apache.org/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.48-src.tar.gz
sudo apt install apache2-dev
sudo a2enmod headers
tar xvf tomcat-connectors-1.2.48-src.tar.gz
cd tomcat-connectors-1.2.48-src/native/
./configure -with-apxs=/usr/bin/apxs
which apxs
make
sudo cp mod_jk.so /usr/lib/apache2/modules/After the installations are done, the mods_jk.conf file should be created under the /etc/apache2/mods-enabled directory as in the example below.
LoadModule jk_module "/usr/lib/apache2/modules/mod_jk.so"
JkWorkersFile /etc/apache2/conf-enabled/workers.properties
#JkShmFile /etc/apache2/logs/mod_jk.shm
JkLogFile /etc/apache2/logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
JkOptions +forwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"The workers.properties file should be created under the /etc/apache2/conf-enabled directory as in the following example.
worker.list=tds,status
# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=${PORT}
worker.node1.host=${IP}
worker.node1.type=ajp13
worker.node1.ping_mode=A
worker.node1.lbfactor=1
worker.node1.lbfactor=1
# Load-balancing behavior
worker.tds.type=lb
worker.tds.balance_workers=node1
worker.tds.sticky_session=1In the standalone.xml file of the relevant application, the ${PORT} information should be updated for the following parameter
<socket-binding name="ajp" port="${jboss.ajp.port:${PORT}}"/>Apache SSL Connection Configuration
Apache SSL mode must be ENABLED and the sites-available/test.conf file must be edited as follows. Syntax can be checked with the command "sudo apache2ctl configtest".
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName _
SSLEngine on
SSLCertificateFile {fullchain.pem_path}
SSLCertificateKeyFile {privkey.pem_path}
SSLProtocol ALL -SSLv2 -SSLv3
SSLVerifyClient none
SSLVerifyDepth 1
SSLHonorCipherOrder On
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
JkMount /tds/* tds
JkMount /tds tds
#JkUnMount /error/* tomcat_1
</VirtualHost>Wildfly Installation
Ubuntu Installation
sudo apt update -y
sudo apt upgrade -y
cd /3ds2apps && sudo wget https://github.com/wildfly/wildfly/releases/download/26.1.2.Final/wildfly-26.1.2.Final.tar.gz
sudo tar -xzvf wildfly-26.1.2.Final.tar.gz
sudo mv wildfly-26.1.2.Final /3ds2apps/wildfly
sudo groupadd wildfly
sudo useradd -r -g wildfly -d /3ds2apps/wildfly -s /sbin/nologin wildfly
sudo mkdir -p /etc/wildfly
sudo cp /3ds2apps/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
sudo cp /3ds2apps/wildfly/docs/contrib/scripts/systemd/launch.sh /3ds2apps/wildfly/bin/
sudo chown wildfly: /3ds2apps/bin/launch.sh
sudo cp /3ds2apps/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/The Wildfly service is created.
sudo nano /etc/systemd/system/wildfly.service
[Unit]
Description=The WildFly Application Server
After=syslog.target network.target
Before=httpd.service
[Service]
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1
EnvironmentFile=-/etc/wildfly/wildfly.conf
User=wildfly
Group=wildfly
LimitNOFILE=102642
PIDFile=/var/run/wildfly/wildfly.pid
ExecStart=/3ds2apps/wildfly/standalone/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_MANAGEMENT_CONSOLE_BIND
StandardOutput=null
[Install]
WantedBy=multi-user.targetThe wildfly.conf file is created.
sudo nano /etc/wildfly/wildfly.conf
# The configuration you want to run
WILDFLY_CONFIG=standalone.xml
# The mode you want to run
WILDFLY_MODE=standalone
# The address to bind to
WILDFLY_BIND=0.0.0.0
WILDFLY_MANAGEMENT_CONSOLE_BIND=0.0.0.0launch.sh file is created.
sudo nano /3ds2apps/wildfly/bin/launch.sh
#!/bin/bash
if [ "x$WILDFLY_HOME" = "x" ]; then
WILDFLY_HOME="/3ds2apps/wildfly"
fi
if [[ "$1" == "domain" ]]; then
$WILDFLY_HOME/bin/domain.sh -c $2 -b $3 -bmanagement $4
else
$WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement $4
fiAfter the changes, the service is "enable" and "started".
sudo systemctl daemon-reload
sudo systemctl enable wildfly
sudo systemctl start wildfly
sudo systemctl status wildflyIf the management gui is to be used, the user is added.
sudo /opt/wildfly/bin/add-user.sh
sudo systemctl restart wildflyTomcat Installation
Tomcat is downloaded using the wget command.
$ cd /tmp
$ wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.73/bin/apache-tomcat-9.0.73.tar.gz
$ sudo tar xzvf apache-tomcat-9.0.73.tar.gz -C /3ds2apps/tomcat9 --strip-components=1
$ sudo chown -R tomcat:tomcat /3ds2apps/tomcat/
$ sudo useradd -m -d /3ds2apps/tomcat9 -U -s /bin/false tomcat
$ sudo chmod -R u+x /3ds2apps/tomcat/binA Linux service is created for Tomcat.
$ sudo nano /etc/systemd/system/tomcat.service
WantedBy=multi-user.target
[Unit]
Description=Tomcat
After=network.target
[Service]
Type=forking
User=tomcat
Group=tomcat
Environment="JAVA_HOME=/usr/java/jdk1.8.0_171"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"
Environment="CATALINA_BASE=/3ds2apps/tomcat"
Environment="CATALINA_HOME=/3ds2apps/tomcat"
Environment="CATALINA_PID=/3ds2apps/tomcat/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"
ExecStart=/3ds2apps/tomcat/bin/startup.sh
ExecStop=/3ds2apps/tomcat/bin/shutdown.sh
RestartSec=10
Restart=always
[Install]
$ sudo systemctl daemon-reload
$ sudo systemctl start tomcat
$ sudo systemctl status tomcat
$ sudo systemctl enable tomcatDatabase Creation - Oracle
The 19C version of Oracle Database is installed on the relevant database server.
setup.sql is used to create a schema.
Application-specific tables and the necessary data in these tables are created by running the following scripts respectively.
01-V1_0_0_0__core_ddl.sql
02-V1_0_0_1__core_dml.sql
03-V1_0_1_1__core_ddl.sql
04-V1_0_2_0__core_dml.sql
05-V1_0_3_0__core_dml.sql
06-V1_0_3_1__core_ddl.sql
07-V1_0_4_0__core_ddl.sql
08-V1_0_5_0__core_dml.sql
09-V1_0_5_1__core_ddl.sql
10-V1_0_6_1__core_ddl.sql
11-V1_0_8_0__core_ddl.sql
12-V1_0_9_3__core_ddl.sql
Database Creation - PostgreSQL
PostgreSQL version 14.3 is installed on the relevant database server.
setup.sql is used to create a schema.
Application-specific tables and the necessary data in these tables are created by running the following scripts respectively.
01-V1_0_0_0__core_ddl.sql
02-V1_0_0_1__core_dml.sql
03-V1_0_1_1__core_ddl.sql
04-V1_0_2_0__core_dml.sql
05-V1_0_3_0__core_dml.sql
06-V1_0_3_1__core_ddl.sql
07-V1_0_4_0__core_ddl.sql
08-V1_0_5_0__core_dml.sql
09-V1_0_5_1__core_ddl.sql
10-V1_0_6_1__core_ddl.sql
11-V1_0_8_0__core_ddl.sql
12-V1_0_9_3__core_ddl.sql
App Installation - Wildfly
The application works with Java 8.
Wildfly Multi Instance Configuration
If you want to run more than one wildfly instance on a single server, the setting should be made as follows.
For example, if you want to run the 3DS Server application as a separate instance:
In standalone.xml, the management gui and the ports of the application are set.
A linux service is created for the 3DS Server application:
launch.sh is created for 3DS Server.
After the changes, the service is "enable" and "started".
If you want to run applications with different java versions, /3ds2apps/wildfly/bin/standalone.conf should also be edited.
Datasource Configuration
This section describes the Datasource configuration that the application will use.
OJDBC Jar Module
The Oracle Driver Jar file is downloaded.
/modules/system/layers/base/com/oracle/main/ file is created and the jar file is copied.
The following file is created in /modules/system/layers/base/com/oracle/main/.
module.xml
Jboss JNDI Datasource
Data Source is configured within the standalone.xml.
standalone.xml
The following is added to standalone.xml
Port ve Protocol Configuration
The application will communicate with the ajp protocol. To activate ajp protocol, the following is added to standalone.xml
Port/protocol configuration is done within standalone.xml
Uploading the war file
The war file must be uploaded to the /deployments directory.
Uploading the JKS file
The provided jks files must be uploaded to the /3ds2apps/conf/keystore directory.
Application Parameter Configuration
Application parameters must be passed during application execution.
This can be done by either;
Adding JAVA_OPTS="-Dkey1=value1 -Dkey2=value2 ..." to "standalone.sh"
By passing as parameter during the standalone.sh call; sh standalone.sh -Dkey1=value1 -Dkey2=value2
It can be defined as system parameters in the "system-properties" section in "standalone.xml".
App Installation - Tomcat
The application works with Java 8.
Tomcat Multi Instance Configuration
If you want to run more than one tomcat instance on a single server, the setting should be made as follows.
For example, if you want to run the 3DS Server application as a separate instance
A linux service is created for the 3DS Server application:
startup.sh is created.
After the changes, the service is "enable" and "started".
If you want to run applications with different java versions, /3ds2apps/tomcat9/instance/acs/scripts/startup.sh should be edited.
Tomcat Datasource
Data Source is configured within context.xml
context.xml
Port ve Protocol Configuration
The application will communicate with the ajp protocol. To activate ajp protocol, the following is added to server.xml
Uploading the war file
The war file must be uploaded to the /webapps directory.
Uploading the JKS file
The provided jks files must be uploaded to the /3ds2apps/conf/keystore directory.
Application Parameter Configuration
Application parameters must be passed during application execution.
This can be done by either;
Adding JAVA_OPTS="-Dkey1=value1 -Dkey2=value2 ..." to startup.sh
By passing as parameter during the startup.sh call; sh standalone.sh -Dkey1=value1 -Dkey2=value2
It can be defined as system parameters in "context.xml".
Last updated