Wednesday, March 28, 2007

RSLD? A Really Simple Linux Deployment for WebObjects

I was expecting this to be much harder than it was. I read some of the pages out there on getting WebObjects installed onto Linux systems and looking at them just made my eyes cross. WebObjects is just java, isn't it?

I think the hardest part of this whole process was getting the right version of java onto the Linux box. I started with a RedHat-based system with java 1.4 as the default. Getting 1.5 onto it was a bit of a chore. Mac OS X just, you know, has stuff on it already. The Darwin ports stuff is there for other things. But a lot of things are just not that hard. Ok, working 15+ years at Apple may have given me a bit too much familiarity with it, but I doubt it.

Linux is just quirky. It can be nice. But it can also be deeply frustrating.

But, surprisingly, getting WebObjects to work on Linux was not hard.

First, I went to the /System/Library/Frameworks directory on my Mac. Then I just tarred up the Java* frameworks (sans JavaVM and such). Then I ftp-ed them over, created a /System/Library/Frameworks directory on the Linux system and slammed them down.

Then there was the question of what to do about a WOAdaptor. I tend to delete my /Developer/Examples contents on my various systems, so I could not put my hands on the adaptor sources. But then I realized I might not need them. I am not deploying huge apps. Not building a business on it yet. I just wanted to stop trying to deploy WO apps from my laptop.

I had started up my app by doing:
./myApp -WOPort 55555 &

So, I added some lines to the /etc/httpd/conf/httpf.conf file:

ProxyRequests Off
ProxyPass /cgi-bin/WebObjects/myApp.woa http://myHost:55555/cgi-bin/WebObjects/myApp.woa
ProxyPass /WebObjects/myApp.woa http://myHost:55555/cgi-bin/WebObjects/myApp.woa
ProxyPass /WebObjects/myApp/ http://myHost:55555/cgi-bin/WebObjects/myApp.woa
ProxyPassReverse /cgi-bin/WebObjects/myApp.woa/ http://myHost:55555/cgi-bin/WebObjects/myApp.woa/


And it just worked! Sweet. Wait. Hold on a second. I know what you are going to ask. "Does Apple support this?" OMG, I had not thought of that! Do they? Well, you know what. I do not care whether they support it or not! So, do not ask!

:-)

2 Comments:

At 8:59 PM , Blogger mejiad said...

I tried and it really works!

I'm waiting for your next post.

Saludos,

Daniel.

 
At 4:53 AM , Anonymous Anonymous said...

You can also deploy into a servlet container which is a bit easier on other platforms as the build can be done on a mac and then carried over to something like Tomcat or jetty.

http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Applications/Deployment/Tomcat_Deployment

Sure it's not quite so easy as a "wotaskd" deploy though.

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home