Difference between revisions of "Legacy command line tools"
old>Admin |
m (Tvi moved page Command line tools to Legacy command line tools without leaving a redirect: Is now legacy, new stuff replaced it) |
||
(45 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== | == Compatibility == | ||
The scripts require the use of '''Tomcat application server''', primarily for EC2 instances. | |||
The shell tools are compatible with the following distributions | The shell tools are compatible with the following distributions | ||
* Amazon linux | * Amazon linux 2 | ||
* | * Ubuntu Server | ||
* CentOS linux | * RedHat/CentOS linux (experimental) | ||
Other versions are likely compatible if they support yum installer. | 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 == | == Installing the tools == | ||
Execute the following commands from | Execute the following commands from your UNIX command line | ||
<syntaxhighlight lang="bash"> | |||
cd /usr/bin | |||
sudo wget -N https://tempusserva.dk/install/amazon-linux2/script/tsrefreshscripts | |||
sudo chmod 777 tsrefreshscripts | |||
tsrefreshscripts | |||
</syntaxhighlight> | |||
The tools are installed into /usr/bin, and made available for all users with access to the server. | |||
The short-hand version to install the tools is: | |||
<syntaxhighlight lang="bash"> | |||
wget -qO - https://tempusserva.dk/scripts | bash | |||
</syntaxhighlight> | |||
== Quick Install == | |||
To quick-install the tools and setup TempusServa, run: | |||
<syntaxhighlight lang="bash"> | |||
wget -qO - https://tempusserva.dk/install/amazon-linux2/tsquickinstall | bash | |||
</syntaxhighlight> | |||
== Tool reference == | == Tool reference == | ||
All script variables are controlled from a single file | |||
{| | |||
|tsconfiguration | |||
|Variables: Paths for the installation and timezone localization | |||
|} | |||
=== Installation === | === Installation === | ||
Line 24: | Line 55: | ||
* Java | * Java | ||
* Tomcat | * Tomcat | ||
* | * MySQL | ||
* | * MySQL driver | ||
* TrueType fonts | * TrueType fonts | ||
Line 31: | Line 62: | ||
{| | {| | ||
|tsinstall | |tsinstall | ||
|Installs Tempus Serva and all dependencies to /TempusServa and names databases: tslive, tstest, tsbase | |Installs Tempus Serva and all dependencies to /TempusServa and names databases: tslive, tstest, tsbase | ||
|- | |- | ||
|tsinstallinstance | |tsinstallinstance [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 [application] and names the databases [application] + postfix: live, test, base | ||
|- | |- | ||
|tsquickinstall | |tsquickinstall | ||
|Installs Tempus Serva and all dependencies to /TempusServa, files are saved to root home folder | |Installs Tempus Serva and all dependencies to /TempusServa, files are saved to root home folder and names databases: tslive, tstest, tsbase | ||
|- | |||
|tsinstallnightly [application] | |||
|Installs Tempus Serva and all dependencies to [application] with a nightly build. And names the databases [application] + postfix: live, test, base | |||
'''Note: Use in production environments at your own risc''' | |||
|} | |} | ||
=== Update with newer version === | === Update with newer version === | ||
* | During an upgrade the following operations are performed | ||
* tsupgradeinstance | * Tomcat server is stopped | ||
* Database is backed up | |||
* Binaries are backed up | |||
* New binarys are installed (TempusServa.war) | |||
* New base definitions are imported ('''xxx'''base database) | |||
Note: Remember to start the server after upgrades | |||
{| | |||
|tsupgrade | |||
|Upgrades the /TempusServa default installation | |||
|- | |||
|tsupgradeinstance [application] | |||
|Upgrades the application by the name [application] | |||
|- | |||
|tsupgradebetatest [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 === | === System information === | ||
{| | {| | ||
|tsstatus | |tsstatus | ||
|Lists various informations | |Lists various informations | ||
* Memory use | * Memory use | ||
Line 56: | Line 109: | ||
* Running cron jobs | * Running cron jobs | ||
|- | |- | ||
|tslogsgrep | |||
|tsusageinfo [instance] | |||
|Retrieves information from [instance] about user and solution names | |||
|- | |||
|tslogsgrep [search] | |||
|Fetches information from Tomcat log files, that contains [search] | |Fetches information from Tomcat log files, that contains [search] | ||
|- | |- | ||
|tslogstail | |tslogstail | ||
|Fetches information from Tomcat log files | |Fetches information from Tomcat log files | ||
|} | |} | ||
Line 65: | Line 124: | ||
=== Server maintanence === | === Server maintanence === | ||
* | {| | ||
* tsstop | |tsboot | ||
|Performs normal boot operations | |||
* Ensures data drive is mounted | |||
* Sets time and routing configuration | |||
* Starts both MySQL AND Tomcat | |||
|- | |||
|tsstop | |||
|Stops both MySQL AND Tomcat | |||
|- | |||
|tsstart | |||
|Starts both MySQL AND Tomcat | |||
|- | |||
|tsrestart | |||
|Stops Tomcat and starts it again (use: patch, change connection string etc) | |||
|- | |||
|tstomcatstop | |||
|Starts Tomcat | |||
|- | |||
|tstomcatstart | |||
|Stops Tomcat | |||
|- | |||
|tstomcatrestart | |||
|Stops and starts Tomcat | |||
|} | |||
=== Database access === | === Database access === | ||
Note the following scripts do not take care of firewalls etc. | |||
{| | {| | ||
|tsmysqlremotestart | |tsmysqlremotestart | ||
|Creates remote user with DB access and prints credentials to screen | |Creates remote user with DB access and prints credentials to screen | ||
|- | |- | ||
|tsmysqlremotestop | |tsmysqlremotestop | ||
|Removes remote user and permissions | |Removes remote user and permissions | ||
|- | |- | ||
Line 86: | Line 166: | ||
{| | {| | ||
|tsbackupfull | |tsbackupfull | ||
|Backups the database and runtime of ALL applications | |Backups the database and runtime of ALL applications | ||
|- | |- | ||
|tsbackupinstance | |tsbackupinstance [application] | ||
|Backups the database and runtime of an application named [application] | |Backups the database and runtime of an application named [application] | ||
|- | |- | ||
|tsrefreshscripts | |tsrefreshscripts | ||
|Check for updates and installs new versions of these scripts (ts'''xxx'''.sh) | |Check for updates and installs new versions of these scripts (ts'''xxx'''.sh) | ||
|- | |||
|tscloneinstance [source] [target] | |||
|Make a complete copy of another solution (source) | |||
|} | |} | ||
== Removing the tools == | |||
Execute the following command from your UNIX command line | |||
<syntaxhighlight lang="bash"> | |||
wget -qO - https://tempusserva.dk/install/amazon-linux2/clean | sudo bash | |||
</syntaxhighlight> |
Latest revision as of 15:09, 21 December 2023
Compatibility
The scripts require the use of Tomcat application server, primarily for EC2 instances.
The shell tools are compatible with the following distributions
- Amazon linux 2
- Ubuntu Server
- RedHat/CentOS linux (experimental)
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 your UNIX command line
cd /usr/bin
sudo wget -N https://tempusserva.dk/install/amazon-linux2/script/tsrefreshscripts
sudo chmod 777 tsrefreshscripts
tsrefreshscripts
The tools are installed into /usr/bin, and made available for all users with access to the server.
The short-hand version to install the tools is:
wget -qO - https://tempusserva.dk/scripts | bash
Quick Install
To quick-install the tools and setup TempusServa, run:
wget -qO - https://tempusserva.dk/install/amazon-linux2/tsquickinstall | bash
Tool reference
All script variables are controlled from a single file
tsconfiguration | Variables: Paths for the installation and timezone localization |
Installation
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
tsinstall | Installs Tempus Serva and all dependencies to /TempusServa and names databases: tslive, tstest, tsbase |
tsinstallinstance [application] | Installs Tempus Serva and all dependencies to [application] and names the databases [application] + postfix: live, test, base |
tsquickinstall | Installs Tempus Serva and all dependencies to /TempusServa, files are saved to root home folder and names databases: tslive, tstest, tsbase |
tsinstallnightly [application] | Installs Tempus Serva and all dependencies to [application] with a nightly build. And names the databases [application] + postfix: live, test, base
Note: Use in production environments at your own risc |
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
tsupgrade | Upgrades the /TempusServa default installation |
tsupgradeinstance [application] | Upgrades the application by the name [application] |
tsupgradebetatest [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
tsstatus | Lists various informations
|
tsusageinfo [instance] | Retrieves information from [instance] about user and solution names |
tslogsgrep [search] | Fetches information from Tomcat log files, that contains [search] |
tslogstail | Fetches information from Tomcat log files |
Server maintanence
tsboot | Performs normal boot operations
|
tsstop | Stops both MySQL AND Tomcat |
tsstart | Starts both MySQL AND Tomcat |
tsrestart | Stops Tomcat and starts it again (use: patch, change connection string etc) |
tstomcatstop | Starts Tomcat |
tstomcatstart | Stops Tomcat |
tstomcatrestart | Stops and starts Tomcat |
Database access
Note the following scripts do not take care of firewalls etc.
tsmysqlremotestart | Creates remote user with DB access and prints credentials to screen |
tsmysqlremotestop | Removes remote user and permissions |
Other usefull scripts
tsbackupfull | Backups the database and runtime of ALL applications |
tsbackupinstance [application] | Backups the database and runtime of an application named [application] |
tsrefreshscripts | Check for updates and installs new versions of these scripts (tsxxx.sh) |
tscloneinstance [source] [target] | Make a complete copy of another solution (source) |
Removing the tools
Execute the following command from your UNIX command line
wget -qO - https://tempusserva.dk/install/amazon-linux2/clean | sudo bash