JBossのインストール

 やっぱEJB3.0で遊ぶ為には 4.0.3が必要だな〜と思ってFreeBSD Ports: Javaを見ると既に4.0.3がありました。

tmkbsd# cd /usr/ports/java/jboss4
tmkbsd# make install clean
--snip--

jboss-4.0.3 has been installed in /usr/local/jboss4.

If a user should be able to use jboss4ctl, put it in the group 'www'.

Use 'man jboss4ctl' for information about starting and stopping JBoss.

To run the JBoss server from startup, add jboss4_enable="YES" in your /etc/rc.conf.
Extra options can be found in the startup script.
===>   Compressing manual pages for jboss-4.0.3
===>   Registering installation for jboss-4.0.3
===> SECURITY REPORT:
      This port has installed the following binaries which execute with
      increased privileges.
/usr/local/bin/jboss4ctl

      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.

      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.jboss.org/

で、あっさりとインストール出来ました。man jboss4ctlを読むと/usr/local/etc/rc.d/020.jboss4.shを呼んでいるみたいなので、読んでみると、


# Add the following lines to /etc/rc.conf to enable jboss4:
# jboss4_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable jboss4
# jboss4_flags (str): Set to "-server" by default.
# Extra JVM flags.
# jboss4_config (str): Set to "" by default

次回Server起動時にJBossも起動させる為に/etc/rc.confへ
jboss4_enable="YES"

jboss_flags="-server"

jboss4_config=""

を追加し、/usr/local/bin/jboss4ctl -q -server startで起動を掛けてみる。/usr/local/jboss4/server/default/logにあるboot.log,server.logを見てみると特にJava関連でのエラーは出ていないようた。boot.logには


Java version: 1.5.0-p2,Sun Microsystems Inc.
Java VM: Java HotSpot(TM) Server VM 1.5.0-p2-root_19_oct_2005_22_07,Sun Microsystems Inc.
OS-System: FreeBSD 5.4-RELEASE,i386
Full System Properties Dump
java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition
jboss.server.base.dir: /usr/local/jboss4/server
java.protocol.handler.pkgs: org.jboss.net.protocol
sun.boot.library.path: /usr/local/jdk1.5.0/jre/lib/i386
jboss.server.lib.url: file:/usr/local/jboss4/server/default/lib/
java.vm.version: 1.5.0-p2-root_19_oct_2005_22_07
javax.management.builder.initial: org.jboss.mx.server.MBeanServerBuilderImpl
java.vm.vendor: Sun Microsystems Inc.
java.vendor.url: http://java.sun.com/
path.separator: :
java.vm.name: Java HotSpot(TM) Server VM
file.encoding.pkg: sun.io
sun.os.patch.level: unknown
java.vm.specification.name: Java Virtual Machine Specification
user.dir: /usr/local/jboss4
jboss.server.base.url: file:/usr/local/jboss4/server/
java.runtime.version: 1.5.0-p2-root_19_oct_2005_22_07
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
java.endorsed.dirs: /usr/local/jdk1.5.0/jre/lib/endorsed
os.arch: i386
と、あるのでVMもネイティブ版を使っているようだ。

 次はPostgreSQLだな。