Voici un copié-collé d’une procédure de compilation/configuration/installation d’Apache 2.2 en concert avec Tomcat 5.5 que j’ai à utilisé de temps en temps dans mon travail. Si ça peux vous être utile.

Si vous êtes l’auteur de cette procédure n’hésitez pas à me le dire pour que je vous cite, j’ai oublié d’où provient ces informations. (If you are this procedure’s author, please do not hesitate to tell me so I can quote you).
Here is what you need to do to have a running webserver using Apache and Tomcat:
If you’ve already installed required packages and are ready to install Apache and Tomcat, go to STEP1?. If you are starting after installing the OS and you still have no packages installed at all, you might want to use apt-get install to get the following packages:
bison,flex,g++,make (If you’re going to be building anything from source, these will help)
bzip2,unzip (Useful for compressing/uncompressing archives)
dnsutils (DNS utilities including nslookup)
lynx (Text Based Browser – useful for testing your websites if you need to)
nmap,tcpdump,tethereal,traceroute (More advanced layer 1-3 troubleshooting utilities)
ntpdate (Make sure you install this so all your machines have the same system time)
libssl-dev,openssl (Necessary if you’re installing apache with SSL)
vim (Better text editor, after you install this, make sure you edit /etc/vim/vimrc and uncomment the line that says syntax=on)

First, install this:

apt-get install ssh vim ntpdate
Here is what the line that you would type to get all of this on a new server.

apt-get install bison bzip2 dnsutils flex g++ libssl-dev lynx make nmap openssl tcpdump tethereal traceroute unzip

STEP1 – downloads
Downloading Java, Apache2.2, Tomcat 5.5
go to /usr/src on your machine and run wget on the following files. (you can use « copy link location » in Firefox on the links that say « This is the latest version […] » then paste the links in your console)
Java 1.4.2_11 from http://java.sun.com/j2se/1.4.2/download.html. Get the J2SDK non-rpm linux installer.
Another alternative is to copy the file from zeus:

scp [email protected]:/usr/src/j2sdk-1_4_2_11-linux-i586.bin /usr/src

Latest Apache2 from http://httpd.apache.org. Get the tar of the source. This is the latest version (2.2.0) on 20060403
Latest Tomcat 5.5.16 from http://tomcat.apache.org/download-55.cgi#5.5.16. Get the tar of the binary. This is the latest version (5.5.16) on 20060403
STEP 2 – installation
Installing everything you downloaded above
installing Apache
Go to /usr/src/ and untar the apache archive (use tar -xvf and add either z for gunzip or j for bzip2) go into the apache installation directory (usually this is /usr/src/httpd-2.2.0) and do the following:

./configure –prefix=/usr/local/apache-2.2.0 –enable-ssl –enable-cgi –enable-so –enable-rewrite –enable-proxy –enable-proxy-ajp

If you want to know what the options do, run ./configure –help Also, please make sure that the prefix fits your version of apache and that you are NOT overwriting anything. Finally, make sure that the configure command completed successfully and that you are not lacking any libraries (see above for libraries you might need).
Now type:

make install

Now, go to /usr/local/ and make a Symbolic Link on the new apache install called apache:

ln -s apache-2.2.0 apache

installing Tomcat
Go to /usr/local/ and untar the tomcat installer:

tar -zxvf /usr/src/jakarta-tomcat-5.5.16.tar.gz

This will create a new directory called jakarta-tomcat-5.5.16 in /usr/local/. You want to make a Symbolic Link to that directory called tomcat (look at the example in step a to see how to create a symlink)
You also need to edit /usr/local/tomcat/bin/catalina.sh to include the following:

JAVA_OPTS= »-server -Xmx200m -Dfile.encoding=ISO8859-1″
export LD_ASSUME_KERNEL=2.4.1

It is sometimes necessary to add but you should be sure you need it! Don’t add this unless you are sure you have to.
installing Java
Go to /usr/src/ and make the installer executable:

chmod +x j2sdk-1_4_2_11-linux-i586.bin

Now go to /usr/local/ and run the executable by typing the following (don’t change directories!):


This will create a new directory called j2sdk1.4.2_11 in /usr/local/.
You want to make a symlink to that directory called java
Don’t forget to add startup scripts or links in /etc/init.d/ to make sure the applications start when the machine starts.
Et voilà! You are now done installing Apache and Tomcat! All you have to do at this point is add the configuration for the sites in /usr/local/apache/conf/httpd.conf and /usr/local/tomcat/conf/server.xml

Laisser un commentaire

Votre adresse courriel ne sera pas publiée. Les champs obligatoires sont indiqués avec *