Skip to main content
Skip table of contents

Migrate application from Windows to Linux server

These instructions are only applicable for migrating the KeySurvey application v.10.0.3 Win/Ms SQL.

If you have earlier versions, check the Update from 9.6 to 10.0 MS Windows article.

To move your application from the Windows to the Linux server follow the steps below:

  1. Setup Linux virtual machine. SYSTEM HARDWARE & SOFTWARE REQUIREMENTS can be found here:

Technical Requirements for the Self-Hosting Deployment

  1. Download the following archive to Linux VM

ftp://keysurvey@ftp.keysurvey.com/upgrade/upgrade-keysurvey-standalone-10.0.3-lin-tomcat90-mysql.zip

Install instruction for keysurvey-standalone-10.0.3-lin-tomcat90-mssql

  1. Stop the Tomcat service on your Windows VM. Create database and application file backups.

  2. Create a new 'hosting' system group. In the system console or in the terminal program run the command:

CODE
shell> groupadd hosting
  1. Create a new 'catalina' system account that belongs to the 'hosting' group and home directory /hosting:

CODE
shell> mkdir /hosting
shell> useradd -d /hosting/keysurvey-standalone -s /bin/bash -g hosting catalina
  1. Extract 'keysurvey_app/keysurvey-standalone.zip' file from the installation package folder into the '/hosting' directory and establish access rights to it.

CODE
shell> cd /hosting
shell> unzip –qqo PATH_TO_INSTALLATION_FOLDER/keysurvey_app/keysurvey-standalone.zip
shell> chmod 755 /hosting /hosting/keysurvey-standalone

Folder 'keysurvey-standalone' should appear in the '/hosting' directory.

  1. Edit '/hosting/keysurvey-standalone/conf/tomcat-users.xml' file and change default login credentials to application system pages or you can copy those credentials from your Windows VM '/hosting/keysurvey-standalone.old/conf/tomcat-users.xml'

CODE
<user username="admin" password="password" roles="keysurveyadmin"/>
  1. Copy the contents from the Windows_VM: C:\hosting\keysurvey-standalone\keysurvey\user-data to Linux_VM: /hosting/keysurvey-standalone/keysurvey/user-data.

  2. Download config files from ftp://keysurvey@ftp.keysurvey.com/upgrade/keysurvey-standalone-10.0.3-lin-tomcat90-mssql-configs-only.zip
    Copy config.properties.lin.mssql.example.properties, change the file name to config.properties and place it in /hosting/keysurvey-standalone/keysurvey/ folder overwriting the existing file. Change all parameter values using the application config.properties from Windows VM.
    Copy application.yml.lin.mssql.example.properties, change the file name to application.yml and place it in /hosting/keysurvey-standalone/keysurvey/ folder overwriting the existing file. Change all parameter values using the application.yml config from Windows VM.

  3. Set access rights to the folders and files:

  • If you use operating system with SysV init system run the following:

CODE
shell> cd /hosting/keysurvey-standalone
shell> chown -R catalina:hosting conf logs temp work keysurvey/app-data keysurvey/user-data keysurvey/volatile-data
shell> chmod -R u+w,g-w,o-w logs temp work keysurvey/app-data keysurvey/user-data keysurvey/volatile-data
shell> chmod -R u+rX,g+rX conf logs temp work keysurvey/app keysurvey/app-data keysurvey/user-data keysurvey/volatile-data keysurvey/config.properties keysurvey/survey-remote-config.xml
shell> chmod a+x bin/*.sh
shell> cp /hosting/keysurvey-standalone/bin/catalina.init /etc/init.d/catalina
shell> chmod a+x /etc/init.d/catalina
  • If you use operating system with systemd init system  run the following:

CODE
shell> cd /hosting/keysurvey-standalone
shell> chown -R catalina:hosting conf logs temp work keysurvey/app-data keysurvey/user-data keysurvey/volatile-data
shell> chmod -R u+w,g-w,o-w logs temp work keysurvey/app-data keysurvey/user-data keysurvey/volatile-data
shell> chmod -R u+rX,g+rX conf logs temp work keysurvey/app keysurvey/app-data keysurvey/user-data keysurvey/volatile-data keysurvey/config.properties keysurvey/survey-remote-config.xml
shell> chmod a+x bin/*.sh
shell> cp /hosting/keysurvey-standalone/bin/catalina.service /etc/systemd/system/
shell> chmod 664 /etc/systemd/system/catalina.service
  1. Install JRE or JDK 11 Standard Edition.
    You can download new installer from Oracle (requires license agreement) <https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads5066655.html> or any latest build of open source Java 11.

  • If your application is installed into directory other than default /hosting, you will need to edit paths according to your system in the .sh files.

  1. In the '/hosting/keysurvey-standalone/bin/setenv.sh' file, edit value of 'JAVA_HOME' parameter. You should specify the directory where JRE or JDK package is installed. During the installation, RPM package of JRE/JDK usually creates a symbolic link '/usr/java/latest' to the folder of installed JRE/JDK. Key Survey installation has a preconfigured 'setenv.sh' file with 'JAVA_HOME=/usr/java/latest' setting. Thus, if you have installed RPM JRE/JDK package, no edits may be needed in '/hosting/keysurvey-standalone/bin/setenv.sh' file.

  2. If you use OS with systemd init system, run services reload and add catalina.service, so it starts automatically on system boot.

CODE
shell> systemctl daemon-reload
shell> systemctl enable catalina.service

Configure or disable Apparmor os SELinux security module.
https://apparmor.net/
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/using_selinux/getting-started-with-selinux_using-selinux

  1. Change IIS rules or configure any HTTP web reverse proxy server. Route client traffic through a reverse proxy to Linux VM with tomcat.

  2. Start Tomcat

CODE
shell> systemctl start catalina.service

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.