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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

468Chapter 20Open Source Web <str<strong>on</strong>g>Applicati<strong>on</strong></str<strong>on</strong>g> Servers20.9RUNNING THE GERONIMO SERVERGetting the Ger<strong>on</strong>imo server up and running is simply a matter of running aJava applicati<strong>on</strong> c<strong>on</strong>tained in the server.jar file in the bin directory.$ cd /usr/local/ger<strong>on</strong>imo$ java -jar bin/server.jar org/apache/ger<strong>on</strong>imo/ServerThat last parameter looks like a pathname, but it isn’t. It is a c<strong>on</strong>figurati<strong>on</strong>ID which just uses the pathname-like syntax as a namespace, to be unique toGer<strong>on</strong>imo (by virtue of the /org/apache/ger<strong>on</strong>imo prefix). That name tellsthe server which of the several possible c<strong>on</strong>figurati<strong>on</strong>s you want to use. Formore informati<strong>on</strong> <strong>on</strong> the other c<strong>on</strong>figurati<strong>on</strong>s, refer to the Ger<strong>on</strong>imo Wiki. 20Having <strong>on</strong>ce invoked a particular c<strong>on</strong>figurati<strong>on</strong>, you need not repeat thatc<strong>on</strong>figurati<strong>on</strong> choice <strong>on</strong> subsequent invocati<strong>on</strong>s. That means that the next timeyou run Ger<strong>on</strong>imo, you can just use:$ java -jar bin/server.jarIf you want to put this in a startup script you’ll want to use the fullspecificati<strong>on</strong>, so as to be absolutely sure what you are getting.To stop the server invoked from a command line, simply type C<strong>on</strong>trol-C.If the server was invoked from a startup script, you will need to find its processID (e.g., with the ps command) and use the <strong>Linux</strong> kill command to send ita signal.20.10REVIEWIn this chapter we have looked at the installati<strong>on</strong> of both the JBoss andGer<strong>on</strong>imo Java applicati<strong>on</strong> servers <strong>on</strong> a <strong>Linux</strong> platform. For both of these OpenSource servers installati<strong>on</strong> was little more than getting the JAR files in a usablelocati<strong>on</strong>. We reviewed the System V init system and explained how to add JBossto the regular system of services <strong>on</strong> your <strong>Linux</strong> box. We showed you how touse groups and permissi<strong>on</strong>s to enable a number of n<strong>on</strong>root users to do the basicapplicati<strong>on</strong> server administrati<strong>on</strong>.20. http://wiki.apache.org/ger<strong>on</strong>imo/

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

Saved successfully!

Ooh no, something went wrong!