The entire process of JSP configuration in my Linux environment

Source: Internet
Author: User

Java. 0.4-bin. Jar
Question: In my LinuxJSP ConfigurationFull-process BBS shuimu Tsinghua station (Mon Jun 3 13:04:03 2002)
For reference only
RedHat in Linux 7.2JSPServer install
Need software: j2sdk 1.3.1 _ 01 & Apache 1.3.22 & Tomcat 3.3 & MySQL 3.23.44 &
Mm. MySQL 2.0.4
Software Download URL:
1. Java 2 platform, starndard edition v1.3.1 _ 01 (j2se ):
J2sdk-1_3_1_01-linux-i386.bin
Http://java.sun.com/j2se/1.3/download-linux.html
Choose "SDK downloads"-"gnuzip tar shell script"
2. Apache HTTP Server 1.3.22: apache_1.3.22.tar.gz
Http://httpd.apache.org/dist/httpd/apache_1.3.22.tar.gz
3. Tomcat 3.3: jakarta-tomcat-3.3.tar.gz

Http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/jakarta-tomc

At-3.3.tar.gz
4. MySQL 3.23.44: mysql-3.23.44.tar.gz

Http://www.mysql.com/downloads/download.php? File = downloads/MySQL-3.23/mysql-3
.23.44.tar.gz
Choose your mirror site
5. Mm. MySQL 2.0.4 jdbc api: Mm. mysql-2.0.4-bin.jar

Http://www.mysql.com/downloads/download.php? File = downloads/contrib/mm. mysql-2
. 0.4-bin. Jar
Choose your mirror site
Copy:
Success,
Mysql-3.23.44.tar.gz
To:/usr/local/
Set web root path:/web/root/
"//" Is note
[Root @ Alin root] # cd/usr/local/
[Root @ Alin local] # chmod 755 j2sdk-1_3_1_01-linux-i386.bin
[Root @ Alin local] #./j2sdk-1_3_1_01-linux-i386.bin
[Root @ Alin local] # ln-s jdk1.3.1 _ 01 JDK
[Root @ Alin local] # tar-zxvf apache_1.3.22.tar.gz
[Root @ Alin local] # ln-s apache_1.3.22 Apache
[Root @ Alin local] # tar-zxvf jakarta-tomcat-3.3.tar.gz
[Root @ Alin local] # ln-s jakarta-tomcat-3.3 Tomcat
[Root @ Alin local] # tar-zxvf mysql-3.23.44.tar.gz
[Root @ Alin local] # ln-s mysql-3.23.44 MySQL
[Root @ Alin local] # mv mm. mysql-2.0.4-bin.jar/usr/local/tomcat/lib/
[Root @ Alin local] # cd/etc/
[Root @ Alin etc] # vi Profile
...
Path = $ path:/usr/local/JDK/bin
Classpath =/usr/local/JDK/lib
Java_home =/usr/local/JDK
Tomcat_home =/usr/local/tomcat
Tomcat_install =/usr/local/tomcat
...
Export... path classpath java_home tomcat_home tomcat_install
...
[Root @ Alin etc] # reboot
// Restart computer
[Root @ Alin root] # cd/usr/local/Apache/
[Root @ Alin Apache] #./configure -- prefix =/usr/local/Apache
-- Enable-module = so
[Root @ Alin Apache] # Make
[Root @ Alin Apache] # make install
[Root @ Alin Apache] # cd/usr/local/tomcat/native/mod_jk/apache1.3/
[Root @ Alin apache1.3] #./build-unix.sh
[Root @ Alin apache1.3] #./install-unix.sh
// Copy mod_jk.so to/usr/local/Apache/libexec/
[Root @ Alin apache1.3] # cd/usr/local/MySQL/
[Root @ Alin MySQL] # groupadd MySQL
[Root @ Alin MySQL] # useradd-G MySQL
[Root @ Alin MySQL] #./configure -- prefix =/usr/local/MySQL
[Root @ Alin MySQL] # Make
[Root @ Alin MySQL] # make install
[Root @ Alin MySQL] #./scripts/mysql_install_db
[Root @ Alin MySQL] # chown-r root/usr/local/MySQL/
[Root @ Alin MySQL] # chown-r root/usr/local/MySQL/bin/
[Root @ Alin MySQL] # chgrp-r MySQL/usr/local/MySQL/
[Root @ Alin MySQL] # cd/usr/local/Apache/CONF/
[Root @ Alin conf] # vi httpd. conf
...
// Modify: DocumentRoot "/usr/local/Apache/htdocs"
DocumentRoot "/web/root"
...
// Modify:

...
// Add at last
Include/usr/local/tomcat/CONF/mod_jk.conf
[Root @ Alin conf] # cd/usr/local/tomcat/CONF/
[Root @ Alin conf] # vi apps-root.xml
// Create a new file:



Docbase = "/web/root"
Reloadable = "true"
Trusted = "true">


[Root @ Alin conf] # vi server. xml
...
// Modify:

...
[Root @ Alin conf] # cd/usr/local/tomcat/bin
[Root @ Alin bin] # vi tomcat. Sh
...
// Modify: classpath =$ {tomcat_install}/lib/tomcat. Jar
Classpath =$ {tomcat_install}/lib/tomcat. jar: $ {tomcat_install}/lib/mm. mysql-2.0
. 4-bin.jar
...
[Root @ Alin bin] #./tomcat. Sh run-jkconf
[Root @ Alin bin] # cp/usr/local/tomcat/CONF/auto/mod_jk.conf
/Usr/local/tomcat/CONF/
[Root @ Alin bin] # cd/usr/local/MySQL/support-Files
[Root @ Alin support-files] # vi mysql. Server
...
// Modify: datadir =/usr/local/MySQL/Data
Datadir =/usr/local/MySQL/var
...
// Modify: bindir =./bin
Bindir =/usr/local/MySQL/bin
...
// Modyfy: pid_file = $ datadir/'@ hostname @'. PID

Pid_file = $ datadir/'/bin/hostname'. PID
...
// Add after: "Start ")
Echo "Starting MYSQL :"
...
// Add after: "Stop ")
Echo "Stopping MYSQL :"
[Root @ Alin support-files] # cd/etc/rc. d/init. d/
[Root @ Alin init. d] # vi HTTP
// Create a new file:
#! /Bin/bash
./Etc/rc. d/init. d/functions
Initlog_args = ""
Java_home =/usr/local/JDK
Tomcat_home =/usr/local/tomcat
Tomcat_install =/usr/local/tomcat
Export java_home tomcat_home tomcat_install
Tomcatd =/usr/local/tomcat/bin/tomcat. Sh
Apached =/usr/local/Apache/bin/apachectl
RV1 = 0
RV2 = 0
Retval = 0
Start (){
Echo "Starting Tomcat & Apache server :"
Daemon $ tomcatd start-noout
RV1 =$?
Sleep 4
Daemon $ apached start
RV2 = $?
Retval = $ [$ RV1 + $ RV2]
Return $ retval
}
Stop (){
Echo "Stopping Tomcat & Apache server"
Daemon $ apached stop
RV1 =$?
Daemon $ tomcatd stop
RV2 = $?
Retval = $ [$ RV1 + $ RV2]
Return $ retval
}
Case "$1" in
Start)
Start
;;
Stop)
Stop
;;
Status)
Status $ httpd
;;
Restart)
Stop
Start
;;
*)
Echo $ "Usage: $ prog {START | stop | restart }"
Exit 1
Esac
Exit $ retval
[Root @ Alin init. d] # cp/usr/local/MySQL/support-files/MySQL. server.
[Root @ Alin init. d] # cd/etc/rc. d/rc3.d
[Root @ Alin rc3.d] # ln-S ../init. d/HTTP s85http
[Root @ Alin rc3.d] # ln-S ../init. d/MySQL. Server s90mysql
[Root @ Alin rc3.d] # ln-S ../init. d/MySQL. Server k10mysql
[Root @ Alin rc3.d] # ln-S ../init. d/HTTP k15http
[Root @ Alin rc3.d] # cd/usr/rc. d/rc5.d
[Root @ Alin rc5.d] # ln-S ../init. d/HTTP s85http
[Root @ Alin rc5.d] # ln-S ../init. d/MySQL. Server s90mysql
[Root @ Alin rc5.d] # ln-S ../init. d/MySQL. Server k10mysql
[Root @ Alin rc5.d] # ln-S ../init. d/HTTP k15http
[Root @ Alin rc5.d] # cd/usr/rc. d/rc6.d
[Root @ Alin rc6.d] # ln-S ../init. d/MySQL. Server k10mysql
[Root @ Alin rc6.d] # ln-S ../init. d/HTTP k15http
[Root @ Alin rc6.d] # reboot
// Restart computer
[Root @ Alin root] # cd/usr/local/MySQL/bin/
[Root @ Alin bin] #./mysqladmin-u root-P password rootpassword
// Set root "s password to" rootpassword"
[Root @ Alin bin] # cd/root/bin/
[Root @ Alin bin] # vi MySQL
// Create a new file:
#! /Bin/bash
/Usr/local/MySQL/bin/MySQL $ *
[Root @ Alin bin] # cd/root/
[Root @ Alin root] # vi. My. CNF
// Create a new file:
[Client]
Host = localhost
User = root
Password = rootpassword
[Root @ Alin root] # MySQL
...
Mysql> quit
Bye
[Root @ Alin root] #
[Client]
Host = localhost
User = root
Password = rootpassword
[Root @ Alin root] # MySQL
...
Mysql> quit
Bye
[Root @ Alin root] #
// That "s all OK!
-Written by Alin Chen
Email: alinzju@sohu.com

--------------------------- Love starts with a smile,
Extend in a hot kiss,
But with tears passed away... java heaven

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.