Mohan Cheema's Online Diary

Site Just to Keep Track of My Day to Day Work.

In previous post we have setup Tomcat to run its multiple instances now we want that tomcat should start automatically on server reboots. This can bee achieved by adding tomcat service script.

Introduction

This document will teach us how to setup Tomcat to run as a service (startup when booted) on Linux.

Intended Audience: System admins.

Instructions to setup Tomcat to run as a service (startup when booted) on Linux.

It is actually easy and will be presented step by step.

1. Save tomcat start / stop script

Copy and paste the following script into text editor:

Introduction

This document will teach us how to setup Tomcat to run Multiple instances of it and run as a service (startup when booted) on Linux.

Intended Audience: System admins.

Instruction to installing Tomcat so that we can run multiple instances.

1. Install the Tomcat files

Download Tomcat and unzip it into an appropriate directory. I usually put it in /opt, so it ends up in a directory called /opt/apache-Tomcat-6.0.29 (6.0.29 being the current version as of this writing), and make a symlink named /opt/tomcat to that directory. When later versions come out, we can unzip them and relink, leaving the older version in case things don’t work out (which rarely if ever happens, but as system admins we are paranoid).

Often we need to list just the column name of the table without displaying the metadata. However, Until before MySQL 5.0 there was no way to get just the column names for any given table. Since MySQL 5.0 new table has been added information_schema. INFORMATION_SCHEMA provides access to database metadata.

Metadata is data about the data, such as the name of a database or table, the data type of a column, or access privileges. Other terms that sometimes are used for this information are data dictionary and system catalog.

As SVN admin we are asked to send an email to release managers and testers for all the commits made to the repository so that release managers can update their release sheet and testers can do the testing. This is small post-commit hook for SVN which sends out an email to release manager and testers.

#!/bin/sh

REPOS="$1"
REV="$2"

SVNLOOK=/usr/bin/svnlook

auth=`$SVNLOOK author -r $REV $REPOS`
dt=`$SVNLOOK date -r $REV $REPOS | sed 's/\,//g'`
changed=`$SVNLOOK changed -r $REV $REPOS`
log=`$SVNLOOK log -r $REV $REPOS`
n=$'\n'

LISTID="releasemanagers@yourdomain.com testers@yourdomain.com"

echo "$n $n====Status:PROJECT INTEGRATION svncommit: $DATTIM====$n Changeset [Revision ID ${REV}] by $auth.$n$n On Date $dt.$n$n With Comment $n$log.$n$n Files Changed$n $changed.$n $n" | mailx -s "New Commit in $REPOS" $LISTID

I hope this will be helpful for someone.

As SVN admin we need to make sure any commits made to the repository should have comments associated it with. The reason to have comments during commits is simple to know what has been fixed or what new has been added to the repository. Here is the simple shell script I have written to stop the commits if comments has not been added.

Blog WebMastered by All in One Webmaster.