Build and Install Guide

From GridSiteWiki

This Guide explains how to build GridSite from source, and how to install the server components alongside an Apache 2.0 webserver. There is a separate Config Guide which explains how to modify the httpd.conf file, and how to set up other files and directories used by the system. You should look through all of this Building and Installation Guide to decide which is the easiest route for your system.

Table of contents

Installing with RPM

If you are installing on Linux with a binary RPM release, you can skip most of this Guide, install the binary rpm(s) and go straight to the Config Guide.

RedHat 9, Fedora, RHEL, Scientific Linix: This is the simpler case, since the standard release includes a suitable version of Apache 2.0: just install the gridsite-...-1.i386.rpm to get the various GridSite components.

Earlier, eg RedHat 7.3: This is more complicated because you must also install a back-ported Apache 2.0 RPM or build it from source.

GridSite also depends on shared libraries from libcurl and libxml2, and the RPMs distributed as part of the standard RedHat, from 7.3 onwards, are sufficient.

With the RPMs installed, you can proceed to the Config Guide.

Requirements for building GridSite from source

GridSite is currently only supported on Linux, but should be straightforwardly portable to other Unix platforms where the GNU build tools are available.

GridSite consists of a core library (libgridsite[.so|.a]), an Apache module (mod_gridsite.so), a CGI utility (gridsite-admin.cgi) and some command line tools (htcp, urlencode.)

All of the components use the GridSite library, and this in turn depends on libcurl and libxml2. You will need the development versions of these packages installed before you can proceed.

Building GridSite with Make

Our download area at https://www.gridsite.org/download/ includes a tar-ball distribution of the sources, which can be unpacked and used to build GridSite from source. (Bleeding-edge developers can get the current snapshot of the same files from our CVS area.)

GridSite needs a copy of the Apache 2.0 include files to build, and the location of this is set by the MYCFLAGS variable in the top-level Makefile. For manual builds, the default MYCFLAGS=-I/usr/local/include/httpd is used. If you wish to use the GridSite module with Apache 2.0 installed elsewhere, you should change the MYCFLAGS variable to point to the includes directory installed by the development part of that Apache 2.0 distribution.

make 
make install

will build all components and install them all under the default locations of /usr/local/[lib|bin|include|sbin] The default prefix for manual builds is /usr/local, as set by the prefix variable in the top level Makefile (/usr is the default for RPMs.)

Building GridSite with RPM

For RedHat Linux and derivatives, building with RPM is recommended. The command make rpm in the top level of the source tree will build the GridSite and htcp binary RPMs in the directory ../RPMTMP/RPMS/i386 relative to the working directory. An SRPM is put into ../RPMTMP/SRPMS This build assumes the Apache 2.0 includes are in /usr/include/httpd.

For other configurations, you can modify the assumed location of the Apache 2.0 includes by changing the MYCFLAGS variable in the rpm target near the foot of the top level Makefile. Building Apache 2.0

If it is not possible to use binary RPMs of Apache 2.0, then it can be built from source using the build-apache2.sh script found in the GridSite docs directory. The script includes instructions on how to build from the tarballs distributed by the Apache Foundation. (it removes the -C option from "configure -C" in the .spec file and builds the RPMs under the current directory.)

If these targets do not work on your build platform, the Makefile and the scriptlets in the included SPEC files are a good starting point for building Apache by hand yourself. The complexities of this are outside of the scope of this Guide, but you are welcome to ask for assistance on the GridSite Discussion List, although http://www.apache.org/ is a better starting point for purely Apache problems.