岸辺のAlbum

teenstの日記

macportsでtomcat6をインストール

参考にしたのは,講義で配布された設定資料(ただし,Linux環境用)

とりあえず,落とさないと話にならない気がしたのでターミナルより,

TeensMac:~ teens$ sudo port install tomcat6

# setting up needed dirs
# installing tomcat...
# adding the jstl libs 
# maint. empty dirs... 
# adding our scripts 
# adding our scripts 2
      • > Creating launchd control script
########################################################### # A startup item has been generated that will aid in # starting tomcat6 with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/org.macports.tomcat6.plist ###########################################################
      • > Installing tomcat6 @6.0.18_0
# # Configuration files in /opt/local/share/java/tomcat6/conf have been # installed with a .sample extension so that they won't be replaced by a # port update. Each will be copied to its proper location during the # first startup of tomcat by catalina.sh or tomcatctl if you don't # do this yourself first. If this _is_ an update, you might do a diff to # verify that you're not missing anything in the newer .sample versions # of these files. # # The script /opt/local/share/java/tomcat6/bin/tomcatctl has been installed to # facilitate start and stop of tomcat using the jsvc utility, which allows you to # start tomcat as a true daemon process. Once tomcat has acquired its TCP socket, # jsvc will drop its root privileges and run as user www. # # Under Apple Java, control over the Java version used to launch tomcat6 is # through the shell variable JAVA_JVM_VERSION. This variable should be set # to a java version such as 1.4, 1.5, or CurrentJDK (for the default version). # You may set JAVA_JVM_VERSION in /opt/local/share/java/tomcat6/bin/setenv.sh. #
      • > Activating tomcat6 @6.0.18_0
      • > Cleaning tomcat6

コメントがだらだら書いてあるが,俺は英語が読めないので,ググると,いろいろと設定をしなければならないらしい.

とりあえずCATALINA_HOMEを通そうかと思い,.profileを更新するも,echoで返ってこない.
どうも.bash_profileがある状態だと,.profileは読まれないらしい.知らなかった.
とりあえず,bashを使うつもりなので,.bash_profileを更新.



追記
macportsでやろうとしたが,パーミッションの設定で挫けたりしたので,一回アンインストールした.

そしてhttp://lab.sb-software.jp/?p=195を参考にして,素直にホームディレクトリ以下に
インストールした
正直なところ,Tomcatがよくわかってない状態で入れようとしたのがよくなかったのだと思いましたとさ.