Die im Folgenden rot dargestellten Texte sind durch die jeweils eigenen Wahlen für das Tomcat-Verzeichnis (hier: ~/tomcat) und den Port (hier: 12345) zu ersetzen. (Beachten Sie, dass zwei Server nicht denselben Port verwenden können. Sie müssen also evtl. ein bisschen experimentieren, bis Sie einen freien Port finden.)
Um einen eigenen Tomcat-Server im Verzeichnis ~/tomcat zu installieren, gehen Sie wie folgt vor:
theseus$ /home/sep2004/software/installed/jakarta-tomcat-4.1.30/install/install_tomcat.sh ~/tomcat 12345 Tomcat successfully installed theseus$Dann müsste folgendes Verzeichnis existieren:
theseus$ ls ~/tomcat/ bin conf logs shared temp webapps work theseus$Im Unterverzeichnis webapps des neu angelegten ~/tomcat-Verzeichnisses befinden sich die Standard-Webanwendungen:
theseus$ ls -R ~/tomcat/webapps/ tomcat/webapps/: ROOT admin.xml examples.xml manager.xml tomcat-docs webdav tomcat/webapps/ROOT: WEB-INF index.jsp jakarta-banner.gif tomcat-power.gif tomcat.gif tomcat/webapps/ROOT/WEB-INF: web.xml theseus$Den Server können Sie nun wie folgt starten:
theseus$ ~/tomcat/bin/startup Using CATALINA_BASE: /home/thales/jmayer/tomcat Using CATALINA_HOME: /home/sep2004/software/installed/jakarta-tomcat-4.1.30 Using CATALINA_TMPDIR: /home/thales/jmayer/tomcat/temp Using JAVA_HOME: /home/sep2004/software/installed/jdk1.5.0 theseus$Danach können Sie sich über die URL
http://theseus.mathematik.uni-ulm.de:12345/
Nach dem Arbeiten können Sie den Server wie folgt wieder "herunterfahren":
theseus$ ~/tomcat/bin/shutdown Using CATALINA_BASE: /home/thales/jmayer/tomcat Using CATALINA_HOME: /home/sep2004/software/installed/jakarta-tomcat-4.1.30 Using CATALINA_TMPDIR: /home/thales/jmayer/tomcat/temp Using JAVA_HOME: /home/sep2004/software/installed/jdk1.5.0 theseus$Nach einer kurzen Einarbeitung sollten Sie die Standard-Webanwendungen entfernen und in webapps alle symbolischen Links löschen und auch webapps/ROOT bis auf das Verzeichnis WEB-INF platt machen:
theseus$ cd ~/tomcat/webapps/ theseus$ ls ROOT admin.xml examples.xml manager.xml tomcat-docs webdav theseus$ rm admin.xml examples.xml manager.xml tomcat-docs/ webdav/ theseus$ ls ROOT theseus$ cd ROOT/ theseus$ ls WEB-INF index.jsp jakarta-banner.gif tomcat-power.gif tomcat.gif theseus$ rm index.jsp jakarta-banner.gif tomcat-power.gif tomcat.gif theseus$ ls WEB-INF theseus$ ls -R ~/tomcat/webapps/ tomcat/webapps/: ROOT tomcat/webapps/ROOT: WEB-INF tomcat/webapps/ROOT/WEB-INF: web.xml theseus$Nun können Sie mit einer ersten Indexseite in etwa wie folgt beginnen:
theseus$ cat ~/tomcat/webapps/ROOT/index.html <HTML> <HEAD> <TITLE>Meine erste Webseite</TITLE> </HEAD> <BODY> <B>Meine erste Webseite</B> </BODY> </HTML> theseus$
Die einzelnen Schritte nochmal in der Zusammenfassung:
theseus$ /home/sep2004/software/installed/jakarta-tomcat-4.1.30/install/install_tomcat.sh ~/tomcat 12345
theseus$ ~/tomcat/bin/startup
http://theseus.mathematik.uni-ulm.de:12345/
theseus$ ~/tomcat/bin/shutdown