Spam Addresses

I hate spam.  I really hate spam.  I guess everybody can relate to that.  I not only hate spam, but I don't like receiving correspondence from some website that made me register to view some content or post a message, some site that that I've ordered from or any other place that I've had to… Continue reading Spam Addresses

One Java init script to rule them all

Need an init script for a Java service? Like tomcat, liferay, or jboss?

Regular Linux init scripts often don't work so well. e.g. Java apps typically want to be run by a particular user (e.g. tomcat or liferay). e.g. They may require a 'special' shutdown mechanism (e.g. with Tomcat sending a signal to a particular port).

So over the years I have had a handy-dandy script that can control most of my most commonly used Java apps (liferay, tomcat, jboss).

It does things like start up the app as a particular user. Checks to ensure the app is responding on a URL before saying it is stared. Waits for the app to shutdown gracefully, else forces it to quit. And provides kill and killstart commands when you're developing and just want the thing restarted!

This morning I updated it to use the lsb logging methods. So the output is a bit prettier than the 'old' echo's we used to use.

The current version of the file will live at http://proj.ri.mu/javainitscript

To use it wget that to the /etc/init.d directory on your server. Then rename (or symlink) it to the service you want to control. Currently the tomcat, liferay and jboss names are supported.

Some excerpts from the script follow...

Got Backups?

Backup your data.  That's something that's repeated over and over and yet too many people don't really take it to heart.  If you've lost data in the past, I be that you're backing up now like it's a religion.  If you're not backing up, maybe you've never lost any data or maybe it's just something… Continue reading Got Backups?

Introduction to the new Linux Sysadmin

Recently we have had a few support requests come through from people who are new to Linux, and are unsure how to maintain a server at all. Package Management If your Linux distro is RedHat based (ie Centos, , then you will be using yum and RPM.   RPM is for doing individual package manipulation (installing,… Continue reading Introduction to the new Linux Sysadmin