淡々と進めるTomcatのインストール
OS X Lion へapache tomcat 6 のインストール手順
1. バイナリのダウンロード
http://tomcat.apache.org/download-60.cgi
6.0.35のtar.gz版
2. インストール
$ tar xzvf apache-tomcat-6.0.35.tar.gz $ mkdir /usr/local/tomcat $ mv apache-tomcat-6.0.35 /usr/local/tomcat $ ln -s /usr/local/tomcat/apache-tomcat-6.0.35 /usr/local/tomcat/current
3. JAVA_HOMEの設定
homeディレクトリの .bash_profile に記載済みだったので何もせず。
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
4. 権限の付与(所有者の変更)
$ sudo chown -R username:staff apache-tomcat-6.0.35 $ sudo chown -R KazukiMurakami:staff current
5. tomcat 実行
$ sudo /usr/local/tomcat/current/bin/startup.sh Using CATALINA_BASE: /usr/local/tomcat/current Using CATALINA_HOME: /usr/local/tomcat/current Using CATALINA_TMPDIR: /usr/local/tomcat/current/temp Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
http://localhost:8080/ でアクセス
6. tomcat 停止
停止しておかないと、EclipseからTomcatを起動できなかった。
$ sudo /usr/local/tomcat/current/bin/shutdown.sh Password: Using CATALINA_BASE: /usr/local/tomcat/current Using CATALINA_HOME: /usr/local/tomcat/current Using CATALINA_TMPDIR: /usr/local/tomcat/current/temp Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home Using CLASSPATH: /usr/local/tomcat/current/bin/bootstrap.jar
以上