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

WebObjects5.2.4のdeployment on CentOS5.2のメモ


CentOS(32bit)上にWebObjects5.2.4のdeployment環境を構築する。

1.CentOSのインストール
CentOS-5.2-i386-netinstall.iso
をダウンロード

Choose Language: Japanese
Keyboard type: us
Installation Method: http
IPv4: Enable
Manual configuration: on
IPv6: Disable
Manual TCP/IP Configuration: いい感じに。

web site: rsync.atworks.co.jp
dir: centos/5.2/os/i386

Server - GUI
ssh, http, https, samba
SELinux: 無効
KDump: 有効
時刻: NTP

再起動

rootにて:
OSの更新実行

再起動

rootにて:
システム→管理→ディスプレイ→ハードウェア→モニタータイプ:設定...→Generic LCD Display→LCD Panel 1024x768
システム→管理→ディスプレイ→モニター設定:解像度→1024x768
ログオフ
ログイン

システム→管理→サーバ設定→サービス→ランレベルの編集→全てのランレベル
以下のものの3 4 5をoffに。適当です。
acpid
avahi-daemon
bluetooth
cups
gpm
hidd
ip6tables
isdn
pcscd
sendmail
smartd

以下のものの3 4 5をonに。
httpd
smb
vnc-server

保存

システム→管理→サーバ設定→HTTP→サーバ名
(適当な名前に)

再起動

作成したユーザでログイン
GNOME端末にて

ここ を参考にしてのインストール後の設定を実施
再起動

2.VNCの設定
ここ を参考にしました。
これ以降はVNCクライアントで接続するとよいでしょう。

3.Postgresql
ここ を参考にしました。

# useradd postgres
# passwd postgres
# mkdir /usr/local/src/postgresql-8.3.3
# mkdir /usr/local/pgsql
# chown postgres /usr/local/src/postgresql-8.3.3
# chown postgres /usr/local/pgsql
# cd /usr/local/src/
# wget ftp://ftp.sra.co.jp/pub/cmd/postgres/8.3.3/postgresql-8.3.3.tar.gz
# su - postgres
$ cd /usr/local/src
$ tar xvzf postgresql-8.3.3.tar.gz
$ cd postgresql-8.3.3
$ ./configure --enable-nls='ja'
(省略)
checking for gcc... no
checking for cc... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

怒られた。gccがないw

# yum install gcc
$ ./configure --enable-nls='ja'
(省略)
configure: error: readline library not found
If you have readline already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable readline support.

う、怒られた。readline-develがない。

# yum -y install readline-devel
$ ./configure --enable-nls='ja'
(省略)
configure: error: zlib library not found
If you have zlib already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-zlib to disable zlib support.

う、怒られた。zlib-develがない。

# yum install zlib-devel
$ ./configure --enable-nls='ja'

怒られなかった。

$ make
$ make install

# vi /etc/profile
export PATH=$PATH:/usr/local/pgsql/bin
export MANPATH=$MANPATH:/usr/local/pgsql/man
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
export PGDATA=/usr/local/pgsql/data

$ initdb --encoding=UTF8 --no-locale
$ pg_ctl -w start
$ createuser hoge
Shall the new role be a superuser? (y/n) y

# cd /usr/local/src/postgresql-8.3.3
# cp contrib/start-scripts/linux /etc/init.d/postgresql
# cd /etc/init.d
# /sbin/chkconfig --add postgresql
# chmod +x postgresql

# cd /usr/local/pgsql/data
# vi pg_hba.conf
[root@centos data]# diff pg_hba.conf pg_hba.conf.orig
76,77d75
<
< host all all 192.168.1.0 255.255.255.0 trust

# reboot

4.不要なソフトウェアの削除
依存関係で、gnome-sessionが削除されないように注意。

5.javaのインストール
WebObjects5.2.4が想定しているのは1.4なのでそいつをダウンロード。
# chmod +x j2sdk-1_4_2_17-linux-i586-rpm.bin
# ./j2sdk-1_4_2_17-linux-i586-rpm.bin
# rpm -ivh j2sdk-1_4_2_17-linux-i586.rpm
#
# vi /etc/profile
export JAVA_HOME=/usr/java/latest
export CLASSPATH=.:$JAVA_HOME/jre/lib:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin:/usr/local/pgsql/bin
export MANPATH=$MANPATH:/usr/local/pgsql/man
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
export PGDATA=/usr/local/pgsql/data

# source /etc/profile

6.WebObjects
# mount /dev/cdrom /media
# mkdir -p /opt/install/webobjects
# cd /media/deployment
# cp -r solaris /opt/install/webobjects
# cd /opt/install/webobjects/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

install.shを修正、"-pxZf" を "-pxzf"に直す(3カ所)

# ./install.sh -license X-NNN-XXX-NNN-XXX-NNN-XXX-NNN-XXX-NNN -adaptorsOnly NO -minimalInstall NO -cgibin /var/www/cgi-bin -docroot /var/www/html -woroot /var/www/woroot

#vi /etc/profile
export NEXT_ROOT=/var/www/woroot

# source /etc/profile

5.2.4へ
パッチをダウンロード
# cd /opt/install/webobjects/solaris/
# mkdir 5.2.4
# mv WO524Solaris.tar.gzip patcher.sh 5.2.4/
# cd 5.2.4
# chmod 511 patcher.sh
# ln -s /bin/tar /bin/gnutar
# whereis gnutar
gnutar: /bin/gnutar
# cp patcher.sh patcher.sh.orig
# vi patcher.sh
# diff patcher.sh patcher.sh.orig
22c22
< COMPRESS=z # gnutar compress flag: 'Z' or 'z' or ''
---
> COMPRESS=Z # gnutar compress flag: 'Z' or 'z' or ''
# ./patcher.sh -install WO524Solaris.tar.gzip
# /bin/cp -rf /var/www/woroot/Library/WebObjects/WODocumentRoot/WebObjects /var/www/html/

WebServerConfig.plistの編集
# cp $NEXT_ROOT/Library/Frameworks/JavaWebObjects.framework/Resources/WebServerConfig.plist $NEXT_ROOT/Library/Frameworks/JavaWebObjects.framework/Resources/WebServerConfig.plist.orig
# vi $NEXT_ROOT/Library/Frameworks/JavaWebObjects.framework/Resources/WebServerConfig.plist
# diff WebServerConfig.plist WebServerConfig.plist.orig
2c2
< DocumentRoot = "/var/www/html";
---
> DocumentRoot = "/Library/WebServer/Documents";

# yum install httpd-devel
# which apxs
/usr/sbin/apxs

■アダプタの作成
付属のアダプタはapache1.3用。2.2用に対応するためにWonderのアダプタを利用する。
http://webobjects.mdimension.com/wonder/releases/からWonderのソースを取得
# mkdir /opt/install/webobjects/solaris/wonder
# cp Wonder-5.0.0.8268-Source.tar.gz /opt/install/webobjects/solaris/wonder/
# cd /opt/install/webobjects/solaris/wonder/
# tar xvzf Wonder-5.0.0.8268-Source.tar.gz
# cd /opt/install/webobjects/solaris/wonder/Wonder/Utilities/Adaptors/
# cp make.config make.config.orig
# vi make.config
# diff make.config make.config.orig
7,8c7
< ADAPTOR_OS = LINUX
< CC = gcc
---
> ADAPTOR_OS = MACOS

# make
# apxs -i -a -n WebObjects mod_WebObjects.la

# vi apache.conf
# diff apache.conf apache.conf.orig
7c7
< LoadModule WebObjects_module modules/mod_WebObjects.so
---
> #LoadModule WebObjects_module modules/mod_WebObjects.so
11c11,12
< WebObjectsDocumentRoot LOCAL_LIBRARY_DIR/WebServer/Documents
---
> #WebObjectsDocumentRoot LOCAL_LIBRARY_DIR/WebServer/Documents
> WebObjectsDocumentRoot /var/www/html
15c16
< WebObjectsAlias /cgi-bin/WebObjects
---
> WebObjectsAlias /Apps/WebObjects
60c61
< # WebObjectsLog /tmp/WebObjects.log Debug
---
> WebObjectsLog /tmp/WebObjects.log Debug
# touch /tmp/logWebObjects

# cp apache.conf /etc/httpd/conf/webobjects.conf
# cd /etc/httpd/conf/
# cp httpd.conf httpd.conf.orig
# vi httpd.conf
# diff httpd.conf httpd.conf.orig
1043c1043
< Include /etc/httpd/conf/webobjects.conf
---
>
\ ファイル末尾に改行がありません

# /usr/sbin/httpd -t
Syntax OK
# $NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd &
# /etc/init.d/httpd restart
# $NEXT_ROOT/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 &

webobjectsの起動ファイルを/etc/init.dへ複製
# chkconfig --add webobjects
# reboot

■JavaMonitor
Hosts
 JavaMonitorの認識している名前で登録。IPアドレスだとだめみたい。
Site→HTTP Adaptor URL
 http://(hostname)/Apps/WebObjects

■Java Library
(必要なjarを/var/www/woroot/Local/Library/WebObjects/Extensionsにコピー)
# curl -O http://jdbc.postgresql.org/download/postgresql-8.3-603.jdbc2.jar
# cd /var/www/woroot/Local/Library/WebObjects/Extensions

■PostgresqlPlugIn.framework
5.2系でコンパイルした古いFrameworkをコピー。

■DB作成
$ createdb -E UTF8 (適切な名前)

■その他
WebServer用のリソースは、/var/www/html/WebObjects へ。

( ・∀・)つ〃∩ ヘェーヘェーヘェー">
投稿時間: 2008年09月15日 (月) at 15:45       
 

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