Tomcat8
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
&tag(Tomcat8);
*目次 [#n905ade5]
#contents
*関連ページ [#h82b27a2]
-[[Tomcat7]]
*参考情報 [#j1b65c63]
*Yosemiteにインストール [#h400db0c]
**ダウンロード [#k2fcd6e6]
-[[Apache Tomcat - Welcome!:http://tomcat.apache.org/]]よ...
-/opt/home以下に展開
gzcat apache-tomcat-8.0.18.tar.gz | (cd /opt/home; tar x...
-symlinkを貼っておく
cd /opt/home
ln -s apache-tomcat-8.0.18 tomcat
-試しに起動。http://localhost:8080にアクセスできればOK。
cd /opt/home/tomcat/bin
./startup.sh
※ただしJavaはJava8じゃないと起動しない。
**自動起動設定 [#f3550dd2]
-/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 JAVA_HOME=$(/usr/libexec/java_home -v1.8)
export CATALINA_HOME=/opt/home/tomcat
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`
}}
-/opt/home/apache-tomcat-8.0.18のパーミッションを_www._ww...
-/Library/LaunchDaemons/org.apache.tomcat.plistを作成する...
#pre{{
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0/...
<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-launch...
</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.stder...
<key>StandardOutPath</key>
<string>/Library/Tomcat/logs/tomcat-launchd.stdou...
<key>UserName</key>
<string>_appserver</string>
</dict>
</plist>
}}
-launchctlで設定
sudo launchctl load -w /Library/LaunchDaemons/org.apache...
終了行:
&tag(Tomcat8);
*目次 [#n905ade5]
#contents
*関連ページ [#h82b27a2]
-[[Tomcat7]]
*参考情報 [#j1b65c63]
*Yosemiteにインストール [#h400db0c]
**ダウンロード [#k2fcd6e6]
-[[Apache Tomcat - Welcome!:http://tomcat.apache.org/]]よ...
-/opt/home以下に展開
gzcat apache-tomcat-8.0.18.tar.gz | (cd /opt/home; tar x...
-symlinkを貼っておく
cd /opt/home
ln -s apache-tomcat-8.0.18 tomcat
-試しに起動。http://localhost:8080にアクセスできればOK。
cd /opt/home/tomcat/bin
./startup.sh
※ただしJavaはJava8じゃないと起動しない。
**自動起動設定 [#f3550dd2]
-/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 JAVA_HOME=$(/usr/libexec/java_home -v1.8)
export CATALINA_HOME=/opt/home/tomcat
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`
}}
-/opt/home/apache-tomcat-8.0.18のパーミッションを_www._ww...
-/Library/LaunchDaemons/org.apache.tomcat.plistを作成する...
#pre{{
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0/...
<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-launch...
</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.stder...
<key>StandardOutPath</key>
<string>/Library/Tomcat/logs/tomcat-launchd.stdou...
<key>UserName</key>
<string>_appserver</string>
</dict>
</plist>
}}
-launchctlで設定
sudo launchctl load -w /Library/LaunchDaemons/org.apache...
ページ名: