See more articles about "Websites Help "

WebObjects Web Applications Deployment Linux



 19 July 02:04   

    (rev 1.5; 2003-03-02, see abounding afterlight list)

    The latest adaptation of this certificate can be begin at http://www.tetlabors.de/wo/setup_webobjects_on_linux.html.

    You can do with this how-to whatever you wish but do it at your own risk. I WILL Yield NO RESPONSIBILITIES WHATSOEVER. If you are not an able in these things, I advance ambience up a new arrangement just for analysis purposes first and then use your anew acquired ability on a absolute apple system.

    This how-to describes how to bureaucracy WebObjects deployment for Linux in about two hours - if you understand what you are doing. Otherwise, it ability yield a little bit longer. :-)

    It now covers accession of WebObjects 5.2 as able-bodied (see afterlight account at the end of this how-to for changes).

    This how-to is based on a German description on how to bureaucracy WebObjects beneath Linux by Timo Buhmann. Adaptation and reformatting into this HTML certificate was done by me with suggestions from the WebObjects commitment lists at OmniGroup and an commodity about Linux and WO by Jonathan Wolf Rentzsch.

    I am no authority if it comes to Linux - I accept acclimated it for about two canicule afore autograph this tutorial. Luckily, there were abundant humans about actuality I could ask all kinds of questions if I got stuck. If you see aberrant things or clumsy being in this how-to, amuse mail me and attentive forward forth corrections or improvements. Maybe Angel integrates Linux abutment in the next absolution of WebObjects so you wont not charge this how-to any longer. In the meantime: lets hack!

    To abbreviate delays during the process, you ability wish to put calm all the being you charge _before_ you start. For this how-to the afterward software was used:

    I am not abiding if installing just the JRE for Linux is enough. It absolutely does not plan for Windows deployment, so I absitively to accept the (somewhat bigger) SDK for Linux, too.

    a alive deployment authorization key; for WebObjects 5.1 you can use a authorization key from either a WebObjects 5.0 or 5.1 accession

    IMPORTANT: For WebObjects 5.2 you charge a key accurately create that version! Authorization keys for earlier versions assume to plan at first but after on you cannot run any applications. :-(

    changes to the makefiles that are discussed in move 6 can be downloaded here, if you do not wish to administer them yourself. Central the zipfile there are altered folders for WebObjects 5.1 and 5.2.

    In your Linux installation, the afterward bales should installed (the letter at the alpha of anniversary band lists the adapted amalgamation alternation for a SuSE 7.1 installation, this may be altered for additional Linux distributions):

    Here is what you _do not_ need, un-select this afore installing (or uninstall these bales if you already accept a active system):

    A acceptable abode to attending for bales is http://rpmfind.net. Let amalgamation dependencies be bound by the installer automatically and you are on the way...

    After Linux accession is complete, make the afterward folders; we after use them to bead the accession bales in and abolish them if we are done:

     mkdir -p /opt/install/apache

     mkdir -p /opt/install/java

     mkdir -p /opt/install/woupdate

    As Apache adaptation 2.x will not plan with the WebObjects adaptor, you accept to use Apache adaptation 1.3.x.

    Important

    Around June 20th, 2002, a aegis aperture in Apache became accepted that allows attackers to assassinate cipher on the server or maybe get even basis access. As all versions up to 1.3.24 are affected, you should use at atomic adaptation 1.3.26, which fixes this aegis hole.

    Put the downloaded apache sources (apache_1.3.27.tar.gz) in /opt/install/apache. Then untar:

     cd /opt/install/apache

     tar xfvz apache_1.3.27.tar.gz

     cd apache_1.3.27

    Configure, body and install Apache. The gdbm-devel amalgamation haveto be installed for this to work.

     ./configure --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --enable-shared=max --enable-rule=SHARED_CORE

     create clean; make; create install

    Make starting Apache a bit easier:

     ln -s /usr/local/apache/bin/apachectl /usr/bin/apachectl

    Try if it works:

     apachectl alpha

    Now accessible http:// in your browser. If you see the Apache absence page, aggregate is fine.

    Important

    In its absence accession (as explained in this how-to), the arrangement should be advised unsecure and not affiliated to the Internet after some affectionate of protection! As I understand next to annihilation about Linux/Apache aegis I acerb advance that you argue some aegis how-to on how to create you arrangement added secure.

    Put the downloaded SDK (j2sdk-1_4_0_01-linux-i586-rpm.bin) to /opt/install/java

     cd /opt/install/java

     chmod a+x j2sdk-1_4_1_02-linux-i586-rpm.bin

     ./j2sdk-1_4_1_02-linux-i586-rpm.bin

    Read the authorization acceding and access yes at the end. The software will then ameliorate the RPM package, so you can now install it:

     rpm -i -vv j2sdk-1_4_1_02-fcs-linux-i386.rpm

     ln -s /usr/java/j2sdk1.4.1_02/bin/java /usr/bin/java

    To see if it works, try this:

     java -version

    The achievement should attending similiar to this:

     java adaptation 1.4.1_02

     Java(TM) 2 Runtime Environment, Accepted Copy (build 1.4.1_02-b06)

     java HotSpot(TM) Applicant VM (build 1.4.1_02-b06, alloyed mode)

    Mount the WebObjects 5.1 accession disc:

     arise -t iso9660 -o nojoliet -o norock -o map=o /dev/cdrom /cdrom

     cd /cdrom

     ls

    Important:

    As the install software is case sensitive, files and folders on the CD accept to accommodate accustomed and basic letters. If you see aggregate in /cdrom getting displayed in either lowercase or uppercase but annihilation mixed, it did not work. :-(

    To get about this, you can archetype the capacity of the CD to a aggregate binder on a Windows box and apprehend it from there. Provided that the Windows box has the adress 192.168.1.1 and the allotment name is wocd, you can ability it like this:

     arise -t smbfs //192.168.1.1/wocd /cdrom -o username=smb,password=smb

    In this example, you will charge a user smb with its countersign set to smb on the Windows box. If you actuate the Bedfellow annual on Windows (not recommended), you can omit the username/password for the arise command.

    Start the install software and chase the instructions:

     cd /cdrom/Deployment/SOLARIS

     ./install.sh

    For accumulation setup, you can use the following:

     cd /cdrom/Deployment/SOLARIS

     ./install.sh -license B-111-AAA-111-AAA-111-AAA-111-AAA-111 -adaptorsOnly NO -minimalInstall NO -cgibin /usr/local/apache/cgi-bin -docroot /usr/local/apache/htdocs -woroot /opt/Apple

    First, be abiding to cd to /cdrom/Deployment/SOLARIS _before_ starting the accession or the authorization key analysis may fail. Second, instead of B-111-AAA-111-AAA-111-AAA-111-AAA-111 you should accommodate your absolute authorization key. :-)

    Follow the instructions on the awning and delay for the accession to finish.

    In case of an error, try the following:

     ln -s /usr/bin/uncompress /usr/bin/compress

    Now, make /etc/profile.local if it does not is yet:

     blow /etc/profile.local

    To consign NEXT_ROOT at anniversary startup, add the afterward curve to /etc/profile.local:

     NEXT_ROOT=/opt/Apple

     consign NEXT_ROOT

    Now you should log off and log in afresh to create NEXT_ROOT known. You can aswell consign NEXT_ROOT for your accepted affair manually:

     consign NEXT_ROOT=/opt/Apple

    To see if it works, access this:

     answer $NEXT_ROOT

    If /opt/Apple is echoed back, everythings fine. :-)

    Skip this move for WebObjects 5.2 as there is no amend accessible yet.

    Before starting the update, mod_WebObjects has to be unloaded from the web server and all WebObjects accompanying processes accept to stop. It should not amount in the case of this how-to back we never acclimated WebObjects so far, but to be on the safe side, access the following:

    apachectl stop

     cd $NEXT_ROOT/Library/WebObjects/Executables

     ./WOServices stop

    If you accept standalone (EOF/WO) apps running, annihilate them, too. Furthermore, gnutar has to be accessible for the application script. If it is not, you can make a link:

     ln -s /bin/tar /bin/gnutar

    To install the update, you accept to download two files: the amend itself (WO51SolarisUpdate3.TAR.Z) and the application software (patcher.sh). Put these two in /opt/install/woupdate and then alpha the update:

     cd /opt/install/woupdate

     chmod a+x patcher.sh

     ./patcher.sh -install WO51SolarisUpdate3.TAR.Z

     cd $NEXT_ROOT/Library/WebObjects/WODocumentRoot

     cp -R WebObjects /usr/local/apache/htdocs/WebObjects

    Edit $NEXT_ROOT/Library/Frameworks/JavaWebObjects.framework/Resources/WebServerConfig.plist :

     band 2: change /Library/WebServer/Documents to /usr/local/apache/htdocs

    Now comes the fun part: Accumulation the adaptor!

    As the makefiles do not address with Linux abutment - is there any complete cause for this, by the way? - you accept to add abutment yourself. Luckily the adaptor sources appear with WebObjects.

    All of the antecedent solutions I begin bankrupt the software in some way. For example, it was not accessible to run the software on Solaris after added modifications. Actuality we will do a apple-pie band-aid that adds abutment for Linux after breaking it for the additional platforms.

    First, consign the OS variable, so the software knows we are on Linux:

     consign OS=LINUX

    We do charge this alone while compiling, it is not all-important to put it into /etc/profile.local (but you can do this if you wish to). Next, accessible the book $NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors/make.config with an editor of your best and admit (copy and paste) the afterward curve appropriate afore the MacOS X Server access (around band 17):

     # LINUX

     ifeq LINUX $(OS)

     ADAPTORS = CGI Apache

     # Absence aisle for apxs

     APXS = /usr/local/apache/bin/apxs

     endif

    Save and exit.

    The next allotment is a bit catchy (for me) because actuality WebObjects 5.1 and 5.2 differ.

    

    Open $NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors/Apache/Makefile and copy-and-paste the afterward curve afterwards the endure endif (around band 66):

     ifeq LINUX $(OS)

     # If Apache is in a abnormal location, change this

     APACHEINCLUDEFLAGS = -I/usr/local/apache/include

     CFLAGS = -O2 -Wall -I../Adaptor $ $(DEBUG_FLAG) -DSINGLE_THREADED_ADAPTOR -D$(OS) -DEAPI -DFORKING_WEBSERVER -DAPACHE $ $ $ -L/lib

     APXSFLAGS = -i

     LDFLAGS += -G -L/lib -lc $

     all: adaptor

     adaptor: mod_WebObjects.so

     0$ $ mod_WebObjects.so

     mod_WebObjects.so : mod_WebObjects.o $

     # $ $ -c mod_WebObjects.c $

     # $ $ mod_WebObjects.o $

     0ld $ mod_WebObjects.o $ -o mod_WebObjects.so

     clean:

     0rm -f mod_WebObjects.so mod_WebObjects.o

     #mod_WebObjects.o: mod_WebObjects.c

     # $ $ -c mod_WebObjects.c

     mod_WebObjects.o: mod_WebObjects.c $

     0$ -c $ mod_WebObjects.c $

     endif

    Note: These funny searching circles (like at the alpha of: 0$ $ mod_WebObjects.so) are no accounting errors but the TAB (tabulator) key. The create action needs them to complete sucessfully, so do not overlook them!

    


    

    Open $NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors/Apache/Makefile and cut it about band 29, that agency afterwards the ifeq SOLARIS $ ... endif block, annul all afterward curve until the end of the file. Then adjoin the curve beneath to the end of the book so it looks like this:

     ifeq LINUX $

     ENABLE_SSL_SUPPORT =

     OPENSSL_INCL_FLAGS =

     OPENSSL_LIB_FLAGS =

     APACHE_INCL_FLAGS = -I/usr/local/apache/include

     CFLAGS +=-DEAPI $

     LDFLAGS += -G -L/lib -lc $

     endif

     CFLAGS += $

    APXSFLAGS = -i

    

     all: mod_WebObjects.so

     mod_WebObjects.so : mod_WebObjects.o $

     0ld $ mod_WebObjects.o $ -o mod_WebObjects.so

     0$ $ mod_WebObjects.so

     mod_WebObjects.o : mod_WebObjects.c $

     0$ -c $ mod_WebObjects.c $

     clean:

     0rm -f mod_WebObjects.so mod_WebObjects.o

     cover ../Adaptor/make.postamble

    


    From actuality on it is the aforementioned afresh for both versions.

    The endure book to change is $NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors/Adaptor/appcfg.c. Seek for the afterward three lines, starting about band 52:

     #ifndef MAXPATHLEN

     #define MAXPATHLEN 255

     #endif

    Cut-and-paste these three curve _after_ the afterward curve (around band 72), like so:

     #include / #include

     #endif

     #ifndef MAXPATHLEN

     #define MAXPATHLEN 255

     #endif

    After applying these changes, do the following:

     cd $NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors

     create clean; make

    During the accumulation process, mod_WebObjects.so is automatically placed into /usr/local/apache/libexec, there is no charge to do this by hand. If you acquisition mod_WebObjects.so there, accumulation was successful. The CGI adaptor has been built, too and can be begin at $NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors/CGI/WebObjects, if you wish to play about with that.

    Gratulations, you are about done!

    Copy the agreement book for WebObjects to the Apache conf folder:

     cd $NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors/Apache

     cp apache.conf /usr/local/apache/conf/webobjects.conf

    Edit /usr/local/apache/conf/httpd.conf. Seek for the band LoadModule rewrite_module ... and admit the afterward curve appropriate _before_ it:

     Cover /usr/local/apache/conf/webobjects.conf

    

     SetHandler WebObjects

    


    Search for the band AddModule mod_rewrite.c and put the afterward band appropriate _after_ that:

     AddModule mod_WebObjects.c

    Search for a band ServerName ... and put your DNS host name in there. If you do not accept one, you can use your IP adress, too. The account aural httpd.conf about this is actual good.

     ServerName yourhost.yourdomain.com

    Now adapt /usr/local/apache/conf/webobjects.conf:

     band 4: alter SYSTEM_LIBRARY_DIR/WebObjects/Adaptors/Apache/mod_WebObjects.so with /usr/local/apache/libexec/mod_WebObjects.so

     band 5: put a # in foreground of AddModule mod_WebObjects.c to animadversion it out

     band 9: alter LOCAL_LIBRARY_DIR/WebServer/Documents with /usr/local/apache/htdocs

    Optionally, you can change the following:

     band 13: /cgi-bin/WebObjects (can be afflicted to /myFunkyAlias/WebObjects)

     band 28: http://localhost:1085 10 (can be afflicted to http://host1:1085,http://host2:1085 10, dont put spaces afterwards the breach assurance if abacus assorted hosts!)

    Save and exit. Now, to see if aggregate is right, try:

     apachectl configtest

    If it says Syntax OK, you are fine. Else, try to acquisition and actual the errors it reports.

    Starting Apache is easy:

     apachectl start

    Start wotaskd:

     $NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd &

    When it is still active in the beginning afterwards a while, you can columnist CTRL+C to get aback to the shell; wotaskd then continues active in the background.

    The endure move afore abacus appliance is starting JavaMonitor and see if it works:

     $NEXT_ROOT/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789

    After JavaMonitor is launched, you will see a band similiar to the following:

    Your applications URL is:

     http://yourhost.yourdomain.com:56789/

    Open this URL in a web browser.

    Remember those accession folders you created in move 1? Now you can cautiously annul them unless you wish to install again:

     rm -rf /opt/install/apache

     rm -rf /opt/install/java

     rm -rf /opt/install/woupdate

    Important:

    Be actually abiding you blazon the aisle names in correctly; rm -rf takes no prisoners...

    Q: If I try to abridge the adaptor sources, I get the afterward absurdity and accumulation stops:

    In book included from ../Adaptor/appcfg.c:64:

     /usr/include/unistd.h:734: adverse types for `gethostname

     ../Adaptor/appcfg.c:57: antecedent acknowledgment of `gethostname

     make[1]: make: What does this mean?

    A: You accept abandoned to consign the OS variable. Do consign OS=LINUX afore compiling.

    Q: If I try to abridge the adaptor sources, I get the afterward absurdity and accumulation stops:

     Makefile:79: make:

    A: On the band the absurdity bulletin specifies (79 in this example), add a TAB appearance at the beginning. Just abacus several amplitude characters will not help. TAB characters (ASCII appearance no. 9) can be entered this way:

    Q: During compilation, a lot of warnings are displayed. Do I accept to anguish about that?

    A: There are two altered things displayed:

     mod_WebObjects.c:242: warning: `setOption3 authentic but not used

    You can apparently animadversion out this adjustment if accumulation beneath Linux but I am not abiding if you may charge this on Solaris or OSX. My ambition was to create the sources accordant on every platform.

     cc: .o: linker ascribe book bare back bond not done

    Probably bond works altered or is not bare on Linux. If you understand which band to abuse in the makefile, amuse forward me the changes and I will amend the how-to.

    Q: I cannot affix to an appliance if it is run from the command line, i.e. not via Monitor, what can I do?

    A: Just add -WODirectConnectEnabled YES as an altercation if starting the appliance and then affix via http://host:port.

    - no added troubles to shoot so far, cat-and-mouse for new questions to appear :-)

    1.5: 2003-03-02

    - added abutment for WebObjects 5.2 accession as well

    - adapted Apache and java SDK adaptation numbers and hyperlinks

    1.4: 2002-08-01

    - buried alotof mailto: links to create it added difficult for spammers (should accept done this appropriate from the start)

    1.3: 2002-06-30

    - added two questions to the troubleshooting section

    - added a admonishing for the Apache aegis aperture and adapted the how-to for Apache 1.3.26

    - added aegis admonishing at the end of move 2

    - added how to make a tab on the keyboard in the troubleshooting section

    1.2: 2002-06-18

    - added changes to appcfg.c to abstain a compiler Interface' onMouseOver="tip('infobox11')" onMouseOut="untip()" target='_parent'> compiler warning

    1.1: 2002-06-14

    - added some troubleshooting stuff

    - adapted accordant locations of the how-to to use Amend 3 for WebObjects instead of Amend 2

    1.0: 2002-06-09

    - first (working) release

    0.9: 2002-06-08

    - first release, cat-and-mouse to canyon self-test

    


 


 webobjects, apache, linux, install, local, following, adaptor, installation, adaptors, lines, cdrom, deployment, update, script, export, library, developer, examples, version, license, source, starting, added, solaris, security, support, system, works, sources, endif, compilation, clean, enable, apachectl, windows, start, changes, profile, error, maxpathlen, mount, appcfg, setup, makefile, change, folders, compiling, different, running, j2sdk, javamonitor, applications, create, packages, package, wotaskd, adding, things, updated, paste, troubleshooting, warning, cflags, application, found, addmodule, flags, search, process, beginning, default, everything, shared, rewrite, build, mkdir, module, displayed, password, patcher, webserver, stuff, server, versions, example, downloaded, questions, , mod webobjects, usr local, local apache, opt install, 111 aaa, aaa 111, root developer, examples webobjects, developer examples, source adaptors, webobjects source, apache conf, following lines, install apache, root library, adaptors apache, library webobjects, export next, etc profile, license key, install java, usr bin, adaptor appcfg, setup webobjects, ifeq linux, search for, need this, addmodule mod, conf webobjects, starting the, security hole, windows box, cdrom deployment, adaptor sources, i586 rpm, profile local, linux i586, deployment solaris, usr local apache, root developer examples, examples webobjects source, developer examples webobjects, webobjects source adaptors, opt install apache, local apache conf, root library webobjects, opt install java, export next root, cdrom deployment solaris, source adaptors apache, etc profile local, apache conf webobjects, ifndef maxpathlen define, apache include cflags, library webobjects javaapplications, local apache include, conf webobjects conf, local apache libexec, maxpathlen define maxpathlen, following lines right, opt install woupdate, local apache htdocs, deployment solaris install, applications deployment linux, web applications deployment, open next root, lines right before, source adaptors make, adaptors apache makefile,

Share WebObjects Web Applications Deployment Linux:
Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

WebObjects Web Applications Development Examples Login
Here is a little archetype on how to alter a appeal to a login page if necessary: accessible abandoned appendToResponse(WOResponse aResponse, WOContext aContext) this.currentSession().setPage( this.name() ); super.appendToResponse( aResponse, aContext); }WOConte

WebObjects EOF Using EOF Assembly and Notifications
To invalidate buried versions of acquired values, you ability wish to use this: / accessible chic ChangeNotificationCenter ); // Clandestine chic variables / clandestine changeless ChangeNotificationCenter defaultCenter = null; // Constru

WebObjects Web Applications Development WOEvents and Logging
These are the accessible alter levels (WebObjects 5.2.2):Debug groups are authentic as flags in a 64 bit array. The amount apparent in the affidavit is the basis of the specific alter accumulation banderole in this array.For example, if you wish to alpha the logging of WebObjects and EO

WebObjects EOF Using EOF Disengage and Accommodate
Can anyone acquaint me if the NSUndoManager is alone acclimated with EOF or can I use it in my own appliance (not using EOF) ?Undo/Redo can be acclimated with any affectionate of app (thats why you acquisition NSUndoManager in Foundation and not some college action akin framework like WOF or

WebObjects Web Applications Development Examples Accessible Hotlink in New Window
Aperture a hotlink in a new window using JavaScript. Theres infact a decidedly simple way to do it. Just use a WOHyperlink, with an onclick binding. Hyperlink3: WOHyperlink The absorbing this is, the hyperlink is sending itself to the openInNewWindow?() function, which then gets the URL fro

WebObjects Web Applications Development Profiling WO Apps
A profiler is a development apparatus that lets you appraise anamnesis useage and additional bottlenecks in your app. Ive approved some of them.For the big problems jprofiler is great. The docs are useful, the interface is acceptable and the achievement is okay.I adopt jMechanic. Its sma

WebObjects Web Applications Development Examples Acknowledgment a Book
To acknowledgment a book from a hyperlink, the easiest way to seems to be over riding appendToResponse in a WOComponent to acknowledgment that book as a response, rather than absolution the WOComponent accomplish its own acknowledgment from .html/.wod files: accessible abandoned appendToRespons

WebObjects Direct-To Web
There are two frequently referred to onlinewriting by Max Muller that were accounting several years ago. The first is amid at Stepwise (or in the Admiration frameworks): http://www.stepwise.com/Articles/Technical/D2W/D2W1.htmlThere is a additional allotment to the commodity alone accessible

WebObjects Web Casework Web Account Customer
1. WOWebServiceClient chic deceit admission to a defended HTTP Web account provider (WO 5.2.2):Problem:The com.webobjects.webservices.client.WOWebServiceClient chic just throws barring like this one if it tries to apprehend the WSDL from a defended HTTP Web account provider: java.la

WebObjects Web Casework How to Assurance Any SSL Affidavit
Sometimes, its would be usefull to relax the Java aegis administrator to acquiesce affiliation to defended HTTP server using self signed certificate, abnormally during development phase. To abstain Java barring on HTTPS connection, its accessible to add cocky active affidavit to the Java trusted