Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add in re Ubuntu

...

Warning

If you are using RedHat Enterprise Linux, CentOS or Amazon Linux, stop right there! We now have RPM packages for CentOS and RedHat 5.x/6.x, and Amazon Linux. Read the following instructions instead of this document.

Guess what? If you are using Debian or Ubuntu, packages are also available for your platform (although not yet for Xenial)!

Install Sun Java JDK

1. You should install a Sun/Oracle Java SDK. Use Oracle's installation instructions. Choose the appropriate 32-bit or 64-bit Linux installer, for example jdk-6u27-linux-x64-rpm.bin, and install it.

...

Code Block
PATH=$PATH:/usr/java/jdk1.6/bin:$HOME/bin

...

Install the WebObjects frameworks (Optional)

Info

If you embed the frameworks into your applications, you don't need to install the core frameworks on the deployment system. Install them only if your applications don't have the frameworks inside their bundles.

...

Code Block
[root@ ~]# ls -l /opt
total 12
drwxr-xr-x 3 root root 4096 Nov 9 08:19 Developer
drwxr-xr-x 4 root root 4096 Nov 9 08:19 Library
drwxr-xr-x 3 root root 4096 Nov 9 08:20 Local

Creating the appserver user and starting wotaskd/JavaMonitor

To follow the conventions from Mac OS X, we will create two users to run wotaskd and Monitor under this user :

...

You can start wotaskd and Monitor, manually, to make sure that they run without any problems :

Code Block
[appserver@ ~]$ $NEXT_ROOT/Local/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd &
[appserver@ ~]$ $NEXT_ROOT/Local/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 &

Apache

(Should info on properly installing and configuring Apache be its own page? Is it its own page somewhere else already? -rrk)

If your Linux installation don't already have Apache httpd running or installed, you need to install it:

...

.. default install location is then /etc/httpd

HTTP Adaptor

First, check if a pre-built module already exists at wocommunity.org. If you are running CentOS 6.x, you can use the module for CentOS 5.5, it works fine.

...

If you can't find a adaptor for your Linux platform, you will have to build it

Apache Configuration

Instead of copying the WebObjects directory, you can use a alias to point to the folder inside NEXT_ROOT. In your Apache configuration, add something like :

...

Code Block
LoadModule WebObjects_module /usr/lib64/apache2/mod_WebObjects.so

Auto Start WOTaskd and WOMonitor

One last thing, you need a init script to start wotaskd and Monitor at boot time.

Systems using upstart (Ubuntu and maybe others)

If you are running Ubuntu that have support for upstart, you can grab the two startup scripts for upstart The scripts are available on GitHub. Grab the two files (womonitor.conf and wotaskd.conf) and copy them in /etc/init/. Once they are in this directory, run:

Code Block
sudo service wotaskd start
sudo service womonitor start

...

Don't forget to change the permissions on the startup file so that the owner is root and that everyone have execution rights!

Code Block
chown root /etc/init/wotaskd.conf
chown root /etc/init/womonitor.conf
chmod 755 /etc/init/wotaskd.conf
chmod 755 /etc/init/womonitor.conf

Systems not using upstart (CentOS, RedHat, Fedora and others)

If you are running a system not capable of running upstart, like CentOS, RedHat or older versions of Ubuntu, you need to use the old-style init.d startup script. Again, the scripts are available on GitHub. Grab the two files (womonitor and wotaskd) and copy them in /etc/init.d/.

Once the scripts are in /etc/init.d/into the proper directory.

You will be able to see where the services files should go by searching for others.

Code Block
find /etc /lib -name \*.service

Once a wotaskd.service and womonitor.servcie file are in the proper location, you can start them:

Code Block
sudo service start wotaskd start
sudo service start womonitor start

Last step: add the startup scripts under chkconfig control with:

Code Block
sudo /sbin/chkconfig --add webobjects
sudo /sbin/chkconfig webobjects on

If you are using Ubuntu or Debian without upstart support, you need to use update-rc.d instead of chkconfig:

Code Block
sudo update-rc.d wotaskd defaults 90 20
sudo update-rc.d womonitor defaults 90 20

...

Don't forget to change the permissions on the startup file so that the owner is root and that everyone have execution rights!

Code Block
chown root /etc/init.d/wotaskd
chown root /etc/init.d/womonitor
chmod 755 /etc/init.d/wotaskd
chmod 755 /etc/init.d/womonitor

...

You should be deploying as the user "appserver" and, if you have done this, make sure that all files and directories referred to in the service files exist and that the permissions are as they should be and that they are owned by or accessible to the appserver user. All files must be readable, all directories must be readable and executable and scripts must the executable. Make sure to check log file locations as well.

Any errors in these files may make the service fail to start in non-obvious ways. The resulting error messages may not be helpful. The best strategy is to be very careful with the contents of the files. An example service file is below. Running "systemctl status" on the services and carefully examining everything in the output may help you with deployment problems.

Enabling the services will ensure that the services restart after a reboot.

Code Block
sudo service enable wotaskd
sudo service enable womonitor


Here's a systemd unit to put into /lib/systemd/system/wotaskd.service 

Code Block
# systemd unit for wotaskd to run on Ubuntu 16.04 LTS 
# Maik Musall <maik@selbstdenker.ag>, Aug 2016 [Unit]
Description=WebObjects/Wonder wotaskd
Documentation=https://wiki.wocommunity.org/display/documentation/Wonder+JavaMonitor+and+wotaskd 
AssertPathExists=/var/log/webobjects
AssertPathExists=/opt/Local/Library/WebObjects/JavaApplications/wotaskd.woa 
[Service]
User=appserver
Group=appserveradm
Environment=NEXT_ROOT=/opt
Environment="JVM_OPTIONS=-Xms32m -Xmx64m -XX:NewSize=2m"
Environment=WOTASKD_LOG=/var/log/webobjects/wotaskd.log
ExecStart=/opt/Local/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd -WOPort 1085 -Xms32m -Xmx64m >> $WOTASKD_LOG 2>&1 Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target

Start it with systemctl start wotaskd.service

...


Problems with Application Responding to WOMonitor/WOTaskd

If your Linux server is a virtual machine or if it has multiple IP addresses, you may find that clicking 'Stop' in WOMonitor has no effect on instances, or that the applications never start (the level just go up and down non-stop). This can usually be solved for all Wonder-based applications running on hosts with such a problem by simply creating the following file (known as the 'Machine Properties' file in Wonder's ERXProperties):

...