Building Apache & PHP on HP-UX 11.11 - TekWire.Net Last Updated Thursday, 16 September 2010 22:34 1. Introduction 1.1. Intended audience 1.2. Getting the source packages 1.3. Modules & extensions 1.4. Software dependencies 1.5. Notational conventions 1.6. Context 1.7. Pre-requisite 1.7.1. Software 1.7.2. Patch level 1.7.2.1.Linker patch 2. Building 2.1. Environment 2.2. Creating the target structure 2.3. External dependencies 2.3.1. Oracle 2.3.2. Java 2.4. Embedding a private libgcc_s library 2.5. Compiling zlib (1.2.3) 2.6. Compiling the OpenSSL library (0.9.8j) 2.7. Compiling the OpenLDAP library (2.4.11 - 20080813) 2.8. Compiling the expat library (2.0.1) 2.9. Compiling the iconv library (1.12) 2.10. Compiling the Berkeley DB library (4.7.25) 2.11. Compiling Apache (2.0.63) 2.12. Compiling the bzip2 library (1.0.1) 2.13. Compiling managelogs (1.0.1) 2.14. Compiling mod_jk (tomcat-connectors 1.2.27) 2.15. Compiling the xml2 library (2.7.2) 2.16. Compiling the pcre library (7.8) 2.17. Compiling mod_evasive (1.10.1) 2.18. Compiling mod_auth_cas (1.0.8) 2.19. Compiling the xslt library (1.1.24) 2.20. Compiling the png library (1.2.33) 2.21. Compiling the jpeg library (v6b) 2.22. Compiling the freetype library (2.3.7) 2.23. Compiling the SSH2 library (1.0) 2.24. Compiling the Curl library (7.19.2) 2.25. Compiling modsecurity (2.5.7) 2.26. Compiling the ncurses library (5.7) 2.27. Compiling gettext (0.17) 2.28. Compiling the Subversion modules (1.5.4) 2.29. Compiling the readline library (6.0) 2.30. Compiling libgpg-error (1.6) 2.31. Compiling the libgcrypt library (1.4.4) 2.32. Compiling the GnuTLS library (2.6.4) 1 / 58 Building Apache & PHP on HP-UX 11.11 - TekWire.Net Last Updated Thursday, 16 September 2010 22:34 2.33. Compiling the GnuTLS Apache module (0.4.3) 2.34. Compiling the IMAP library (2007d) 2.35. Compiling the MySQL client library (5.0.67) 2.36. Compiling the PostgreSQL client library (8.3.5) 2.37. Compiling mm (1.4.2) 2.38. Compiling m4 (1.4.12) 2.39. Compiling GNU awk (3.1.6) 2.40. Compiling bison (2.4.1) 2.41. Compiling the mcrypt library (2.5.8) 2.42. Compiling PHP 4 (4.4.9) 2.43. Compiling PHP 5 (5.2.6) 2.44. Compiling autoconf (2.63) 2.45. Compiling the ming library and PHP extension (0.4.2) 2.46. Compiling the SSH2 PHP extension (0.11.0) 2.47. Compiling the APC PHP extension (3.0.19) 3. Cleanup 4. Configuring 4.1. System 4.2. Apache 4.3. Oracle client 4.4. PHP 5. Checking 5.1. Starting Apache/PHP 5.2. Checking the PHP modules 6. Packaging 6.1. RPM 6.1.1. Creating the package 6.1.2. Installing the package 6.2. Tar/gzip 6.2.1. Creating the package 6.2.2. Installing the package 6.3. Configuring the package 7. The end Document history v 1.0-1 JUN 2006 - Creation v 1.1-1 JUL 2006 - Add mod_jk Apache module - Add imap PHP extension - Add RPM creation on Linux - Suppress AdoDB 2 / 58 Building Apache & PHP on HP-UX 11.11 - TekWire.Net Last Updated Thursday, 16 September 2010 22:34 v 1.2-1 SEP 2006 - Component upgrade to the latest stable versions. v 1.4-4 SEP 2006 - Add PHP 4 v 1.4-5 OCT 2006 - Add Apache modules : isapi dumpio logio proxy proxy_connect proxy_ftp proxy_http. - Add the mm library (allows to store PHP session information in shmem). v 1.4-9 NOV 2006 - Minor bug corrections and optimizations v 1.5-0 FEB 2008 - Component upgrade to the latest stable versions. - Add gettext support to PHP - Apache now uses the gdbm library (solving an issue with ndbm on AIX) - Add the mod_security, auth_digest, and mod_evasive Apache modules v 1.5-1 DEC 2008 - Component upgrade to the latest stable versions. - Add zip extension to PHP 5 - Add the Subversion Apache modules. Because of these modules, replace gdbm with Berkeley DB in apr-util. - Add managelogs - Add mbstring extension to PHP 4 & 5 v 1.6-1 JAN 2009 - Add the following extensions to PHP 4 & 5 : dba, ssh2, APC - Add the tools needed to compile PECL extensions (autoconf and m4) - Add Berkeley DB4 support to PHP 4 & 5 v 1.6-2 MAR 2009 - Enhanced documentation - Suppress the embedded libgcc library on Linux - Suppress the embedded stdc++ library - Add the mod_auth_cas Apache module (CAS authentication) - Workaround on HP-UX to use the random() function in libapr (suppresses the dependency to KRNG11i on HP-UX 11.11) - Upgrade managelogs to version 1.0.1 3 / 58 Building Apache & PHP on HP-UX 11.11 - TekWire.Net Last Updated Thursday, 16 September 2010 22:34 - Workaround in OpenSSL on HP-UX 11.00 : SSL connection could not be established due to a problem of random number generation. - Add xml/xslt support to postgresql. v 1.7-0 APR 2009 - Add the following PHP extensions (and related libraries): ming, xmlrpc, ncurses, mcrypt. - Add the GnuTLS Apache module. - Add readline support to the PHP CLI interpreters. - Add support for CDB (Constant DataBase) files in PHP 4 & 5 - Add support for microsoft style .ini files in PHP 5 - Add SSH support to curl - Add RPM packaging on non-Linux OS 1 - Introduction This document details how to compile a full-featured Apache/PHP distribution. The main difference with other tutorials you may find on the web is that this document not only explains how to compile Apache and PHP, but also every library they depend on. This is a 'black-box' approach, where the software comes with everything it needs to run. It is longer and more complex to build such a package but, once it is done, it brings a lot of benefits, such as an independance between your software package and the libraries that may be already installed on the target host. Such a 'self-contained' approach makes it easier to build and deploy functionaly-identical packages on several different platforms/OS. Of course, the software still uses the low-level system libraries, but the dependencies are limited to the bare minimum, minimizing the risk of inconsistent behaviors between different hosts/platforms. To complement this 'black-box' approach, we install the software in a private directory. This makes the package much simpler to manage, deploy , upgrade, or remove (compared to the traditional method of installing everything under /usr/local/[bin|lib|...]). Actually, we don't include everything needed by the package, as we only include everything we can compile . The exceptions are the Oracle client library and the JAVA JRE, which are considered as 'external dependencies' and accessed through symbolic links (so that they can be physically located anywhere on the target host). 1.1 - Intended audience 4 / 58 Building Apache & PHP on HP-UX 11.11 - TekWire.Net Last Updated Thursday, 16 September 2010 22:34 This document can be used in two different ways : - In order to apply the procedure and build the software exactly as it is described here, you don't need to be an expert : it just requires some basic Unix and shell knowledge, such as being able to download the source packages, uncompress/untar them, and create files with a text editor. At this level, the procedure given below can be splitted in two main steps : - you first set a limited number of environment variables (essentially the installation directory) - and the rest is just a suite of copy/paste operations from the document to your shell environment. - Now, if you want to understand everything that is explained below, or if you want to adapt it to your specific needs, it requires of course more knowledge on different domains, mostly : - build mechanisms in general, - compile and link operations (with a strong focus on shared libraries), - makefiles, - the Gnu autoconf -based configure/make process, - and even, when it is really needed, the ability to understand and adapt some C source code. So, to resume, most people will just apply the procedure described below, which is relatively easy and just requires a basic working knowledge of the Unix shell environment. Don't hesitate to post comments on issues you may have with this document. Each time you do it, you help me and the community in general to make the procedure more robust and reliable. I promise to reply to every question asked in comments. Please prefer comments to direct mail as they may benefit others. 1.2 - Getting the source packages Some readers sometimes ask why I don't provide copies of the source packages I list below. Sure, it would be easier for you, but I won't do it as you MUST get your source packages from a repository you can trust ! You don't know me, you CANNOT trust source code downloaded from my site (except for my own projects). So, once again, always get your software from a trusted source and, when a package signature is provided, check it to make sure you get the official code. I insist on this because compiling some modified source code or installing some corrupted 5 / 58 Building Apache & PHP on HP-UX 11.11 - TekWire.Net Last Updated Thursday, 16 September 2010 22:34 precompiled binaries would give hackers everything they need to take control on your site (remember that most software we compile here runs as root).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages58 Page
-
File Size-