Command line tools

From TempusServa wiki
Revision as of 13:43, 8 March 2021 by Tvi (Talk | contribs) (Compability)

Jump to: navigation, search


The scripts require the use of Tomcat application server, primarily for EC2 instances.

The shell tools are compatible with the following distributions

  • Amazon linux
  • Amazon linux 2
  • RedHat linux
  • CentOS linux

Other versions are likely compatible if they support yum installer.

JBoss tools are currently under development (no scheduled release date).

Usage information

The Tempus Serva Linux script tools are open source (LGPL), and you are free to use and modify them however you see fit. The tools are defined by all files with the .sh or .bat extension.

As the tools themselves are subject to semiautomatic upgrades, we strongly recommend that you keep backups of files you have modified. Future versions of the scripts are not guaranteed to be compatible, with earlier versions or your own modifications.

Installing the tools

Execute the following commands from youre UNIX command line

cd /usr/bin
sudo wget -N
sudo chmod 777

The tools are installed into /usr/bin, and made available for all users with access to the server.

For Amazon Linux 2 instances execute the following command

wget -qO - | bash

Tool reference

All script variables are controlled from a single file Variables: Paths for the installation and timezone localization


All installers will ensure that underlying depencies are installed too

  • Java
  • Tomcat
  • MySQL
  • MySQL driver
  • TrueType fonts

A check is completed before each install operation Installs Tempus Serva and all dependencies to /TempusServa and names databases: tslive, tstest, tsbase [application] Installs Tempus Serva and all dependencies to [application] and names the databases [application] + postfix: live, test, base Installs Tempus Serva and all dependencies to /TempusServa, files are saved to root home folder and names databases: tslive, tstest, tsbase

Update with newer version

During an upgrade the following operations are performed

  • Tomcat server is stopped
  • Database is backed up
  • Binaries are backed up
  • New binarys are installed (TempusServa.war)
  • New base definitions are imported (xxxbase database)

Note: Remember to start the server after upgrades Upgrades the /TempusServa default installation [application] Upgrades the application by the name [application] [application] Upgrades the application by the name [application] with a nightly build. The backup step is skipped, and the server is automatically started.

Note: Use in production environments at your own risc

System information Lists various informations
  • Memory use
  • Disk use
  • Installed applications
  • Running cron jobs [instance] Retrieves information from [instance] about user and solution names [search] Fetches information from Tomcat log files, that contains [search] Fetches information from Tomcat log files

Server maintanence Performs normal boot operations
  • Ensures data drive is mounted
  • Sets time and routing configuration
  • Starts both MySQL AND Tomcat Stops both MySQL AND Tomcat Starts both MySQL AND Tomcat Stops Tomcat and starts it again (use: patch, change connection string etc) Starts Tomcat Stops Tomcat Stops and starts Tomcat

Database access

Note the following scripts do not take care of firewalls etc. Creates remote user with DB access and prints credentials to screen Removes remote user and permissions

Other usefull scripts Backups the database and runtime of ALL applications [application] Backups the database and runtime of an application named [application] Check for updates and installs new versions of these scripts ( [source] [target] Make a complete copy of another solution (source)