.log(ぽちろぐ)

退屈しているおっさんの日記

MacBook SnowLeopardにJavaの開発環境を作る(1)

     tomcat6をダウンロード。tar.gzを拾ってくる。ダブルクリックで展開。フォルダが出来たら、Applicationsに投げ入れる。このとき、フォルダ名をtomcat6とかにしておくとterminal叩くときにちょっと楽。
     tomcat6/conf/tomcat-users.xmlを弄る。managerが必要だからだ。
    <tomcat-users>
    <!--
      NOTE:  By default, no user is included in the "manager" role required
      to operate the "/manager" web application.  If you wish to use this app,
      you must define such a user - the username and password are arbitrary.
    -->
    <!--
      NOTE:  The sample user and role entries below are wrapped in a comment
      and thus are ignored when reading this file. Do not forget to remove
      <!.. ..> that surrounds them.
    -->
    <!--
      <role rolename="tomcat"/>
      <role rolename="role1"/>
      <user username="tomcat" password="tomcat" roles="tomcat"/>
      <user username="both" password="tomcat" roles="tomcat,role1"/>
      <user username="role1" password="tomcat" roles="role1"/>
    -->
    </tomcat-users>
    
    ↓↓↓↓↓↓↓↓↓↓↓
    <tomcat-users>
    <!--
      NOTE:  By default, no user is included in the "manager" role required
      to operate the "/manager" web application.  If you wish to use this app,
      you must define such a user - the username and password are arbitrary.
    -->
    <!--
      NOTE:  The sample user and role entries below are wrapped in a comment
      and thus are ignored when reading this file. Do not forget to remove
      <!.. ..> that surrounds them.
    -->
    <!--
      <role rolename="tomcat"/>
      <role rolename="role1"/>
      <user username="tomcat" password="tomcat" roles="tomcat"/>
      <user username="both" password="tomcat" roles="tomcat,role1"/>
      <user username="role1" password="tomcat" roles="role1"/>
    -->
    <role rolename="manager"/>
    <user username="root" password="root" roles="manager"/>
    </tomcat-users>
    
     windowsインストーラでは、インストール中にマネジャどうする?って事を聞いてくれる。便利とも言えるし、お節介とも言える。

     terminal起動。Applications/tomcat6/bin/に降りて、
    sh startup.sh
    を叩く。http://localhost:8080/tomcatが見れればインスト成功。TomcatManagerに、root/rootで入れることを確認したら、いったん
    sh shutdown.sh
    を叩いて終了させておく。

     eclipseを拾う。現時点での最新版は3.6Helios。
     日本語化Packを拾う。3.6用はリリースがまだっぽいけど、3.5用で行けた。windowsなら、Pleiadesオールインワンが使える。便利とも言えるし、お節介とも言える。

     tomcatPluginSeasarから。本家では消えてるけど、Seasarが保持してくれていることに感謝。

     Eclipse起動。環境設定は、メニューバー > 環境設定。普段使っているwindowsEclipseではウインドウ > Preferencesなのでちょっと戸惑うところ。tomcatルートを指定してやる。
     tomcatランチャーからtomcat起動。http://localhost:8080/tomcatが見れることを確認したら、開発環境が完成。