Configuring Mac OS X Server Tiger for WebObjects Deployment


This are the steps to setup a brand new installation of OS X Server Tiger. This is for an "all in one" server typical for a small or startup WebObjects website or as a server used for testing. This setup is for MySQL 4.1, WebObjects 5.3, Apache webserver. The mechanics of WebObjects setup on a new installation of OS X Tiger is straight-forward and easier than with previous versions of OS X Server.

For this exercise, I performed a clean 'Erase and Install' installation of OS X Server 10.4.7 on a compatible Mac. After installation I ran software update to bring it up to 10.4.8 Server. WebObjects deployment is already included by default in OS X Server, so no additional WebObjects software installs are necessary.

DO NOT INSTALL WebObjects Deployment 5.3 SINCE IT IS PREINSTALLED in Tiger!!!! (Tiger 10.4.8 has WO 5.3.2 preinstalled)

Java Version
In a clean 10.4.7 install, the default java version is 1.5. By default on Tiger, WO apps launch using some 1.4 compatability jar that is included in the 1.5 installation. Java 1.5 is not officially "certified" for WebObjects, and I don't like this 14 compatability jar thing, so I'm putting my Tiger Server machines back to 1.4 for WO deployment. Although 1.5 is unofficially supported, I am developing for 1.4, so I am going to change the server to use 1.4 by default. Also,

In a terminal navigate to /System/Library/Frameworks/JavaVM.framework/Versions

Here is the terminal transcript:

server1:/System/Library/Frameworks/JavaVM.framework/Versions admin$ ls -al
total 40
drwxr-xr-x 11 root wheel 374 Sep 16 07:36 .
drwxr-xr-x 9 root wheel 306 Sep 16 07:36 ..
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.3 -> 1.3.1
drwxr-xr-x 8 root wheel 272 Sep 16 07:35 1.3.1
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.4 -> 1.4.2
drwxr-xr-x 8 root wheel 272 Sep 16 07:35 1.4.2
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.5 -> 1.5.0
drwxr-xr-x 10 root wheel 340 Sep 21 00:10 1.5.0
drwxr-xr-x 5 root wheel 170 Sep 16 12:22 A
lrwxr-xr-x 1 root wheel 1 Sep 16 07:36 Current -> A
lrwxr-xr-x 1 root wheel 3 Sep 16 07:35 CurrentJDK -> 1.5
server1:/System/Library/Frameworks/JavaVM.framework/Versions admin$ sudo rm CurrentJDK
server1:/System/Library/Frameworks/JavaVM.framework/Versions admin$ ls -al
total 32
drwxr-xr-x 10 root wheel 340 Sep 21 00:11 .
drwxr-xr-x 9 root wheel 306 Sep 16 07:36 ..
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.3 -> 1.3.1
drwxr-xr-x 8 root wheel 272 Sep 16 07:35 1.3.1
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.4 -> 1.4.2
drwxr-xr-x 8 root wheel 272 Sep 16 07:35 1.4.2
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.5 -> 1.5.0
drwxr-xr-x 10 root wheel 340 Sep 21 00:10 1.5.0
drwxr-xr-x 5 root wheel 170 Sep 16 12:22 A
lrwxr-xr-x 1 root wheel 1 Sep 16 07:36 Current -> A
server1:/System/Library/Frameworks/JavaVM.framework/Versions admin$ sudo ln -s 1.4 CurrentJDK
server1:/System/Library/Frameworks/JavaVM.framework/Versions admin$ ls -al
total 40
drwxr-xr-x 11 root wheel 374 Sep 21 00:11 .
drwxr-xr-x 9 root wheel 306 Sep 16 07:36 ..
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.3 -> 1.3.1
drwxr-xr-x 8 root wheel 272 Sep 16 07:35 1.3.1
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.4 -> 1.4.2
drwxr-xr-x 8 root wheel 272 Sep 16 07:35 1.4.2
lrwxr-xr-x 1 root wheel 5 Sep 16 07:35 1.5 -> 1.5.0
drwxr-xr-x 10 root wheel 340 Sep 21 00:10 1.5.0
drwxr-xr-x 5 root wheel 170 Sep 16 12:22 A
lrwxr-xr-x 1 root wheel 1 Sep 16 07:36 Current -> A
lrwxr-xr-x 1 root wheel 3 Sep 21 00:11 CurrentJDK -> 1.4
server1:/System/Library/Frameworks/JavaVM.framework/Versions admin$ java -version
java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-244)
Java HotSpot(TM) Client VM (build 1.4.2-67, mixed mode)

WebObjects Service
Open Server Admin and authenticate.
Select WebObjects in Computers and Services for this local server.
Click on Settings in the bottom of the WebObjects pane.
Check the "Turn Monitor On" checkbox.
Click Save.
Click Start Service in toolbar.
Verify by simply opening browser on the server and going to http://localhost:56789 (assuming you did not change default ports)

IMPORTANT: Setup password security on Monitor using the Preferences tab

In Monitor, you may need to do these tasks too:
- Setup your WebObjects applications in Hosts tab
- Enter your HTTP Adaptor URL under the Site tab

If this is a new machine it might also be a good time to create your app logs directory and set owner/privs on it.

Apache Web Service
Open Server Admin and set up sites/domains/SSL, etc. Also turn off the performance cache in the Options tab for any sites that are for WebObjects apps amd/or that use SSL. Note that Server Admin now has a global certificates admin now under Server-Name/Settings/Certificates. You can import certs there and they appear in a popup menu in the SSL site configuration settings. Then start the Web service.

Java Extensions
Install any required basic java extensions that your environment needs.
For example, if using MySQL, then install MySQL Connector/J for JDBC connection to MySQL (put the mysql-connector.jar file in /Library/Java/Extensions of the deployment server). I recommend Connector/J 3.0.XX and not 3.1.XX for use with MySQL 4.1

WebObjects Extensions
Ideally you should make frameworks for your 3rd party jars and include them as needed for each app, but if you have some jars and you just want to share them with all your apps, then put them in /Library/WebObjects/Extensions

Permissions
In Tiger, by default apps are launched as user = appserver ( "Application Server" ). See its details by doing:
$ niutil -read . /users/name=appserver

It belongs to a group named appserveradm. See more on that by doing:
$ niutil -read . /groups/name=appserveradm

So, we need to make sure that the user appserver has ownership of our apps and read ability of what it needs and write ability of what it needs to function. Also for security, we want to keep everyone else out, so something like this would be in order for your /Library/WebObjects/Applications directory
$ sudo chown -R appserver:appserveradm /Library/WebObjects/Applications
$ sudo chmod -R 770 /Library/WebObjects/Applications

References:
http://docs.info.apple.com/article.html?artnum=304041
http://docs.info.apple.com/article.html?artnum=75505

Posted: Fri - November 10, 2006 at 12:16 PM        


Published by