Training, Open Source computer languages

PerlPHPPythonMySQLhttpd / TomcatTclRubyJavaC and C++LinuxCSS

Search our site for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Browser -> httpd -> Tomcat -> MySQL. Restarting.
I've just completed a course covering the installation and configuration of Apache httpd, Apache Tomcat and MySQL. Complete with a demonstration that has the newly installed systems visited from various browsers, talking to httpd, which talks on to Tomcat, which talks on in turn to MySQL. The MySQL responses are handled by the Servlets and JSPs running on Tomcat, and returned via the masking Apache httpd that's used for the majority of the web site on the chosen domain. This might all sound very complicated, but it's actually what happens on so many web sites which, no doubt, is why there's such a call for our deployment course.

And what happens when the server is restarted? Well - you had better make sure that all the services start up properly, hadn't you?

On a Linux / Unix system, you can add scripts that are to be run during system startup, typically to start server processes known as daemons, to the directory /etc/init.d. These scripts should understand (as a minium) a command line parameter "start" to do everything needed to start the service, and "stop" to do everything needed to stop the service. And it's no co-incicence that modern versions of apache httpd ship with a utility called apachectl that accepts these argument, apache tomcat ships with catalina.sh which also accepts these parameters, and there'a a utility script in mysql's script directory that does the same thing for that daemon.

So it that all you need to know? Not quite! Just placing the scripts into /etc/init.d does NOT cause them to be run; on system startup, when entering full multi-user mode (run state 3) or multiuser mode with windows (run state 5), Linux / unix go through the directory /etc/rc3.d (or rc5.d, or /etc/init.d/rc3.d etc ... depending on the Linux flavour) and run every file starting with the letter S in asciibetic order. Now - you do not want to copy the scripts from init.d to those other directories so the whole thing is set up by filling the "rc" directories with a series of symbolic links back to /etc/init.d. That way, you can turn daemons on and off just by adding and removing links - a very neat scheme indeed.

Here's an example of such a link in /etc/init.d/rc3.d (on a SuSE system)

lrwxrwxrwx 1 root root 10 2006-10-27 14:38 S19apache2 -> ../apache2

and that could be set up by a command such as

ln -s ../apache2 apache2

of using the chkconfig utility that's provided to help with tasks such as this ... but that's an extended story for another day!
(written 2006-10-28 10:17:23)

 
Associated topics are indexed under
A164 - Web Application Deployment - Services and Regular Jobs
A602 - Web Application Deployment - Apache httpd - Sourcing, Installation, Testing
A654 - Web Application Deployment - Configuring and Controlling Tomcat
S153 - Sourcing, Running and Configuring MySQL

Back to
A commitment we won't be making
Previous and next
or
Horse's mouth home
Forward to
And so to Inverness

Some other Articles
Letter Home
Helping the miles pass
Python is like a narrowboat
And so to Inverness
Browser -> httpd -> Tomcat -> MySQL. Restarting.
A commitment we won't be making
Not proud to be British
Of course I'll tell you by email
Pieces of Python
Brand new hotel and training centre, Melksham
1638 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2008: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho