Tuesday September 08, 2009 Building Open Web Server on OpenSolaris SPARC
I tried building Open Web Server on OpenSolaris SPARC.
Install package as given in http://wikis.sun.com/display/wsFOSS/Checkout+and+Build+Instructions
SUNWmozldap, SUNWxercesc, SUNWxalanc in http://src.opensolaris.org/source/xref/webstack/ were probably not built for 64 bit. I have only tested on OpenSolaris x86 32 bit. They do not work on SPARC yet.
Run this script it builds and puts Mozilla LDAP C SDK and puts it in /usr/local/include/mozldap/, /usr/local/lib/mozldap, /usr/local/lib/mozldap/64
#!/bin/sh #building 32 bit
cd
cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -P -rLDAPCSDK_6_0_5_RTM DirectorySDKSourceCcd mozilla/directory/c-sdk./configure --with-sasl --with-nspr-inc=/usr/include/mps --with-nspr-lib=/usr/lib/mps --with-nspr --with-nss-inc=/usr/include/mps --with-nss-lib=/usr/lib/mps --with-nssgmakecd ../../dist/sudo mkdir -p /usr/local/include/mozldap /usr/local/lib/mozldapsudo cp public/ldap/* /usr/local/include/mozldap/sudo cp lib/* /usr/local/lib/mozldap/cdmv mozilla mozilla32#building 64 bitcvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -P -rLDAPCSDK_6_0_5_RTM DirectorySDKSourceCcd mozilla/directory/c-sdk./configure --with-sasl --with-nspr-inc=/usr/include/mps --with-nspr-lib=/usr/lib/mps/64 --with-nspr --with-nss-inc=/usr/include/mps --with-nss-lib=/usr/lib/mps/64 --with-nss --enable-64bitgmakecd ../../dist/sudo mkdir -p /usr/local/lib/mozldap/64sudo cp lib/* /usr/local/lib/mozldap/64cdmv mozilla mozilla64
Build Xerces C and Xalan C 32 bit and 64 bit and put it in /usr/local/ area.
Build Xerces C 2.6 from http://xerces.apache.org/xerces-c/build-2.html
Build Xalan C 1.9 from http://xml.apache.org/xalan-c/build_instruct.html
hg clone ssh://anon@hg.opensolaris.org/hg/webstack/webserver
gmake BUILD_VARIANT=OPTIMIZEDIf you want 64 bit support also
gmake BUILD_VARIANT=OPTIMIZED BUILD64=1
gmake BUILD_VARIANT=OPTIMIZED installIf you want 64 bit also
gmake BUILD_VARIANT=OPTIMIZED install BUILD64=1
Go to work/B1/*/https-test/config directory. To run Open Web Server in 64 bit you need to add <platform>64</platfrom> in server.xml "server" element.
If you get error that looks like
ld: fatal: file /usr/lib/64/libsqlite3.so: version `SQLITE_3' does not exist:
required by file /usr/lib/mps/64/libsoftokn3.so
$mv /usr/lib/64/libsqlite3.so /usr/lib/64/libsqlite3.so.BACK
http://wikis.sun.com/display/wsFOSS/Checkout+and+Build+Instructions
http://forums.sun.com/thread.jspa?messageID=10810336#10810336
Posted by meena ( Sep 08 2009, 06:38:35 PM IST ) Permalink Comments [0]Running Open Web Server on FreeBSD
Downloaded Free BSD from ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7.2/7.2-RELEASE-i386-dvd1.iso.gz
and installed it.
For reference, see http://wikis.sun.com/display/wsFOSS/Checkout+and+Build+Instructions
To search for a package, I used cd /usr/ports; make search name="mercurial" and so on.
First make sure that you already have these components
| GNU make 3.81 | /usr/local/bin/gmake |
| C/C++ Compiler 4.2.1 | /usr/bin/g++ and gcc |
| Zlib | /usr/lib/libz.so already installed |
| Perl 5.8.9 | /usr/bin/perl |
| CVS 1.11.22.1 | /usr/bin/cvs |
| Mercurial |
cd /usr/ports/devel/mercurial; make install |
|
Java SE 5 or 6 |
Due to license problems had to manually download and putting
it in /usr/ports/distfiles
|
| Ant | cd /usr/ports/devel/apache-ant; make install
|
| NSPR | cd /usr/ports/devel/nspr; make install |
| NSS | cd /usr/ports/security/nss; make install |
|
Xerces C++ |
cd
/usr/ports/textproc/xerces-c2; make install cd /usr/ports/textproc/xerces-c2-devel; make install selected Use ICU transcoder option. Build thread safe version of library. Got an error "/usr/bin/ld: can not find -lgcc_pic" For this we need to manually modify "files/filepatch-src-xercesc-Makefile.incl" and change "-lgcc_pic" to "-lgcc" |
|
Xalan C++ |
cd
/usr/ports/textproc/xalan; make install Selected INMEN and TRANSCODER_ICU options. |
| PCRE |
cd /usr/ports/devel/pcre; make install |
| ICU | cd /usr/ports/devel/icu; make install |
| SASL | cd /usr/ports/security/cyrus-sasl2; make install |
|
Mozilla C SDK* |
--with-sasl-lib=/usr/local/lib --with-nspr-lib=/usr/local/lib --with-nspr-inc=/usr/local/include/nspr/ --with-nspr --with-nss-lib=/usr/local/lib/nss --with-nss-inc=/usr/local/include/nss/nss/ --with-nss
|
*Note There is one /usr/ports/net/ldapsdk. It downloads and builds ldapsdk_12311998.tar.gz.
But I can see it in ancient now from mozilla site http://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/ancient/
So I built Mozilla C SDK myself.
One manual hack you need to do in "/usr/local/include/prinet.h"
#if defined(FREEBSD) || defined(BSDI) || defined(QNX)
#include <rpc/types.h> /* the only place that defines INADDR_LOOPBACK */
#endif
replace it by
#ifndef INADDR_LOOPBACK
#define INADDR_LOOPBACK (u_long)0x7F000001
#endif
Go to work/FreeBSD7.2-RELEASE_OPT.OBJ/https-test/bin/ directory and start the server instance using startserv script.
For the last two gmake commands, you can add WS_INSTALL_ROOT=/opt/ws if you want the server instance to be installed in /opt/ws/https-test
References:
Running Open Web Server on MacOS
I tried to run Open Web Server on iMac with Mac OS X 10.5.7 on it.
Install http://svn.macports.org/repository/macports/downloads/MacPorts-1.7.1/MacPorts-1.7.1-10.5-Leopard.dmg as per http://www.macports.org/install.php
sudo port install mercurial nspr nss pcre icu xercesc xalanc
|
As you can see the server starts up on port 8080. |
Note that
I am using "_xpatomic_locked.h" for now. Their performance needs to be optimized using functions in /usr/include/libkern/OSAtomic.h.
NSPR's PR_GetLibraryFilePathname dumps if called with NULL as first argument on MAC so added a hack of PR_GetLibraryFilePathname("ns-httpd40"..).
Some filenames are ugly like defines___.mk will fix it later.
If you see entries in error log like :
Run Web Server in finest log level ( set <log-level>finest</log-level> in server/xml). And look for messages likefailure : HTTP3360: connection limit (1) exceeded.
PollManager::RequestReservation() keep-alive subsystem full
fine: operating system file descriptor limit is 256Now I changed it to 1024 :
fine: allocating 1 file descriptors to the connection queue, 1 file descriptors to keep-alive connections, and 1 file descriptors to the file cache
fine: 130 connection maximum (1 queued, 128 active, 1 keep-alive)
fine: HTTP3066: HTTP keep-alive subsystem will accomodate up to 1 connections
$ulimit -a
open files (-n) 256
...
$ulimit -n 1024
$./https-test/bin/startserv
fine: operating system file descriptor limit is 1024
fine: allocating 128 file descriptors to the connection queue, 128 file descriptors to keep-alive connections, and 8 file descriptors to the file cache
fine: 384 connection maximum (128 queued, 128 active, 128 keep-alive)
fine: HTTP3066: HTTP keep-alive subsystem will accomodate up to 128 connections
References
Open Web Server code has been updated
This is to announce that Open Web Server code has been updated. It has all relevant bug fixes that went into Sun Java System Web Server 7.0 update 4 and 5 releases.
Posted by meena ( May 13 2009, 03:23:56 PM IST ) Permalink Comments [2]This blog copyright 2009 by meena