diff --git a/LDP/howto/docbook/Apache-Compile-HOWTO.sgml b/LDP/howto/docbook/Apache-Compile-HOWTO.sgml index 54532700..72400494 100644 --- a/LDP/howto/docbook/Apache-Compile-HOWTO.sgml +++ b/LDP/howto/docbook/Apache-Compile-HOWTO.sgml @@ -2,7 +2,7 @@
- Apache Compile HOWTO (Linux edition) + Apache Compile HOWTO Luc @@ -16,6 +16,15 @@ + + 1.9.18 + 2003-02-09 + Added XML and Sablotron support to PHP, dropped support for mod_jserv, added mod_jk support, enhanced support for Tomcat, + updated software mentioned in the HOWTO, minor SGML enhancements + + + + 1.9.17 2002-10-16 @@ -42,8 +51,8 @@ 1.9.14 2002-06-19 - Updated to Apache 1.3.26 to fix security-hole CERT CA-2002-17 it is strongly recommanded that users shoud update - immediately, Added (temporay) patch to get mod_ssl 2.8.8 working with 1.3.26, Added --without-debug to MySQL configure + Updated to Apache 1.3.26 to fix security-hole CERT CA-2002-17 it is strongly recommended that users should update + immediately, Added (temporary) patch to get mod_ssl 2.8.8 working with 1.3.26, Added --without-debug to MySQL configure @@ -155,7 +164,7 @@ -Securityhole in <application>Apache</application> older than 1.3.26 +Security hole in <application>Apache</application> older than 1.3.26 Do NOT use any Apache version older than 1.3.26. See http://www.cert.org/advisories/CA-2002-17.html @@ -250,7 +259,7 @@ for more information Copyright Information - This document is copyrighted (c) 2000, 2001, 2002 Luc de Louw and is + This document is copyrighted (c) 2000, 2001, 2002, 2003 Luc de Louw and is distributed under the terms of the Linux Documentation Project (LDP) license, stated below. @@ -498,9 +507,9 @@ a Application to build Server and client-Certificates. cd /usr/local -tar -xvzf openssl-0.9.6g.tar.gz +tar -xvzf openssl-0.9.7.tar.gz -cd openssl-0.9.6g +cd openssl-0.9.7 ./config shared @@ -511,6 +520,13 @@ make install echo "/usr/local/ssl/lib" >> /etc/ld.so.conf ldconfig + +Select your CPU to improve speed + +By default the Makefile generates code for the i486 CPU. You can change this by editing the +Makefile after running config . +Search for and replace it i.e with + @@ -572,7 +588,7 @@ ldconfig MySQL is a very fast, powerful and very nice to handle Database. -Especially for webapplication where most access is read and few write, +Especially for webapplications where most access is read and few write, MySQL is the first choice. The newest Version is also transaction-capable. If you plan a Webapplication, that writes a lot of Data into the DB, maybe PostgreSQL is @@ -593,8 +609,8 @@ Origin-Site: http://www.mysql.com/d cd /usr/local -tar -xvzf mysql-3.23.53.tar.gz -cd mysql-3.23.53 +tar -xvzf mysql-3.23.55.tar.gz +cd mysql-3.23.55 ./configure \ --prefix=/usr/local/mysql \ @@ -694,8 +710,8 @@ inside those shared memory segments. Download -Origin Site: -ftp://ftp.ossp.org/pkg/lib/mm/mm-1.2.1.tar.gz +Origin Site: +ftp://ftp.ossp.org/pkg/lib/mm/mm-1.2.2.tar.gz @@ -704,9 +720,9 @@ ftp://ftp.ossp.org/pkg/lib/mm/mm-1.2.1.tar.gz cd /usr/local -tar -xvzf mm-1.2.1.tar.gz +tar -xvzf mm-1.2.2.tar.gz -cd mm-1.2.1 +cd mm-1.2.2 ./configure make @@ -783,7 +799,7 @@ if you hacked your kernel and edited your /etc/security/limits.confAvoid running out of tasks -With wrong settings this could end as a “self-denial-of-service-attack”!! +With wrong settings this could end as a »self-denial-of-service-attack« Be sure you have enough processes left for root) @@ -833,8 +849,8 @@ Webserver might crash or can not be started. cd /usr/local/ -tar -xvzf mod_ssl-2.8.11-1.3.27.tar.gz -cd mod_ssl-2.8.11-1.3.27/ +tar -xvzf mod_ssl-2.8.12-1.3.27.tar.gz +cd mod_ssl-2.8.12-1.3.27/ ./configure --with-apache=../apache_1.3.27 @@ -899,7 +915,7 @@ Now the two static modules mod_ssl and m Building and installing -EAPI_MM="/usr/local/mm-1.2.1" SSL_BASE="/usr/local/ssl" \ +EAPI_MM="/usr/local/mm-1.2.2" SSL_BASE="/usr/local/ssl" \ ./configure \ --enable-module=unique_id \ --enable-module=rewrite \ @@ -987,8 +1003,14 @@ cd mod_dav-1.0.3-1.3.6 make make install -Notice: the filename mod_dav-1.0.3-1.3.6 suggests that it will only run with Apache 1.3.6 but it + +Confusing filename + +The filename mod_dav-1.0.3-1.3.6 suggests that it will only run with Apache 1.3.6 but it actually will run with all Apaches >= 1.3.6 + + + @@ -1196,7 +1218,7 @@ access the server. From the authors point of view: -Mod_roaming is ideed valueable. Unfortunately it does not work over proxy-connection. +Mod_roaming is indeed valuable. Unfortunately it does not work over proxy-connection. You can keep your Netscape 4.x bookmarks etc. synchronized on different machines. It is not supported by any other browsers, including Mozilla and Netscape 6.x. @@ -1284,15 +1306,20 @@ pay for every GB delivered and CPU-power does not matter, then mod_gzip is the c mod_gzip Download the source -Origin-Site: http://www.remotecommunications.com/apache/mod_gzip/ +Origin-Site: http://prdownloads.sourceforge.net/mod-gzip/mod_gzip-1.3.26.1a.tgz?download Building and installing +To successfully compile mod_gzip you need to edit the Makefile and provide the correct path to +apxs + -/usr/local/apache/bin/apxs -i -a -c -lz mod_gzip.c +make +make install + @@ -1436,7 +1463,8 @@ tar -xvfz imap.tar.Z cd imap -make slx SSLTYPE=unix + +make slx SSLTYPE=nopwd @@ -1474,9 +1502,9 @@ SSL support. cd /usr/local -tar -xvzf postgresql-7.2.3.tar.gz +tar -xvzf postgresql-7.3.2.tar.gz -cd postgresql-7.2.3 +cd postgresql-7.3.2 ./configure \ --with-perl \ @@ -1496,6 +1524,35 @@ ldconfig +Sablotron +What is Sablotron +
http://www.gingerall.com/charlie/ga/xml/p_sab.xml +Sablotron is a fast, compact and portable XML toolkit implementing XSLT 1.0, +DOM Level2 and XPath 1.0. Sablotron is an open project; other users and developers +are encouraged to use it or to help us testing or improving it. The goal of this +project is to create a lightweight, reliable and fast XML library processor +conforming to the W3C specification, which is available for public and can be +used as a base for multi-platform XML applications.
+
+ +Download the source +Origin-Site: http://download-2.gingerall.cz/download/sablot/Sablot-0.97.tar.gz + +Building and installing + + +tar -xvzf Sablot-0.97.tar.gz +cd Sablot-0.97 + +./configure +make +make install + +ldconfig + + +
+ pdflib What is pdflib @@ -1506,9 +1563,11 @@ to generate PDF on your server, convert text and graphics, or implement PDF outp From the authors point of view: - - This is a commercial Product. Read the license carefully to see if you need a commercial license or not + +This is a commercial product +PDFLIB is a commercial Product. Read the license carefully to see if you need a commercial license or not + @@ -1607,10 +1666,11 @@ ldconfig cd /usr/local -tar -xvzf php-4.2.3.tar.gz +tar -xvzf php-4.3.0.tar.gz -cd php-4.2.3 +cd php-4.3.0 +export LDFLAGS=-lstdc++ ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ @@ -1629,7 +1689,22 @@ cd php-4.2.3 --with-mm=/usr/local/mm-1.1.3 \ --with-jpeg-dir=/usr/lib \ --with-zlib-dir=/usr/local \ +--enable-wddx \ +--with-mcrypt \ +--with-mhash \ +--with-mcal=/usr \ +--enable-exif \ +--enable-xslt \ +--with-xslt-sablot=/usr/local \ +--with-dom \ +--with-dom-xslt \ + + +Edit the Makefile and add to the variable EXTRA_LIBS. This is currently +only needed, when using Sablotron version 0.9.7 + + make make install @@ -1658,7 +1733,7 @@ LoadModule php4_module libexec/libphp4.so Copy the sample php.ini-dist to /usr/local/lib/php.ini -cp /usr/local/php-4.2.3/php.ini-dist /usr/local/lib/php.ini +cp /usr/local/php-4.3.0/php.ini-dist /usr/local/lib/php.ini uncomment (remove the # at begin of line) the following lines in @@ -1802,7 +1877,9 @@ or your whole setup will not work. Download the binary Origin-Site: https://www.zend.com/store/free_download.php?pid=13 +Register at zend.com You have to register yourself at zend.com to get access to the download-page + @@ -1815,14 +1892,14 @@ platforms. The filename varies according your platform, the sample is for Linux cd /usr/local -tar -xvzf ZendOptimizer-1.3.3-Linux_glibc21-i386.tar.gz +tar -xvzf ZendOptimizer-2.1.0-Linux_glibc21-i386.tar.gz -cd ZendOptimizer-1.3.3-Linux_glibc21-i386 +cd ZendOptimizer-2.1.0-Linux_glibc21-i386 ./install.sh -The install script is self-explanatory, if you compiled Apache and PHP like descibed in this document, you can just press +The install script is self-explanatory, if you compiled Apache and PHP like described in this document, you can just press ENTER on all questions about the pathnames. @@ -1830,85 +1907,8 @@ cd ZendOptimizer-1.3.3-Linux_glibc21-i386 -Server Side Java -mod_jserv -What is mod_jserv -
java.apache.org - -Apache JServ is a 100% pure Java servlet engine fully compliant with the JavaSoft Java Servlet APIs 2.0 -specification. Since we believe in the great value complete portability between different servlet platforms, -together with portability of Java binary code, we worked very close with JavaSoft and other JVM implementers to -provide correct interpretations or Java specifications both for servlets and for the Java language itself. -
- -From the authors point of view: -mod_jserv is very comfortable to maintain - -Unfortunately mod_jserv is no longer actively developed, -only bugfixes if bugs where found. Tomcat is the successor of mod_jserv -As soon as the author gets enough time and experience with Tomcat he will extend this HOWTO. - -JSDK2.0 is out of Date too. It is needed for mod_jserv only. - -
-Prerequisites -JSDK 2.0 (mod_jserv req.) -What is JSDK -It is the API from Sun Microsystems for developing Servlets - -Download -Origin-Site: -http://java.sun.com/products/servlet/archive.html - -Building and installing -Since JSDK is closed source there is nothing to build. - -Confusing filename -The filename jsdk20-solaris2-sparc.tar.Z suggests to be a binary for sparc platform. -Ignore it, this will work on all platforms - - - -cd /usr/local/ - -uncompress jsdk20-solaris2-sparc.tar.Z -tar -xvf jsdk20-solaris2-sparc.tar - - - - - -Download the source -Origin-Site: http://java.apache.org/jserv/dist/ - -Building and installing - - -cd /usr/local - -tar -xvzf ApacheJServ-1.1.2.tar.gz -cd ApacheJServ-1.1.2 - -./configure \ ---prefix=/usr/local/jserv \ ---with-apxs=/usr/local/apache/bin/apxs \ ---with-JSDK=/usr/local/JSDK2.0 \ ---enable-EAPI \ - -make -make install - - -Extended API -Here it is important to use the compilerflag if Apache is compiled with -mod_ssl. - - - -
- -jakarta-tomcat -What is Tomcat +Jakarta Tomcat +What is Tomcat
jakarta.apache.org Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process. From the authors point of view:
@@ -1928,21 +1928,21 @@ basic support for Tomcat installed from binaries.
The Author is searching for some volunteers who tries to build Tomcat from source and tells what steps are required - -Prerequisites -Java2 -What is Java2> +</sect2> +<sect2><title>Prerequisites +Java2 +What is Java2 Please see java.sun.com Too much for this HOWTO, please see http://java.sun.com/j2se/1.3/docs/relnotes/features.html - -Download the binaries + +Download the binaries Go to http://java.sun.com/j2se/1.3/ -There is also version 1.4.0 of Java available, if you do not care about possible instability you can downloads this version. +There is also version 1.4.1 of Java available, but Tomcat seems not to run with that version of Java. ,choose your platform and follow the steps on the site. - + -Installing the binaries +Installing the binaries Execute the binary: @@ -1955,23 +1955,23 @@ chmod +x j2sdk-1_3_1_02-linux-i386.bin After accepting the license, unpack the stuff and move the resulting directory to /usr/lib and set an appropriate symbolic link - + -Download the binaries +Download the binaries Origin-Site: - -http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.4/bin/jakarta-tomcat-4.0.4.tar.gz + +http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.18/src/jakarta-tomcat-4.1.18-src.tar.gz Installing the binaries cd /usr/local -tar -xvzf jakarta-tomcat-4.0.6.tar.gz +tar -xvzf jakarta-tomcat-4.1.8.tar.gz -cd jakarta-tomcat-4.0.6 +cd jakarta-tomcat-4.1.8 cd bin @@ -1981,20 +1981,141 @@ echo export JAVA_HOME=/usr/lib/java/ >> /etc/profile . /etc/profile +To enable the Tomcat manager, you need to modify /usr/local/jakarta-tomcat-4.1.8/conf/tomcat-users.xml +add a user »admin« or with the role »manager«. The result should look like this: + +<?xml version='1.0' encoding='utf-8'?> +<tomcat-users> + <role rolename="manager"/> + <role rolename="tomcat"/> + <role rolename="role1"/> + <user username="admin" password="secret" roles="manager"/> + <user username="tomcat" password="tomcat" roles="tomcat"/> + <user username="role1" password="tomcat" roles="role1"/> + <user username="both" password="tomcat" roles="tomcat,role1"/> +</tomcat-users> + + Now you should be able to startup tomcat: -/usr/local/apache/jakarta-tomcat-4.0.6/bin/startup.sh +/usr/local/apache/jakarta-tomcat-4.1.8/bin/startup.sh -You should now be able to connect to: http://localhost:8080/index.html +You should now be able to connect to: http://localhost:8080/index.jsp + + + +mod_jk + +Download the source + +If you like to have a native interface into your Apache Webserver, you need to build mod_jk with must be downloaded separately here: + +http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.18/src/jakarta-tomcat-connectors-4.1.18-src.tar.gz. + + + + +Building and installing + + +tar -xvzf jakarta-tomcat-connectors-4.1.18-src.tar.gz + +cd jakarta-tomcat-connectors-4.1.18-src/jk/native + +./buildconf +./configure --with-apxs=/usr/local/apache/bin/apxs + +make +make install + + + + +Customizing + +Now follows the annoying part, the customizing of the config files. First edit +/usr/local/jakarta-tomcat-connectors-4.1.18-src/jk/conf/workers.properties, +and copy the file to /usr/local/apache/conf + +I made a sample workers.properties that works with the example JSPs and servlets +that comes with the Tomcat distribution. It is based on the sample workers.properties from Tomcat + +workers.properties + +workers.tomcat_home=/usr/local/jakarta-tomcat-4.1.18 + +# workers.java_home should point to your Java installation. Normally +# you should have a bin and lib directories beneath it. +# +workers.java_home=/usr/lib/java2 + +# You should configure your environment slash... ps=\ on NT and / on UNIX +# and maybe something different elsewhere. +# +ps=/ + +# The workers that your plugins should create and work with +# +worker.list=worker1 + +#------ DEFAULT ajp13 WORKER DEFINITION ------------------------------ +#--------------------------------------------------------------------- +# Defining a worker named ajp13 and of type ajp13 +# Note that the name and the type do not have to match. +# +worker.worker1.port=8009 +worker.worker1.host=localhost +worker.worker1.type=ajp13 + +#------ CLASSPATH DEFINITION ----------------------------------------- +#--------------------------------------------------------------------- +# Additional class path components. +# +worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar + +# The JVM that we are about to use +# +# Unix - Sun VM or blackdown +worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)classic$(ps)libjvm.so + +# Setting the place for the stdout and stderr of tomcat +# +worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout +worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr + + + + + +Next, you need to configure your apache config file httpd.conf. +The following example matches the examples provided by Tomcat. + + +LoadModule jk_module libexec/mod_jk.so +AddModule mod_jk.c + +JkWorkersFile /usr/local/apache/conf/workers.properties +JkLogFile /var/log/httpd/mod_jk.log +JkLogLevel info +JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " +JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories +JkRequestLogFormat "%w %V %T" +JkMount /examples/servlet/* worker1 +JkMount /examples/*.jsp worker1 + + +After restarting Apache, you should now be able to connect to your JSP's via Apache. I.e: +http://localhost/examples/jsp/num/numguess.jsp + For the further steps like installing your servlets and jsp-files, you are responsible by yourself... Environment Variables -If Tomacat fails to start and/or your sevlets could not be started the most common error made is having not +If Tomcat fails to start and/or your servlets could not be started the most common error made is having not all needed classes in the CLASSPATH variable.