←前 |  ↑↑Blog |  ↑Category |  ↓Comment |  ↓Trackback |  次→

WebObjectsのdeployment on Vine Linux 3.1(ppc)


Vine Linux3.1上にWebObjectsのdeployment環境を構築する

以前のエントリを参考にしつつ、実施しました。

0.Apacheをインストールする。
私は初期インストール時に入れていたので、特に作業なし。

1.Javaをインストールする。
こちらのエントリに記載したようにインストールしました。ただし、WO5.2はjava1.3を対象としているので、javaは1.3の状態でインストールしました。


2.WebObjects 5.2 Deployment for Solarisをインストールする

1) WebObjects For Windows and Solaris CD-ROMSolaris用ファイルを保存する。

マシンにCD-ROMを入れる。
# mount /mnt/cdrom <これでCDがマウントできるようにfstabに書いてます>
# mkdir -p /opt/install/webobjects
# cd /mnt/cdrom/deployment
# cp -r solaris /opt/install/webobjects


2) ファイル名を変更する。

全て小文字となっているファイル名を適切なものに変更する。
# cd solaris
# ls
gnutar	     software.ver	       woservices
install.sh   woadaptors_solaris.tar.z  woservices_utils.sh
license      woadaptors_source.tar.z
license.jar  wodeploy.tar.z
# mv license LICENSE
# mv license.jar License.jar
# mv woadaptors_solaris.tar.z WOAdaptors_Solaris.tar.Z
# mv woadaptors_source.tar.z WOAdaptors_Source.tar.Z
# mv wodeploy.tar.z WODeploy.tar.Z
# mv woservices WOServices
# mv woservices_utils.sh WOServices_utils.sh
# ls
LICENSE			  WODeploy.tar.Z       install.sh
License.jar		  WOServices	       software.ver
WOAdaptors_Solaris.tar.Z  WOServices_utils.sh
WOAdaptors_Source.tar.Z   gnutar


3) インストールする
# ./install.sh -license X-NNN-XXX-NNN-XXX-NNN-XXX-NNN-XXX-NNN -adaptorsOnly NO -minimalInstall NO -cgibin /home/httpd/cgi-bin -docroot /home/httpd/html -woroot /home/httpd/woroot



--------------------------------------------------------------
Welcome to the WebObjects 5.2 Deployment installation program!



WEBOBJECTS ADAPTOR NOTE:
    There is not currently a WebObjects Adaptor binary built for this system
  configuration.  However, all of the source code is on this CD and you can
  build the CGI or an API-specific adaptor yourself.  The adaptor source is
  installed on to the target system with all installations.  Once fully-built,
  the adaptor binary will need to be copied into your webserver's cgi-bin
  directory.


LICENSE AGREEMENT:
    This Apple software is licensed under the terms of a Software License
  Agreement ('License') which you can read by pressing `r'.  Please read
  the License carefully before using the Apple Software.  By pressing `a'
  for agree, you are agreeing to be bound by the terms of the License.  If
  you do not agree to the terms of the License, press `q' for quit and  
  (if applicable) return the Apple Software to the place where you obtained
  it for a refund.

  Please make your selection ([R]/a/q): 
a


JAVA VIRTUAL MACHINE JRE SUPPORT:
    WebObjects 5.2 requires a java virtual machine (JVM) that supports
  JRE 1.3.1 or greater.  However, installation of WebObjects 5.2 
  requires minimal JRE support, so it is possible to perform this 
  installation on an older JVM and to upgrade to one with at least 
  JRE 1.3.1 support at a later time.
    What follows is the information from your JVM, which describes its
  JRE support.  Please verify that your JVM is up-to-date before using
  WebObjects 5.2.

  java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.1-02b-FCS)
Classic VM (build Blackdown-1.3.1-02b-FCS, native threads, nojit)


WO SERVICES:
    Most WebObjects applications require some support services to be
  running.  You can start them manually by executing:
  `/home/httpd/woroot/Library/WebObjects/Executables/WOServices start'.

    Startup scripts are used to have WebObjects services start
  at every reboot.  However, because your operating system is unsupported,
  neither the installer nor the WOServices executable will be able to
  configure this for you.  However, only simple modification of a utility
  Bourne shell script is required to allow WOServices to create these 
  startup scripts for your system.  Please refer to WOServices and 
  `/home/httpd/woroot/Library/WebObjects/Executables/WOServices_utils.sh'.

  Press any key to continue: 
 


--------------------------------------------------------------
PRE-INSTALLATION REVIEW:
   You are about to install:
  .  WebObjects 5.2 Deployment, Full Install

   Your specified installation location(s):
  .  CGI-BIN   : `/home/httpd/cgi-bin'
  .  DOCROOT   : `/home/httpd/html'
  .  WEBOBJECTS: `/home/httpd/woroot'

  Do you want to continue? ([Y]/n/q): 



--------------------------------------------------------------
INSTALLATION:
   Beginning WebObjects 5.2 full installation:

  .  Creating WebObjects installation directory ...
  .  Creating WebObjects' Applications and Frameworks directories ...
  .  Installing WebObjects Adaptor source ...
  .  Installing WebObjects Deployment ...
  .  Installing WODocumentRoot frameworks into document root ...
  .  Creating startup scripts ...
  .  ... Done.


APACHE WEBSERVER NOTE:
    If you are using the Apache Webserver, you will need the WebObjects 
  `apache.conf'. This installation's `apache.conf' file can be found at:
  /home/httpd/woroot/Library/WebObjects/Adaptors/Apache/apache.conf

  The Apache Webserver `httpd.conf' file (found in the Apache `httpd' directory)
  needs to be made aware of this file. Add the following line to `httpd.conf':
  Include /home/httpd/woroot/Library/WebObjects/Adaptors/Apache/apache.conf

UNSUPPORTED OPERATING SYSTEM:
    Your operating system is unsupported, so no WebObjects Adaptors binaries
  were installed.  However, the adaptor source code was installed into 
  `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/', 
  so you can build executables yourself (copy them into your webserver's
  cgi-bin directory).

NEXT_ROOT ENVIRONMENT VARIABLE:
    In order for WebObjects services to function, you should define the
  environment variable NEXT_ROOT in your shell startup script.  It should
  be set to '/home/httpd/woroot' (without the apostrophes).

  WebObjects 5.2 Deployment, Full Install is now installed.



入力するところは、3つで
1: ライセンス 読む/同意/同意しない -> a
2: 何かキーを押せ -> 押す
3: つづける? -> y
というふうに対応しました。


4) 環境変数の設定

NEXT_ROOT ENVIRONMENT VARIABLE:
In order for WebObjects services to function, you should define the
environment variable NEXT_ROOT in your shell startup script. It should
be set to '/home/httpd/woroot' (without the apostrophes).

WebObjects 5.2 Deployment, Full Install is now installed.

ということで、NEXT_ROOT変数を設定するようにします。
なんでも良いと思うので、普段使うユーザとrootユーザの.bashrcに設定するように記述しました。

.bashrcに追加
export NEXT_ROOT=/home/httpd/woroot


5) WebObjects 5.2.1のインストール

ここ を参考にしました。

[1]インストーラのダウンロード
上記のサイトからダウンロードします。当然Solaris版です。
そして、patcher.shを実行可能にします
# chmod 511 patcher.sh
# ls -l
total 52660
-r-xr-xr-x    1 root     root        24075 May 10 11:22 LICENSE
-r-xr-xr-x    1 root     root        19127 May 10 11:22 License.jar
-rw-------    1 root     root     16591213 May 10 12:28 WO521Solaris.TAR.Z
-r-xr-xr-x    1 root     root       212905 May 10 11:22 WOAdaptors_Solaris.tar.Z
-r-xr-xr-x    1 root     root       214231 May 10 11:22 WOAdaptors_Source.tar.Z
-r-xr-xr-x    1 root     root     36457815 May 10 11:23 WODeploy.tar.Z
-r-xr-xr-x    1 root     root         3628 May 10 11:23 WOServices
-r-xr-xr-x    1 root     root        11521 May 10 11:23 WOServices_utils.sh
-r-xr-xr-x    1 root     root       204104 May 10 11:22 gnutar
-r-xr-xr-x    1 root     root        79580 May 10 11:22 install.sh
-r-x--x--x    1 root     root        11090 May 10 12:27 patcher.sh
-r-xr-xr-x    1 root     root           32 May 10 11:22 software.ver

私の場合、/opt/install/webobjects/solaris に置きましたが他の場所でも大丈夫かと思います。

[2]updateする前に全てのWebObjects関連のプログラムを停止する。
# /sbin/service httpd stop
# cd $NEXT_ROOT/Library/WebObjects/Executables
# ls
WOServices  WOServices_utils.sh

# ./WOServices stop
WebObjects services stopped.


[3]gnutarを利用できるようにする。

もし以下のようにgnutarが利用不能であれば、
# whereis gnutar
gnutar:

以下のようにしてgnutarを利用可能にする。
# ln -s /bin/tar /bin/gnutar
# whereis gnutar
gnutar: /bin/gnutar


[4]パッチをあてる。
# cd /opt/install/webobjects/solaris
# ls
LICENSE		    WOAdaptors_Solaris.tar.Z  WOServices	   install.sh
License.jar	    WOAdaptors_Source.tar.Z   WOServices_utils.sh  patcher.sh
WO521Solaris.TAR.Z  WODeploy.tar.Z	      gnutar		   software.ver

# ./patcher.sh -install WO521Solaris.TAR.Z
No errors, extracting patch

Install of /opt/install/webobjects/solaris/WO521Solaris.TAR.Z successful


[5]アップデートしたWODocumentのルートをWebサーバのドキュメントルートへコピーする。
# cp -R $NEXT_ROOT/Library/WebObjects/WODocumentRoot/WebObjects /home/httpd/html


6) 同様にして、5.2.2と5.2.3のパッチを適用する。(JDK1.4を使いたい場合など)

7) WebServerConfig.plistの編集
# vi $NEXT_ROOT/Library/Frameworks/JavaWebObjects.framework/Resource/WebServerConfig.plist


DocumentRoot/Library/WebServer/Documentsから、Webサーバのドキュメントルートに変更する。例えば以下のような感じ。
{
	DocumentRoot = "/home/httpd/html";
	WOAdaptorURL = "http://localhost/cgi-bin/WebObjects";
}



8) アダプタの作成

[1] makeするためにいくつかファイルを変更する。
$NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors/make.configに以下の内容を追加。

# Linux
ifeq "LINUX" "$(OS)"
ADAPTORS = CGI Apache
# Default path for apxs
APXS = /usr/sbin/apxs
endif

更に、先頭行付近の
ADAPTOR_OS = SOLARIS
をコメントアウトし、
ADAPTOR_OS = LINUX
を追記する。

$NEXT_ROOT/Develper/Examples/WebObjects/Source/Adaptors/Apache/Makefile
において、Solarisendif より先の部分を以下の内容に書き換える。

注:5.1とは内容が違う。
ifeq "LINUX" "${OS}"
ENABLE_SSL_SUPPORT =
OPENSSL_INCL_FLAGS =
OPENSSL_LIB_FLAGS =
APACHE_INCL_FLAGS = -I/usr/include/apache
CFLAGS +=-DEAPI ${APACHE_INCL_FLAGS}
LDFLAGS += -G -L/lib -lc ${OPENSSL_LIB_FLAGS}
endif

CFLAGS += ${OPENSSL_INCL_FLAGS}
APXSFLAGS = -i

all: mod_WebObjects.so

mod_WebObjects.so : mod_WebObjects.o ${COMMON_OBJFILES}
        ld ${LDFLAGS} mod_WebObjects.o ${COMMON_OBJFILES} -o mod_WebObjects.so
        ${APXS} ${APXSFLAGS} mod_WebObjects.so

mod_WebObjects.o : mod_WebObjects.c ${COMMON_OBJFILES}
        ${CC} -c ${CFLAGS} mod_WebObjects.c ${COMMON_OBJFILES}

clean:
        rm -f mod_WebObjects.so mod_WebObjects.o *.o

include ../Adaptor/make.postamble


Apdator/wastring.c
# diff wastring.c.orig wastring.c
29a30,31
> #define va_copy(to, from)     ((to)[0] = (from)[0])
> 
197a200
>    /*
198a202,204
>    */
>    va_list sizer;
>    va_copy(sizer, args);



[2]makeする。
# cd $NEXT_ROOT/Develper/Examples/WebObjects/Source/Adaptors
# make clean
touch Adaptor/make.preamble Adaptor/make.postamble
for adaptor in CGI Apache Adaptor ; do ¥
	echo Cleaning $adaptor ; ¥
	( cd ${adaptor} ; make clean ) ; ¥
done
Cleaning CGI
make[1]: Entering directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/CGI'
rm -f WebObjects *.o
make[1]: Leaving directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/CGI'
Cleaning Apache
make[1]: Entering directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Apache'
rm -f mod_WebObjects.so mod_WebObjects.o *.o
make[1]: Leaving directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Apache'
Cleaning Adaptor
make[1]: Entering directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Adaptor'
rm -f make.preamble make.postamble
make[1]: Leaving directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Adaptor'

# make
cd Adaptor ; make
make[1]: Entering directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Adaptor'
rm -f make.preamble make.postamble
for file in *.c; do ¥
	echo "${file}: ../Adaptor/${file}" | sed s/¥¥.c/.o/ >> make.postamble ; ¥
	echo "	$""{CC} $""{CFLAGS} -c ../Adaptor/${file}" >> make.postamble ; ¥
	echo "		${file} ¥¥" >> make.preamble ; ¥
done
for file in *.c; do ¥
	echo "		${file} ¥¥" | sed s/¥¥.c/.o/ >> make.preamble ; ¥
done
make[1]: Leaving directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Adaptor'
cd CGI ; make
make[1]: Entering directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/CGI'
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI   -c -o WebObjects.o WebObjects.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/MoreURLCUtilities.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/Platform.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/WOURLCUtilities.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/WOURLCUtilities_3.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/appcfg.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/cfgparse.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/config.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/hostlookup.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/list.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/listing.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/loadaverage.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/loadbalancing.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/log.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/nbsocket.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/random.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/request.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/response.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/roundrobin.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/shmem.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/strdict.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/strtbl.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/transaction.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/transport.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/wastring.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/womalloc.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/xmlcparser.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/xmlctokenizer.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI -c ../Adaptor/xmlparse.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DCGI  -o WebObjects WebObjects.o MoreURLCUtilities.o Platform.o WOURLCUtilities.o WOURLCUtilities_3.o appcfg.o cfgparse.o config.o hostlookup.o list.o listing.o loadaverage.o loadbalancing.o log.o nbsocket.o random.o request.o response.o roundrobin.o shmem.o strdict.o strtbl.o transaction.o transport.o wastring.o womalloc.o xmlcparser.o xmlctokenizer.o xmlparse.o 
make[1]: Leaving directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/CGI'
cd Apache ; make
make[1]: Entering directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Apache'
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/MoreURLCUtilities.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/Platform.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/WOURLCUtilities.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/WOURLCUtilities_3.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/appcfg.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/cfgparse.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/config.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/hostlookup.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/list.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/listing.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/loadaverage.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/loadbalancing.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/log.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/nbsocket.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/random.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/request.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/response.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/roundrobin.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/shmem.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/strdict.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/strtbl.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/transaction.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/transport.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/wastring.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/womalloc.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/xmlcparser.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/xmlctokenizer.c
cc -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  -c ../Adaptor/xmlparse.c
cc -c -O2 -Wall -I../Adaptor  -DSINGLE_THREADED_ADAPTOR -DLINUX -DFORKING_WEBSERVER -DAPACHE  -DEAPI -I/usr/include/apache  mod_WebObjects.c MoreURLCUtilities.o Platform.o WOURLCUtilities.o WOURLCUtilities_3.o appcfg.o cfgparse.o config.o hostlookup.o list.o listing.o loadaverage.o loadbalancing.o log.o nbsocket.o random.o request.o response.o roundrobin.o shmem.o strdict.o strtbl.o transaction.o transport.o wastring.o womalloc.o xmlcparser.o xmlctokenizer.o xmlparse.o 
mod_WebObjects.c:242: warning: `setOption3' defined but not used
cc: MoreURLCUtilities.o: linker input file unused since linking not done
cc: Platform.o: linker input file unused since linking not done
cc: WOURLCUtilities.o: linker input file unused since linking not done
cc: WOURLCUtilities_3.o: linker input file unused since linking not done
cc: appcfg.o: linker input file unused since linking not done
cc: cfgparse.o: linker input file unused since linking not done
cc: config.o: linker input file unused since linking not done
cc: hostlookup.o: linker input file unused since linking not done
cc: list.o: linker input file unused since linking not done
cc: listing.o: linker input file unused since linking not done
cc: loadaverage.o: linker input file unused since linking not done
cc: loadbalancing.o: linker input file unused since linking not done
cc: log.o: linker input file unused since linking not done
cc: nbsocket.o: linker input file unused since linking not done
cc: random.o: linker input file unused since linking not done
cc: request.o: linker input file unused since linking not done
cc: response.o: linker input file unused since linking not done
cc: roundrobin.o: linker input file unused since linking not done
cc: shmem.o: linker input file unused since linking not done
cc: strdict.o: linker input file unused since linking not done
cc: strtbl.o: linker input file unused since linking not done
cc: transaction.o: linker input file unused since linking not done
cc: transport.o: linker input file unused since linking not done
cc: wastring.o: linker input file unused since linking not done
cc: womalloc.o: linker input file unused since linking not done
cc: xmlcparser.o: linker input file unused since linking not done
cc: xmlctokenizer.o: linker input file unused since linking not done
cc: xmlparse.o: linker input file unused since linking not done
ld -G -L/lib -lc  mod_WebObjects.o MoreURLCUtilities.o Platform.o WOURLCUtilities.o WOURLCUtilities_3.o appcfg.o cfgparse.o config.o hostlookup.o list.o listing.o loadaverage.o loadbalancing.o log.o nbsocket.o random.o request.o response.o roundrobin.o shmem.o strdict.o strtbl.o transaction.o transport.o wastring.o womalloc.o xmlcparser.o xmlctokenizer.o xmlparse.o  -o mod_WebObjects.so
/usr/sbin/apxs -i mod_WebObjects.so
cp mod_WebObjects.so /usr/lib/apache/mod_WebObjects.so
chmod 755 /usr/lib/apache/mod_WebObjects.so
make[1]: Leaving directory `/home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Apache'


9) ApacheWebObjects用に設定する

/etc/httpd/conf/httpd.conf
# cd /etc/httpd/conf
# cp httpd.conf httpd.conf.orig
# vi httpd.conf


# diff httpd.conf.orig httpd.conf
271a272,277
> # WebObjects
> Include /etc/httpd/conf/webobjects.conf
> <Location /cgi-bin/./>
> SetHandler WebObjects
> </Location>
> 
297a304
> AddModule mod_WebObjects.c
402a410
> ServerName www.xxx.com


/etc/httpd/conf/webobjects.conf
# cp /home/httpd/woroot/Developer/Examples/WebObjects/Source/Adaptors/Apache/apache.conf /etc/httpd/conf/webobjects.conf
# cd /etc/httpd/conf
# cp webobjects.conf webobjects.conf.orig
# vi webobjects.conf


# diff webobjects.conf.orig webobjects.conf
4,5c4,5
< LoadModule WebObjects_module SYSTEM_LIBRARY_DIR/WebObjects/Adaptors/Apache/mod_WebObjects.so
< AddModule mod_WebObjects.c
---
> LoadModule WebObjects_module /usr/lib/apache/mod_WebObjects.so
> #AddModule mod_WebObjects.c
9c9
< WebObjectsDocumentRoot LOCAL_LIBRARY_DIR/WebServer/Documents
---
> WebObjectsDocumentRoot /home/httpd/html 



10) Apache & WebObjectsを起動する。

apache
# /etc/rc.d/init.d/httpd start
Starting httpd:                                            [  OK  ]


wotaskd
# $NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd &

ポート1085に対してtelnetできるようになっていれば、おそらくOKです。


11) JavaMonitorの起動とインストールテスト
# $NEXT_ROOT/Libray/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789

ブラウザで、

http://<Vineの入ったマシンのIP>:56789/

で表示できました!!!!!

12) 自動起動にする
[1] ファイルを作成する
/etc/rc.d/init.d webobjects という名前で以下の内容のファイルを作成する。

#! /bin/sh
#
# Startup script for the WebObjects
#
# description: WebObjects services
# processname: WebObjects

# Get functions
. /etc/init.d/functions

# set path
export PATH="/usr/local/jdk/bin:/sbin:/bin:/usr/sbin:/usr/bin"

# WebObject startup script
WOSERVICES_SCRIPT=/home/httpd/woroot/Library/WebObjects/Executables/WOServices

start() {
        echo -n "Starting WebObjects: "
        daemon "${WOSERVICES_SCRIPT} start"
        RETVAL=$?
        echo
        if [ $RETVAL -eq 0 ] ; then
                touch /var/lock/subsys/WebObjects
                return 0
        else
                return $RETVAL
        fi
}

stop() {
        echo -n "Stopping WebObjects: "
        ${WOSERVICES_SCRIPT} stop
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/WebObjects
        return $RETVAL
}       

restart() {
        stop
        start
}       

# See how we were called.
case "$1" in
 start)
        start
        ;;
 stop)
        stop
        ;;
 restart)
        restart
        ;;
 *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
        ;;
esac

exit $?



[2] 登録する
システムツールの「サービスの設定」等で登録する。

( ・∀・)つ〃∩ ヘェーヘェーヘェー">
投稿時間: 2005年04月17日 (日) at 22:23       
 

←前  |  ↑↑Blog |  ↑Category |  ↑Entry top |  ↑Comment |  次→
←前  |  ↑↑Blog |  ↑Category |  ↑Entry top |  ↑Comment |  次→