13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

20.5 Things That Make It Go451TIPAt this point we suggest using <strong>on</strong>e more <strong>Linux</strong> filesystem trick. The tarball unpacksinto a directory whose name includes the product versi<strong>on</strong>—in this case,jboss-3.2.3. In many cases, you will want to be able to have more than <strong>on</strong>eversi<strong>on</strong> of JBoss installed <strong>on</strong> a box simultaneously, either because you need toport projects from <strong>on</strong>e versi<strong>on</strong> to another, or perhaps because you need to developapplicati<strong>on</strong>s that will run <strong>on</strong> different versi<strong>on</strong>s <strong>on</strong> different target servers.To make your life easier, create a symbolic link to a generically named directory,such as jboss, and have that symlink point to jboss-3.2.3. Then you canwrite your startup and shutdown scripts to use the jboss pathname. You canthen switch to another versi<strong>on</strong> by changing where the symlink points:$ cd /usr/local$ ln -s jboss-3.2.3 jbossThis process is discussed in detail in Secti<strong>on</strong> 6.2 in the c<strong>on</strong>text of switchingbetween Java SDK versi<strong>on</strong>s.20.5THINGS THAT MAKE IT GOIn order to explain how to integrate an Open Source applicati<strong>on</strong> server intoyour system, we have to do a little <strong>Linux</strong> Sysadmin training. We need to showyou how server processes are generally managed <strong>on</strong> <strong>Linux</strong> systems.20.5.1 System V Init SystemVirtually all <strong>Linux</strong> distributi<strong>on</strong>s use some variant of the System V init systemto create and customize programs and services that run at the startup of thebox. Now, we d<strong>on</strong>’t want to write a <strong>Linux</strong> system administrati<strong>on</strong> manual, butwe do need to tell you enough to decide how to make JBoss available whenneeded <strong>on</strong> your server.The core of the System V init system is the /etc/inittab file. Everythingelse devolves from this c<strong>on</strong>figurati<strong>on</strong> file. In the days before network services,the primary startup tasks were to get getty programs running and then run asingle startup shell script. The /etc/inittab file handles these tasks beautifully.Since then, the world of UNIX and <strong>Linux</strong> has become a complex mixtureof client-server programs and protocols, so a complex set of c<strong>on</strong>venti<strong>on</strong>s hasbeen developed to turn the primitive /etc/inittab into a much richer set of

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!