&tag(Tomcat7); *目次 [#pc8c3575] #contents *関連ページ [#e8bac8dc] *参考情報 [#vce1c47c] *Mavericksにインストール [#y7b64e67] **参考情報 [#adff3c00] -[[TomcatInstallationMacOSX - gbif-providertoolkit - A Java web application for publishing biodiversity data on the web and the GBIF network - Google Project Hosting:https://code.google.com/p/gbif-providertoolkit/wiki/TomcatInstallationMacOSX]] **ダウンロード [#l3a81d65] -[[Apache Tomcat - Welcome!:http://tomcat.apache.org/]]より、apache-tomcat-7.0.53.tar.gzをダウンロード。 -/opt/home以下に展開 zcat apache-tomcat-7.0.53.tar.gz | (cd /opt/home; tar xvpf - ) -symlinkを貼っておく cd /opt/home ln -s apache-tomcat-7.0.53 tomcat -試しに起動。http://localhost:8080にアクセスできればOK。 cd /opt/home/tomcat ./startup.sh **自動起動設定 [#gdfd39c9] -/opt/home/tomcat/bin/tomcat-launchd.shを作成する(参考サイトと同じ)。 #pre{{ #!/bin/sh # # Wrapper for running Tomcat under launchd # Required because launchd needs a non-daemonizing process function shutdown() { $CATALINA_HOME/bin/shutdown.sh /bin/rm $CATALINA_PID } function wait_for_death() { while /bin/kill -0 $1 2> /dev/null ; do sleep 2 done } export CATALINA_PID=$CATALINA_HOME/logs/tomcat.pid $CATALINA_HOME/bin/startup.sh trap shutdown QUIT ABRT KILL ALRM TERM TSTP sleep 2 wait_for_death `cat $CATALINA_PID` }} -/Library/LaunchDaemons/org.apache.tomcat.plistを作成する。CATALINA_HOMEは/opt/home/tomcatに変更する。 #pre{{ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.apache.tomcat</string> <key>Disabled</key> <false/> <key>OnDemand</key> <false/> <key>RunAtLoad</key> <true/> <key>ProgramArguments</key> <array> <string>/Library/Tomcat/bin/tomcat-launchd.sh</string> </array> <key>EnvironmentVariables</key> <dict> <key>CATALINA_HOME</key> <string>/opt/home/tomcat</string> <key>JAVA_OPTS</key> <string>-Djava.awt.headless=true</string> </dict> <key>StandardErrorPath</key> <string>/Library/Tomcat/logs/tomcat-launchd.stderr</string> <key>StandardOutPath</key> <string>/Library/Tomcat/logs/tomcat-launchd.stdout</string> <key>UserName</key> <string>_appserver</string> </dict> </plist> }} -launchctlで設定 sudo launchctl load -w /Library/LaunchDaemons/org.apache.tomcat.plist