The SmartWeb platform is implemented in the Java EE, that is why it needs for its running also installed and configured Java Runtime Environment version 8.
Installation steps are the following:
Installation steps for the Wildfly application server are the following:
D2000_EXE/web
, there are zip installation files of the application server Wildfly (wildfly.zip
) and also Java EE applications SmartWeb (smartweb.zip
) and tutorial of the Javascript application (tutorial-application.zip
). It is necessary to unzip all these archives into the same directory. D2000_EXE/web/installWildfly.bat,
the application server is automatically installed as Windows Service with the name: D2000 SmartWeb
.D2000_EXE/web/installSmartWeb.bat,
the SmartWeb application is automatically deployed also with the predefined configuration of the Javascript tutorial application to an application server.D2000_EXE/web/install_files/D2000
directory. The SmartWeb platform is implemented in the Java EE, and that is why it needs for its running installed and configured Java Runtime Environment version 8. On Linux, we can install by the commands through package manager under the root user. For the Ubuntu distribution, the commands are the following:
add-apt-repository ppa:webupd8team/java # linking repositories with the java packages apt-get update apt-get install oracle-java8-set-default |
For the use of stronger cipher suites in the HTTPS protocol, it is necessary to download the Java Cryptography Extension (JCE) extension by the following command:
apt install oracle-java8-unlimited-jce-policy |
Installation steps for the Wildfly application server are the following:
Unpacking installation files - in the installation directory /opt/D2000/web
(or in another directory, it depends on the place of D2000 installation or else copying of the web directory). In this directory, there are zip installation files of the application server Wildfly (wildfly.zip
) and also Java EE applications SmartWeb (smartweb.zip
) and tutorial of the Javascript application (tutorial-application.zip
). It is necessary to unzip all these archives into the same directory, for example by this command:
cd /opt/D2000/web unzip *.zip -d . |
Creating of the user wildfly
- for security reasons, it is convenient for Wildfly to run on Linux under an independent user that needs to be first created. In the following script, we create a group and the user wildfly
, and we assign the user as an owner of the directory /opt/D2000/web
groupadd -r wildfly useradd -r -g wildfly -d /opt/D2000/web -s /sbin/nologin wildfly. chown -R wildfly:wildfly /opt/D2000/web |
3. Installing the application server Wildfly - by running the installation script /opt/D2000/web/installWildfly.sh
with parameters with one-word service identifier (for example DEMO) and a port offset (moving ports for the case if more application servers are running on a server). Running of the script is possible in the following manner:
cd /opt/D2000/web chmod +x *.sh ./installWildfly.sh DEMO 0 |
4. Installing the SmartWeb Java EE application - by running installation script /opt/D2000/web/installSmartWeb.sh,
the SmartWeb application is automatically deployed also with the predefined configuration of the Javascript tutorial application to an application server.
5. Importing to D2000 - the process SELF.DCS with the basic configuration D2Connector and a configuration of objects for Javascript tutorial application from D2000_EXE/web/install_files/D2000
directory.
6. Running of SELF.DCS (D2Connector) and the application server Wildfly by the command:
systemctl start wildfly-DEMO |
7. Opening of the tutorial application in a browser - for example the address: http://localhost:8080/smartWeb.
The general difference between configuration on Linux and Windows is that on Linux, the process of the application server cannot occupy directly ports 80/443 (HTTP/HTTPS) for security. It is solved by redirecting default ports 8080/8443 through IPTABLES in the following manner:
Iptables -t nat -A PREROUTING -i eth0 -p tcp -dport 80 -j REDIRECT --to-port 8080 Iptables -t nat -A PREROUTING -i eth0 -p tcp -dport 443 -j REDIRECT --to-port 8443 |