Linux under the JSP build (Tomcat4+jdk+postgres)

Source: Internet
Author: User
Tags postgresql tomcat linux

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
&LT;B&GT;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>
&LT;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



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.