Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added reference to article for creating a wotaskd SELinux policy module.

...

Creating symbolic links as follows is useful (alternatively use the 'alternatives' command to manage JVMs):

Code Block

ln -s /usr/java/jdk1.6.0_27 /usr/java/jdk1.6
ln -s /usr/java/jdk1.6/bin/java /usr/bin/java

and you need to change your path in your bash profile (_~/.bash_profile) to have this path :

Code Block

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

...

2. Get the WebObjects installer from the wocommunity's Web site :

Code Block

curl -C - -O http://wocommunity.org/documents/tools/WOInstaller.jar

     OR

wget http://wocommunity.org/documents/tools/WOInstaller.jar

and install it like this :

Code Block

sudo /usr/java/latest/bin/java -jar WOInstaller.jar 5.4.3 /opt

WebObjects frameworks are now installed in /opt

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

...

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

Code Block

sudo groupadd appserveradm
sudo useradd -g appserveradm appserver

Edit the bash profile of the appserver

Code Block

#sudo su - appserver
% vi .bash_profile

and add this line :

Code Block

export NEXT_ROOT=/opt

and run it manually in your current shell :

Code Block

[appserver@ ~]$ . .bash_profile

3. Next, we need to install the Wonder version wotaskd and JavaMonitor.

Code Block

mkdir -p /opt/Local/Library/WebObjects/JavaApplications
cd /opt/Local/Library/WebObjects/JavaApplications

wget http://jenkins.wocommunity.org/job/Wonder/lastSuccessfulBuild/artifact/Root/Roots/wotaskd.tar.gz
tar zpxf wotaskd.tar.gz
rm wotaskd.tar.gz
wget http://jenkins.wocommunity.org/job/Wonder/lastSuccessfulBuild/artifact/Root/Roots/JavaMonitor.tar.gz
tar zpxf JavaMonitor.tar.gz
rm JavaMonitor.tar.gz

4. Now we need to change some permissions:

Code Block

sudo chown -R appserver:appserveradm /opt/Local
sudo chown -R appserver:appserveradm /opt/Library

5. Now we can start wotask and Monitor

Code Block

[root@ ~]# sudo su - appserver

You can start wotaskd and Monitor 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 &

...

For Ubuntu distributions :
Code Block

sudo apt-get install apache2 apache2.2-common apache2-mpm-prefork apache2-utils apache2-threaded-dev ssl-cert

...

For CentOS, RedHat or Fedora distributions :
Code Block

yum install httpd mod_ssl httpd-devel
chkconfig httpd on
/etc/init.d/httpd start

...

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

Alias /WebObjects "/opt/Local/Library/WebServer/Documents/WebObjects"

and add a directive to allow fetching files in this directory:

Code Block

<Directory "/opt/Local/Library/WebServer/Documents/WebObjects">
      AllowOverride All
      Order allow,deny
      Allow from all
</Directory>

...

You also need, as explained by the adaptor's README file, to add this directive in httpd.conf :

Code Block

<LocationMatch /apps/WebObjects/.*>
    Order allow,deny
    Allow from all
</LocationMatch>

...

And edit /usr/local/apache/conf/extra/webobjects.conf to comment the LoadModule WebObjects_module line. You can also change the WebObjectsAlias property, in my case I use /apps/WebObjects. Last step : add the following line in httpd.conf (near the end):

Code Block

Include conf/extra/webobjects.conf

...

Jerome Chan told me that you can check if the Apache module is loaded by doing this :

Code Block

/usr/local/apache/bin/apachectl -M

...

Info

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

...

Info

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

...

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):

Code Block

/etc/WebObjects/Properties

And inside that file, add an array property that defines all the IP addresses assigned to your host, for example:

Code Block

er.extensions.WOHostUtilities.localhostips=(192.168.3.168,192.168.1.168)

...

If SELinux is enabled on your system, wotaskd won't run because of SELinux policies. You need to run be reachable due to its preventing Apache from opening TCP connections. If you're comfortable with allowing Apache to connect to any TCP ports (including external hosts), you can run the following:

Code Block

sudo setsebool -P httpd_can_network_connect=1

Alternatively, Steven Klassen has written Custom SELinux Port Access that outlines how to create and install a wotaskd SELinux module that specifically allows connections to port 1085.

Warning

Be aware that SELinux is enabled by default on CentOS 6.x, you will need to either call the setsebool command or to disable SELinux

...