Difference between pages "Command line cheat sheet" and "Legacy command line tools"

From TempusServa wiki
(Difference between pages)
Jump to navigation Jump to search
old>Admin
 
old>Admin
 
Line 1: Line 1:
== MySQL commands ==
== Compability ==
The shell tools are compatible with the following distributions
* Amazon linux
* RedHat linux
* CentOS linux


Import data from a SQL dump file to a specific database:
Other versions are likely compatible if they support yum installer.
<blockquote>
mysql -uroot -pPW1234 --default_character_set utf8 tslive < dumpLive.sql
</blockquote>


Export data to SQL dump file from selected databases
== Installing the tools ==
<blockquote>
mysql -uroot -pPW1234 --databases tslive tstest tsbase > dump.sql
</blockquote>


== LINUX Start and stop ==
Execute the following commands from youre UNIX command line


Start services
# cd /usr/bin
<blockquote>sudo service mysqld start</blockquote>
# sudo wget -N http://www.tempusserva.dk/deploy/amazon-tomcat7/tsrefreshscripts.sh
<blockquote>sudo /etc/init.d/tomcat6 start</blockquote>
# sudo chmod 777 tsrefreshscripts.sh
# tsrefreshscripts.sh


Stop services
The tools are installed into /usr/bin, and made available for all users.
<blockquote>sudo /etc/init.d/tomcat6 stop</blockquote>
<blockquote>sudo service mysqld stop</blockquote>


== Tomcat linux ==
== Tool reference ==


Edit connection string
=== Installation ===
<blockquote>
sudo nano /usr/share/tomcat/conf/Catalina/localhost/TempusServa.xml
</blockquote>


Edit server settings
{|
<blockquote>
|tsinstall.sh
sudo nano /usr/share/tomcat/conf/server.xml
|Installs Tempus Serva and all dependencies to /TempusServa and names databases: tslive, tstest, tsbase
</blockquote>
|-
|tsinstallinstance.sh&nbsp;[application]
|Installs Tempus Serva and all dependencies to [application] and names the databases [application] + postfix: live, test, base
|-
|tsquickinstall.sh
|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 ===
 
* tsupgrade.sh
* tsupgradeinstance.sh [application]
 
=== System information ===
 
{|
|tsstatus.sh
|Lists various informations
* Memory use
* Disk use
* Installed applications
* Running cron jobs
|-
|tslogsgrep.sh&nbsp;[search]
|Fetches information from Tomcat log files, that contains [search]
|-
|tslogstail.sh
|Fetches information from Tomcat log files
|}
 
=== Server maintanence ===
 
* tsboot.sh
* tsstop.sh
* tsstart.sh
* tsrestart.sh
* tstomcatstop.sh
* tstomcatstart.sh
 
=== Database access ===
 
{|
|tsmysqlremotestart.sh
|Creates remote user with DB access and prints credentials to screen
|-
|tsmysqlremotestop.sh
|Removes remote user and permissions
|-
|}
 
=== Other usefull scripts ===
 
{|
|tsbackupfull.sh
|Backups the database and runtime of ALL applications
|-
|tsbackupinstance.sh&nbsp;[application]
|Backups the database and runtime of an application named [application]
|-
|tsrefreshscripts.sh
|Check for updates and installs new versions of these scripts (ts'''xxx'''.sh)
|}

Revision as of 14:13, 3 March 2013

Compability

The shell tools are compatible with the following distributions

  • Amazon linux
  • RedHat linux
  • CentOS linux

Other versions are likely compatible if they support yum installer.

Installing the tools

Execute the following commands from youre UNIX command line

  1. cd /usr/bin
  2. sudo wget -N http://www.tempusserva.dk/deploy/amazon-tomcat7/tsrefreshscripts.sh
  3. sudo chmod 777 tsrefreshscripts.sh
  4. tsrefreshscripts.sh

The tools are installed into /usr/bin, and made available for all users.

Tool reference

Installation

tsinstall.sh Installs Tempus Serva and all dependencies to /TempusServa and names databases: tslive, tstest, tsbase
tsinstallinstance.sh [application] Installs Tempus Serva and all dependencies to [application] and names the databases [application] + postfix: live, test, base
tsquickinstall.sh 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

  • tsupgrade.sh
  • tsupgradeinstance.sh [application]

System information

tsstatus.sh Lists various informations
  • Memory use
  • Disk use
  • Installed applications
  • Running cron jobs
tslogsgrep.sh [search] Fetches information from Tomcat log files, that contains [search]
tslogstail.sh Fetches information from Tomcat log files

Server maintanence

  • tsboot.sh
  • tsstop.sh
  • tsstart.sh
  • tsrestart.sh
  • tstomcatstop.sh
  • tstomcatstart.sh

Database access

tsmysqlremotestart.sh Creates remote user with DB access and prints credentials to screen
tsmysqlremotestop.sh Removes remote user and permissions

Other usefull scripts

tsbackupfull.sh Backups the database and runtime of ALL applications
tsbackupinstance.sh [application] Backups the database and runtime of an application named [application]
tsrefreshscripts.sh Check for updates and installs new versions of these scripts (tsxxx.sh)