Environment: RedHat AS3
JDK Installation path:/USR/JAVA/JDK
Tomcat Installation path:/usr/local/tomcat/
A total of the following steps are divided:
First, install the configuration JDK
Second, install the configuration tomcat
Iii. installation of PostgreSQL
Four, Tomcat test
V. Connecting to the Database
The software you need:
j2sdk-1_4_2-linux-i586-rpm.bin
jakarta-tomcat-4.1.30.tar.gz
postgresql-7.4.1-1PGDG.i386.rpm
postgresql-jdbc-7.4.1-1PGDG.i386.rpm
postgresql-server-7.4.1-1PGDG.i386.rpm
postgresql-libs-7.4.1-1PGDG.i386.rpm
All of these software are/download in a backup.
#mkdir/download
1 Installation configuration JDK
Download Address: http://java.sun.com/j2se/1.4.2/download.html
Download the RPM package, which is actually a. bin file
#chmod u+x J2sdk-1_4_2-linux-i586-rpm.bin
#./j2sdk-1_4_2-linux-i586-rpm.bin
#rpm-IVH j2sdk-1_4_2-linux-i586-rpm
#cd/usr/java/
#ln-S j2sdk1.4.2/jdk/
To set environment variables:
Don't write about it in the/etc/profile. That would cause the JDK to be available for each user to start.
Because you want to use Tomcat, write to Tomcat's home directory.
#vi/HOME/TOMCAT/.BASHRC (also can be. bash_profile)
Export JAVA_HOME=/USR/JAVA/JDK
Export path= $PATH: $JAVA _home/bin
Export Classpath= $JAVA _home/lib
Su to Tomcat users to see if they can use
#su-tomcat
$javac
$java
Do you have a show? If so, the JDK configuration is successful.
Re-su to root
<B>2 Configuration tomcat</b>
Tomcat I was started by tomcat this user, please note:
Because I downloaded the binary version, I do not need to compile again.
<CENTER><ccid_nobr>
<table width= "border=" 1 "cellspacing=" 0 "cellpadding=" 2 "
Bordercolorlight = "BLACK" Bordercolordark = "#FFFFFF" align= "Center" >
<tr>
<TD bgcolor= "E6e6e6" class= "code" style= "Font-size:9pt" >
<pre><ccid_code>
#cp/download/jakarta-tomcat-4.1.30.tar.gz/usr/local
#tar ZXVF jakarta-tomcat-4.1.30.tar.gz
#rm-F jakarta-tomcat-4.1.30.tar.gz
#cd jakarta-tomcat-4.1.30