Making It Turn-Key

As you're cleaning things up, you also should make sure that the application starts up automatically if the server reboots. This is a relatively straightforward operation under UNIX: You just create a series of files in /etc/init.d and link them to the appropriate /etc/rc.d directories; and things will just start up when init is run. Testing them is a different matter because the only real test is to reboot the machine. Don't assume that things will work without doing this test. For example, the Tomcat startup.sh requires JAVA_HOME to be set. If that is set in your environment, it will work fine when you invoke the init.d script from the shell. However, it will fail if it's not in the script or if it is set by root's environment. ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.