{"id":47,"date":"2009-07-02T10:25:53","date_gmt":"2009-07-02T00:25:53","guid":{"rendered":"http:\/\/vmadmin.nt.com.au\/?p=47"},"modified":"2009-07-02T10:44:17","modified_gmt":"2009-07-02T00:44:17","slug":"installing-webobjects-on-rhel-centos-5-3","status":"publish","type":"post","link":"http:\/\/vmadmin.nt.com.au\/?p=47","title":{"rendered":"Installing WebObjects on RHEL Centos 5.3"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I like totally ripped most of these instructions from this site, <a title=\"Webobjects on RHEL Centos\" href=\"http:\/\/wiki.objectstyle.org\/confluence\/display\/WO\/Installing+WO+5.3+or+WO+5.4+on+Linux\" target=\"_blank\"><span style=\"margin: 0px; line-height: 1; text-decoration: none;\"> Installing WO 5.3 or WO 5.4 on Linux <\/span><\/a>, so please give your google adsense love clicks to it. Here is how we did it here&#8230;..the main differences are in our apache config and our developer wrote a better init.d script&#8230;..as quoted by him. NOW READ !!<\/p>\n<p>0. Before you begin you will require:<\/p>\n<ul>\n<li>Installed Sun JDK<\/li>\n<li>Installed Apache and development header files<\/li>\n<li>Add <a title=\"Dagmeister\" href=\"http:\/\/dag.wieers.com\/rpm\/\" target=\"_blank\">Dag&#8217;s rpmfusion repository<\/a>. Do not enable it though, we will call it when we need it.<\/li>\n<\/ul>\n<p>1. Get the WebObjects installer from mDimension&#8217;s Web site :<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>wget http:\/\/webobjects.mdimension.com\/wolips\/WOInstaller.jar<\/pre>\n<\/div>\n<\/div>\n<p>2. Install WebObjects 5.4.3 into \/opt<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>sudo java -jar WOInstaller.jar 5.4.3 \/opt<\/pre>\n<\/div>\n<\/div>\n<p>3.  Create a user to run wotaskd and JavaMonitor (we are going to follow Mac OS X convensions here)<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>sudo groupadd appserverusr\r\nsudo useradd -g appserverusr appserver<\/pre>\n<\/div>\n<\/div>\n<p>4.  Fix permissions<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>sudo mkdir \/var\/log\/webobjects\r\nsudo chown appserver:appserverusr \/var\/log\/webobjects\r\nsudo chown -R appserver:appserverusr \/opt\/Local\r\nsudo chown -R appserver:appserverusr \/opt\/Library\r\nsudo chmod 750 \/opt\/Library\/WebObjects\/JavaApplications\/JavaMonitor.woa\/JavaMonitor\r\nsudo chmod 750 \/opt\/Library\/WebObjects\/JavaApplications\/wotaskd.woa\/Contents\/Resources\/SpawnOfWotaskd.sh\r\nsudo chmod 750 \/opt\/Library\/WebObjects\/JavaApplications\/wotaskd.woa\/wotaskd<\/pre>\n<\/div>\n<\/div>\n<p>5.  Edit .bash_profile for the appserver user and add the NEXT_ROOT environment variable<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>export NEXT_ROOT=\/opt<\/pre>\n<\/div>\n<\/div>\n<p>6. Change to the appserver user and launch wotaskd and JavaMonitor to ensure everything is working<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>su - appserver\r\n\/opt\/Library\/WebObjects\/JavaApplications\/wotaskd.woa\/wotaskd &amp;\r\n\/opt\/Library\/WebObjects\/JavaApplications\/JavaMonitor.woa\/JavaMonitor -WOPort 56789 &amp;<\/pre>\n<\/div>\n<\/div>\n<p>7.  You should now be able to browse to JavaMonitor at:<\/p>\n<p><a rel=\"nofollow\" href=\"http:\/\/your.host.name:56789\/\">http:\/\/your.host.name:56789\/<\/a><\/p>\n<p>8.  If you have made it this far you can shut down wotaskd and JavaMonitor and add in the scripts to bring them up on boot.<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>kill `ps aux | awk '\/WOPort 56789\/ &amp;&amp; !\/awk\/ {print $2}'`\r\nkill `ps aux | awk '\/WOPort 1085\/ &amp;&amp; !\/awk\/ {print $2}'`<\/pre>\n<\/div>\n<\/div>\n<p>9.  Download the attached start-up script and place it in \/etc\/init.d<\/p>\n<p>10.  Instruct the init script to run the script at boot<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>chkconfig --add webobjects\r\n\/etc\/init.d\/webobjects start<\/pre>\n<\/div>\n<\/div>\n<p>11.  Download and unpack the Wonder source required for the apache adaptor<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>wget http:\/\/webobjects.mdimension.com\/wonder\/Wonder-latest-Source.tar.gz\r\ntar zxvf Wonder-latest-Source.tar.gz\r\ncd Wonder\/Utilities\/Adaptors<\/pre>\n<\/div>\n<\/div>\n<p>12.  Edit the make.config file to set the environment we are building on<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre># Set the platform you are building on\r\nADAPTOR_OS = LINUX<\/pre>\n<\/div>\n<\/div>\n<p>13. Build and install the module<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>make\r\ncd Apache2.2\r\napxs -i -a -n WebObjects mod_WebObjects.so<\/pre>\n<\/div>\n<\/div>\n<p>14. Add the following configuration to \/etc\/httpd\/conf.d\/webobjects.conf<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>&lt;IfModule mod_WebObjects.c&gt;\r\n\r\n# Path to the Document Root of your Webserver,\r\n# it should contain a directory named WebObjects\r\nWebObjectsDocumentRoot \/var\/www\/html\r\n\r\n# You can change the 'cgi-bin' part of WebObjectsAlias to whatever you\r\n# prefer (such as Apps), but the 'WebObjects' part is required.\r\nWebObjectsAlias \/cgi-bin\/WebObjects\r\n\r\n# We set a specific allow rule to prevent default restrictions from denying\r\n# access to the module\r\n&lt;Location \/cgi-bin\/WebObjects&gt;\r\n    Allow from All\r\n&lt;\/Location&gt;\r\n\r\n# Point \/WebObjects requests to the installed document root\r\nAlias \/WebObjects \/var\/www\/html\/WebObjects\r\n&lt;Location \/WebObjects&gt;\r\n    Options -Indexes\r\n    Allow from All\r\n&lt;\/Location&gt;\r\n\r\n# Here are the 3 possible configuration modes.\r\n# The apache module uses one of them to get information\r\n# about your deployed applications.\r\n# 1085 is the reserved port on which wotaskd processes listen to by default.\r\n\r\n# Host List Configuration\r\n# wotaskd is started automatically on supported platforms,\r\n# so this is the default mode.\r\n# The apache module gets its configuration from the wotaskds\r\n# listed on the configuration line\r\n# For multiple hosts:\r\n# WebObjectsConfig http:\/\/&lt;name-of-a-host&gt;:&lt;port-on-a-host&gt;,http:\/\/&lt;name-of-another-host&gt;:&lt;port-on-a-host&gt; &lt;interval&gt;\r\n# For localhost:\r\nWebObjectsConfig http:\/\/localhost:1085 10\r\n\r\n# Multicast Configuration\r\n# The apache module gets its configuration from all wotaskds\r\n# that respond to the multicast call on the subnet\r\n# WebObjectsConfig webobjects:\/\/239.128.14.2:1085 10\r\n\r\n# File Configuration\r\n# The apache module gets its configuration from one file\r\n# WebObjectsConfig file:\/\/&lt;path-to-a-xml-config-file&gt; 10\r\n\r\n# To enable public access to the WOAdaptorInfo page, uncomment the following line\r\nWebObjectsAdminUsername public\r\n\r\n# To enable the WOAdaptorInfo page with restricted access,\r\n# uncomment the next two lines and set the user and password\r\n# To access the WOAdaptorInfo page with restricted access, use\r\n# a URL like: http:\/\/webserver\/cgi-bin\/WebObjects\/WOAdaptorInfo?user+password.\r\n# WebObjectsAdminUsername user\r\n# WebObjectsAdminPassword password\r\n\r\n# To change the logging options, read the following comments:\r\n# The option name is \"WebObjectsLog\" and the first value indicates the path\r\n# of the log file.\r\n# The second value indicates the log level. There are five, in decreasing\r\n# informational order:\r\n#       \"Debug\",    \"Info\",    \"Warn\",    \"Error\",    \"User\"\r\n#\r\n# Note: To enable logging, touch '\/tmp\/logWebObjects'\r\n# as the administrative user (usually root).\r\n#\r\n# The following line is the default:\r\nWebObjectsLog \/tmp\/WebObjects.log Debug\r\n&lt;\/IfModule&gt;<\/pre>\n<\/div>\n<\/div>\n<p>15.  Copy the static content into the Apache document root<\/p>\n<div style=\"border-width: 1px;\">\n<div>\n<pre>cd \/opt\/Library\/WebObjects\/WODocumentRoot\r\ncp -R WebObjects \/var\/www\/html\/<\/pre>\n<\/div>\n<\/div>\n<p>all done!<\/p>\n<p>The init.d script<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>#!\/bin\/bash<br \/>\n#<br \/>\n# chkconfig: 345 90 10<br \/>\n# description: Provides WebObjects services<\/p>\n<p>USER=&#8221;appserver&#8221;<br \/>\nNEXT_ROOT=&#8221;\/opt&#8221;<br \/>\nWOTASKD_LOG=&#8221;\/var\/log\/webobjects\/wotaskd.log&#8221;<br \/>\nMONITOR_LOG=&#8221;\/var\/log\/webobjects\/JavaMonitor.log&#8221;<\/p>\n<p>export NEXT_ROOT<\/p>\n<p># Source function library.<br \/>\n. \/etc\/rc.d\/init.d\/functions<\/p>\n<p># Source networking configuration.<br \/>\n[ -f \/etc\/sysconfig\/network ] &amp;&amp; . \/etc\/sysconfig\/network<\/p>\n<p># Check that networking is up.<br \/>\n[ &#8220;${NETWORKING}&#8221; = &#8220;no&#8221; ] &amp;&amp; exit 0<\/p>\n<p>start() {<br \/>\necho -n &#8220;Starting wotaskd and Monitor: &#8221;<br \/>\ndaemon &#8211;user=$USER &#8220;$NEXT_ROOT\/Library\/WebObjects\/JavaApplications\/wotaskd.woa\/wotaskd -WOPort 1085 &gt;&gt; $WOTASKD_LOG 2&gt;&amp;1 &amp;&#8221;<br \/>\ndaemon &#8211;user=$USER &#8220;$NEXT_ROOT\/Library\/WebObjects\/JavaApplications\/JavaMonitor.woa\/JavaMonitor -WOPort 56789 &gt;&gt; $MONITOR_LOG 2&gt;&amp;1 &amp;&#8221;<br \/>\necho<br \/>\n}<\/p>\n<p>stop() {<br \/>\necho -n &#8220;Shutting down wotaskd and Monitor: &#8221;<br \/>\nWOTASKD_PID=`ps aux | awk &#8216;\/WOPort 1085\/ &amp;&amp; !\/awk\/ {print $2}&#8217;`<br \/>\nkill $WOTASKD_PID<br \/>\nMONITOR_PID=`ps aux | awk &#8216;\/WOPort 56789\/ &amp;&amp; !\/awk\/ {print $2}&#8217;`<br \/>\nkill $MONITOR_PID<br \/>\necho<br \/>\n}<\/p>\n<p># See how we were called.<br \/>\ncase &#8220;$1&#8243; in<br \/>\nstart)<br \/>\nstart<br \/>\n;;<br \/>\nstop)<br \/>\nstop<br \/>\n;;<br \/>\nstatus)<br \/>\nstatus $processname<br \/>\nRETVAL=$?<br \/>\n;;<br \/>\nrestart)<br \/>\nstop<br \/>\nstart<br \/>\n;;<br \/>\n*)<br \/>\necho $&#8221;Usage: $0 {start|stop|status|restart}&#8221;<br \/>\n;;<br \/>\nesac<\/p>\n<p>exit $RETVAL<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, I like totally ripped most of these instructions from this site, Installing WO 5.3 or WO 5.4 on Linux , so please give your google adsense love clicks to it. Here is how we did it here&#8230;..the main differences are in our apache config and our developer wrote a better init.d script&#8230;..as quoted by [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[10],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-linux","category-misc","tag-centos-webobjects-rhel"],"_links":{"self":[{"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47"}],"version-history":[{"count":4,"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":51,"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions\/51"}],"wp:attachment":[{"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/vmadmin.nt.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}