Checkout and Build Instructions

This page contains instructions on how to get the source code and build Open Web Server. Instructions for installing the libraries and tools required to build Web Server from source are also described in this page. These instructions assume that you are familiar with your operating system's software installation tool such as apt-get, yum, pkg etc.

Operating System Requirements

This page includes instructions for building the source code for Web Server on the various operating systems listed in the following table.

OpenSolaris Ubuntu Fedora Debian openSUSE
2008.11 8.10 9 or 10 Lenny 11.0

Although, the server code does build on Solaris 10 and on Windows, there currently isn't an easy way to install all the libraries and tools that are needed to build the source code for the server. Therefore, the build instructions for compiling the server on Windows and on Solaris 10 are not available at this time.

Required Libraries and Tools

The following table lists the external libraries and tools that are required to build Web Server from source. The packages (for each operating system) that contain these libraries and tools are also captured in the table.

Name Version OpenSolaris Ubuntu Fedora Debian openSUSE
Mercurial 1.0 or higher SUNWmercurial mercurial mercurial mercurial mercurial
GNU make 3.76 or higher SUNWgmake build-essential make make make
Java SE JDK 5.0 or higher SUNWj6dev sun-java5-jdk java-1.6.0-openjdk openjdk-6-jdk java-1_6_0-sun-devel
Ant 1.6 or higher SUNWant ant ant ant ant
C/C++ Compiler Sun Studio 11 (or higher) compilers or
GCC/G++ 3.x or
GCC/G++ 4.x
sunstudio SUNWhea g++ gcc-c++ g++ gcc
gcc-c++
NSPR 4.7 or higher SUNWpr SUNWprd libnspr4-dev nspr-devel libnspr4-dev mozilla-nspr-devel
NSS 3.12 or higher SUNWtls SUNWtlsd libnss3-dev libnss3-tools nss-pkcs11-dev libnss3-dev libnss3-tools mozilla-nss-devel mozilla-nss-tools
Xerces C 2.6.0 or higher SUNWxercesc (see below) libxerces27-dev xerces-c-devel libxerces-c2-dev libXerces-c-devel
Xalan C++ 1.9.0 or higher SUNWxalanc (see below) libxalan110-dev xalan-c-devel libxalan110-dev libXalan-c-devel
PCRE 5.0 or higher SUNWpcre libpcre3-dev pcre-devel libpcre3-dev pcre-devel
ICU 3.2 or higher SUNWicu SUNWicud libicu-dev libicu-devel libicu-dev libicu-devel
Zlib 1.2.3 or higher SUNWzlib zlib1g-dev zlib-devel zlib1g-dev zlib-devel
SASL 2.19 or higher SUNWlibsasl libsasl2-dev cyrus-sasl-devel libsasl2-dev cyrus-sasl-devel
Mozilla LDAP C SDK 6.0.x SUNWmozldap (see below) Not Available (See below for build instructions) mozldap-devel Not Available (See below for build instructions) Not Available (See below for build instructions)
Perl 5.8 or higher SUNWperl584usr perl perl perl perl
CVS 1.10 or higher SUNWcvs cvs cvs cvs cvs
Mozilla LDAP C SDK

Some Linux distros do not provide packages containing Mozilla's LDAP C SDK. The following describes how to checkout, build and install Mozilla LDAP C SDK for use by Web Server's build framework.

Building LDAP C SDK on Linux

  • Checkout Mozilla LDAP C SDK source code
    • cd
    • cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -P -rLDAPCSDK_6_0_5_RTM DirectorySDKSourceC
  • Configure and build Mozilla LDAP C SDK
    • cd mozilla/directory/c-sdk
    • ./configure --with-sasl --with-nspr-inc=/usr/include/nspr --with-nspr-lib=/usr/lib --with-nspr --with-nss-inc=/usr/include/nss --with-nss-lib=/usr/lib/nss --with-nss --enable-clu
    • make
  • Install the Mozilla LDAP C SDK header files and libraries for use by the Web Server build
    • cd ../../dist/
    • sudo mkdir /usr/local/include/mozldap /usr/local/lib/mozldap
    • sudo cp public/ldap/* /usr/local/include/mozldap/
    • sudo cp lib/* /usr/local/lib/mozldap/

Pre-build Instructions

In order to build the source code for Web Server you must install the libraries/tools that it depends on. The following describes the steps to install the libraries/tools described in the previous section.

OpenSolaris 2008.11

  1. Update your OpenSolaris installation with all the packages and tools needed to build Web Server
    • pfexec pkg refresh --full
    • pfexec pkg install sunstudioexpress
    • pfexec pkg install SUNWgmake SUNWhea SUNWmercurial SUNWpr SUNWprd SUNWtls SUNWtlsd SUNWant SUNWicu SUNWicud SUNWcvs
  2. The SUNWpr package is incomplete and this problem will be fixed in an upcoming update to 2008.11, for now the following kludge is necessary
    • cd
    • mkdir nspr
    • cd nspr
    • cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot get mozilla/nsprpub/pr/include/private/
    • cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot get mozilla/nsprpub/pr/include/obsolete/
    • pfexec mkdir /usr/include/mps/private
    • pfexec cp -r mozilla/nsprpub/pr/include/private/* /usr/include/mps/private/
    • pfexec cp -r mozilla/nsprpub/pr/include/obsolete/* /usr/include/mps/obsolete/
    • cd
  3. Add the Web Stack repository to your list of repositories. Assuming you don't already have some other authority called "webstack" (if you do, pick a different name).
  4. Update your OpenSolaris installation with additional libraries (hosted in the Web Stack repository) needed to build Web Server
    • pfexec pkg install SUNWmozldap SUNWxercesc SUNWxalanc

Ubuntu 8.10

  1. Update your Ubuntu installation with all the packages and tools needed to build Web Server
    • sudo apt-get install mercurial sun-java5-jdk ant build-essential libnspr4-dev libnss3-dev libnss3-tools libxerces-c2-dev libxalan110-dev libpcre3-dev libicu-dev zlib1g-dev libsasl2-dev perl g++
  2. Checkout, build and install Mozilla LDAP C SDK

Fedora 9/10

  1. Update your Fedora installation with all the packages and tools needed to build Web Server
    • sudo yum install mercurial java-1.6.0-openjdk ant make gcc-c++ xerces-c-devel xalan-c-devel pcre-devel nss-pkcs11-devel nspr-devel mozldap-devel libicu-devel cyrus-sasl-devel zlib-devel perl
    • sudo /usr/sbin/setenforce 0 (Fedora 10 only)

Debian Lenny

  1. Update your Debian installation with all the packages and tools needed to build Web Server
    • sudo apt-get install mercurial sun-java5-jdk ant libnspr4-dev libnss3-dev libnss3-tools libxerces-c2-dev libxalan110-dev libpcre3-dev zlib1g-dev libicu-dev libsasl2-dev make cvs g++ perl
  2. Checkout, build and install Mozilla LDAP C SDK

openSUSE 11.0

  1. Update your openSUSE installation with all the packages and tools needed to build Web Server
    • zypper install mercurial cvs java-1_5_0-sun-devel make ant mozilla-nspr-devel mozilla-nss-devel mozilla-nss-tools libXerces-c-devel libXalan-c-devel libicu-devel cyrus-sasl-devel zlib-devel pcre-devel gcc gcc-c++
  2. Checkout, build and install Mozilla LDAP C SDK

Checking Out, Building and Installing Web Server

The source code for Web Server is released under the BSD License. The Copyright/License block that you will see in the files is here.

Checking out and building the source code for Web Server involves the following simple steps:

cd
hg clone ssh://anon@hg.opensolaris.org/hg/webstack/webserver
cd webserver
make (on Ubuntu/Fedora/Debian/openSUSE)
gmake (on OpenSolaris)

By default, the build produces debug bits. To build an optimized binary, specify BUILD_VARIANT=OPTIMIZED to make/gmake. For example,
make BUILD_VARIANT=OPTIMIZED

Once the bits have been built, you can create a Web Server instance by invoking the following command in the top-level directory (webserver of the source tree.

make [BUILD_VARIANT=OPTIMIZED] install (on Ubuntu/Fedora/Debian/openSUSE)
gmake [BUILD_VARIANT=OPTIMIZED] install (on OpenSolaris)

If you specified BUILD_VARIANT=OPTIMIZED while building the server, then you must specify it when installing the bits as well.

make/gmake install creates a Web Server instance under the work sub-directory of your source tree.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jan 18, 2009

    cvr says:

    Would it be possible to add a few newbie tips to build this from scratch on a ne...

    Would it be possible to add a few newbie tips to build this from scratch on a new platform such as MacOS or FreeBSD?

    1. Sep 14

      mv says:

      Running Open Web Server on MacOS Blog Running Open Web Server on FreeBSD Blog ...
  2. Jul 17

    mv says:

    River Tarnell has compiled and built Open Web Server on HP-UX: hi, i've made ...

    River Tarnell has compiled and built Open Web Server on HP-UX:

    hi,

    i've made an initial release of the source and binaries for OWS on HP-UX. this
    should be considered preliminary, and obviously is not suitable for production

    more information: http://www.flyingparchment.org.uk/pages/ows

    - river.

  3. Sep 09

    mv says:

    Prem, In order to install Open Web Server in any directory other than "work" ...

    Prem,
    In order to install Open Web Server in any directory other than "work" you need to set WS_INSTALL_ROOT. For example :

    $gmake WS_INSTALL_ROOT=/export1/ows/
    $gmake WS_INSTALL_ROOT=/export1/ows/ install
    

    For more information look at webserver/templates/README

    1. Jul 17

      mv says:

      Prem wrote : I am getting this error : # https-test/bin/startserv Open Web ...

      Prem wrote :
      I am getting this error :

      # https-test/bin/startserv
      Open Web Server 1.0 B05/19/2009 11:29
      failure: HTTP3091: Error opening log file /space/ows/webserver/work/SunOS5.9_i86pc_DBG.OBJ/https-test/logs/access (No access rights)
      info: HTTP3072: http-listener-1: http://test.sun.com:8080 ready to accept requests
      info: CORE3274: successful server startup
      
      # ls -l https-test/logs/
      total 1
      -rw-r--r-- 1 abc staff 433 May 19 15:02 errors
      

      Prem,
      That is because you are checking out and installing as user "root", where as the output of logname command is "abc". Output of logname is put in server.xml "<user>abc</user>".

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact