by shigemk2

当面は技術的なことしか書かない

MacでTomcatを使う

f:id:shigemk2:20131128211413p:plain

Mac(OS 10.7)、HomebrewでTomcatをインストール、Eclipseで開発 | abeerforyou.com

  1. brew update
  2. brew install tomcat
  3. .zshrc

(バージョンは人によって違うので適宜変えること)

export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home"
export CATALINA_HOME='/usr/local/Cellar/tomcat/7.0.47/libexec/'
  1. catalina start

でおk

なお、ポート番号を変えたいときは /usr/local/Cellar/tomcat/7.0.47/libexec/conf/server.xml 63行目くらい

    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8001" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />