Win2000 PHP MYSQL Tomcat JSP Complete Connection Machine
Author: long Baidu Source: http: //www.99baidu.com Joined: 2004-1-31
Win2000 PHP MYSQL Tomcat JSP fully integrated installation manual 1, preparation situation 1. A installed WIN2000 server, pay attention: If IIS is pre-installed, please stop the IIS service or disabled first. 2. Washing software Apache: Version: 1.3.22 Address: http://www.netage.Net/web_soft/apache_1.3.22-win32- x86.msi JDK: Version: 1.3 Address: http://www.5line.net/ Web_Soft / J2SDK1_3_0-win.exe PHP: Version: 4.0.4 Address: http://www.net/web_soft/php4.0.4pl1-win32.zip mysql: Version: 3.23.32 Address: http: // www .5line.net / Web_soft / mysql-3.23.32-win.zip Tomcat: Version: 4.0.4 Address: http://www.net/web_soft/jakarta-tomcat-4.0.4.exe mod_jk: This is Jakarta organization developed the Apache support Tomcat plug-in, stronger than apachejserv, because ApachejServ can only be used on Apache, and MOD_JK can be used with many servers. Download address: http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/win32/i386/ (If the corresponding software is not found within the URL provided, please on the major online Software library is found, usually! Or email mail to info@5line.net) 3. Prepare enough dry food and water, make it easy to install and restart the psychological preparation, but as long as you care, it is not difficult to do, a success is not difficult! 4. Do a deep breath, don't think MM! start installation! Second, the installation starts 1. Apache installation first step: run apache_1.3.22-win32-x86.msi, all the way to determine and accept it, basically more fool, for the convenience, and the default path I installed in the time of my habits is C: /, this is installed Under the path under the C disk, the default domain is root.dev.
Step 2: (I have a virtual host here, this step can be done, according to your own needs) Edit C: /apache/conf/httpd.conf found #namevirtualhost * Modified to NameVirtualHost 192.168.0.16 # Note this IP for you to find your own set of host IP ServerName root.dev modify add
JDK installation first: Direct operation J2SDK1_3_0-win.exe, all the way to install, I here's default installation path is d: //jdk1.3 Step 2: Configure environment variables to click on my computer right click - Property - Click Advanced - Click on the Environment Variable Pop-up Environment Variables dialog, create new variable names and values: ------------------------------------------------------------------------------------------------------------------------------------ --------- Variable Name: PATH Variable: D: /JDK1.3/bin Variable Name: Java_Home Variable: D: /JDK1.3 Variable Name: ClassPath Variable:. /; D: / JDK1.3 / lib / dt.jar; d: /jdk1.3/lib/tools.jar; Step 3: Restart your computer to take effect of the configured environment variable 5. TOMCAT Installation Step: Directly Run Jakarta-Tomcat-4.0.4.exe, I hereby the default installation path is C: / Apache Tomcat 4.0 At this time, if Tomcat is started separately (to Tomca directory running Startup.bat Start Tomcat or Running start tomcat in the menu bar), you can already run the JSP file, but we haven't integrated Apache and Tomcat yet, because the Tomcat has built-in Apache HTTP service, but he only refers to JSP programs. Performance efficiency and performance, the processing speed of the static page is far less than Apache, so for a perfect web system, we have to integrate Apache and Tomcat! (Below is integrated with their specific configuration steps, please pay attention to carefully, I have finally gotten it!) Step 2: First configure Apache Open C: /Apache/conf/httpd.conf Add the following statement: # --- --------------------------------------- loadingModule JK_Module Libexec / MOD_JK.DLL ADDMODULE MOD_JK.C JKWORKERSFILE "C: / Apache Tomcat 4.0 / Conf / Worker.properties" jklogfile logs / mod_jk.log jkloglevel info jklogstampformat "[% a% b% D% h:% m:% s% y]" jkmount /*.jsp Ajp13 JKMOUNT / servlet / * ajp13 # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------- Note: The basic meaning of the above statement is: First, two sentences: Specify the location and name of the Apache and Tomcat connection plugins: Pointing the position of the work file required for MOD_JK work Seven, eight sentences: Yes to send all the JSP and Servlet to Tomcat through the APJ13 protocol, let Tomcat to process the third step: download the mod_jk.dllcopy to Libexec under the Apache directory. Fourth step. : Tomcat configuration first is in the c: / apache tomcat4.0 / conf directory to build a worker.properties file content as follows:
# ------------------------------------------------- --------- # $ header: /Home/cvs/jakarta-tomcat/src/etc/attic/Workers.properties ,v 1.3.2.2 2000/10/16 01:59:22 Larryi EXP $ # $ Revision: 1.3.2.2 $ # $ date: 2000/10/16 01:59:22 $ # # Workers.properties - # t file provides jk derived plugins with the the needed information to # Connect to the Different Tomcat Workers . # # As a general not define # macros. Do not use the Them in Your OWN Configuration !!! # # WHENEVER You See A Set of Lines SuS: # x = value # y = $ (x) something # # the final value for y will be valuesomething # # Normaly all you will need to modify is the first properties, ie # workers.tomcat_home, workers.java_home and ps. Most of the configuration # is derived From these. # #hen you are done updating workers.tomcat_home, workers.java_home and ps # You Should Have 3 Workers Configured: # # - An Ajp12 Worker That Connects To localhost: 8007 # - An ajp13 worker that connects to localhost: 8009 # - A jni inprocess worker # - A load balancer worker # # However by default the plugins will only use the ajp12 worker To have # the plugins use other workers you should modify the worker... . list property # # # # workers.tomcat_home should point to the location where you # installed tomcat This is where you have your conf, webapps and lib # directories # workers.tomcat_home = c:.. / Apache Tomcat 4.0 # # workers. Java_Home Should Point To Your Java Installation. Normally # You Should Have A Bin and Lib Directories Beneath It. # Workers.java_Home = D: /JDK1.3 # # You Should Configure your Environment Slash ... ps =
ON NT and / ON UNIX # and maybe something Different Elsewhere. # ps = / # ps = / # # ------ Advanced Mode ------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------- # # ------ DEFAULT WORKET LIST --------------------------------------- - # --------------------------------------------------------------------------------------------------------- ----------------------- # # # The workers what yourp12, ajp13 # # # ------ - Default AJP12 WORKER Definition ------------------------------- -------------------------------------------------- ------ # # Defining a worker named ajp12 and of type ajp12 # Note That the name and the type do not lot. # Worker.ajp12.host = localhost worker.ajp12 .Type = ajp12 # # specifies the load balance Factor When Used with # a loading balancing worker. # Note: # ----> lbfactor must be> 0 # ----> low lbfactor means less work done by the worker.Worker.ajp12.lbFactor = 1 # # ------ 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.ajp13. Port = 8009 worker.ajp13.host = localhost worker.ajp13.type = ajp13 # # specifies the loading balance factory gen buy with # a loading balancing worker. # Note: # ----> lbfactor must be> 0 # - -> Low lbfactor means less work done by the worker. Worker.ajp13.lbFactor =
1 # # specify the size. # Worker.ajp13.cachesize # # ------ Default load balancer worker definition ------------------- - # --------------------------------------------------------------------------------------------------------- ----------------------- # # The loadbalancer (Type LB) Workers Perform Wighted Round-Robe # loading balancing with sticky sessions. # Note: # - ---> If a worker dies, the load balancer will check its state # once in a while. Until then all work is redirected to peer # workers. worker.loadbalancer.type = lb worker.loadbalancer.balanced_workers = ajp12, ajp13 # # ------ DEFAULT JNI WORKER Definition --------------------------- -------------------------------------------------- -------------- # # Defining a worker named inprocess and of type jni # Note That the name and the type = jni # # # # ------ ClassPath Definition -------------------------------------------------------------------------------------------------- -------------------------------------------------- ----- -------------- # # Additional class path components. # Worker.inprocess.class_path = $ (workers.tomcat_home) $ (ps) classes # # The Xml Parser Provided with Tomcat # worker .inprocess.class_path = $ (workers.tomcat_home) $ (ps) lib $ (ps) jaxp.jar worker.inprocess.class_path = $ (workers.tomcat_home) $ (PS) LIB $ (PS) Parser.jar # # Tomcat `s Implement # worker.inprocess.class_path = $ (workers.tomcat_home) $ (PS) COMMON $ (PS) LIB $ (PS) Jasper.jar Worker.inProcess.class_path = $ (workers.tomcat_home) $ (ps) Common $ (ps) lib $ (ps) servlet.jar worker.inprocess.class_path = $ (workers.tomcat_home) $ (ps) Common $ (ps) lib $ (ps) Webserver.jar # # javac as available from java2se # worker .inprocess.class_path =
$ (workers.java_home) $ (PS) LIB $ (PS) Tools.jar # # setting The Command Line for Tomcat # NOTE: The cmd_line string may not contact space.inprocess.cmd_line = -config worker.inprocess. CMD_LINE = $ (workers.tomcat_home) /conf/jni_server.xml worker.inprocess.cmd_line = -home worker.inprocess.cmd_line = $ (workers.tomcat_home) # # The jvm That We Are About To Use # # this is for java2 # worker.inprocess.jvm_lib = $ (workers.java_home) $ (PS) JRE $ (PS) bin $ (ps) Classic $ (PS) jvm.dll # # and this is for jdk1.1.x # #Worker. Inprocess.jvm_lib = $ (workers.java_home) $ (ps) bin $ (ps) javai.dll # # # setting the place for the stdout and stderr of tomcat # worker.inprocess.stdout = $ (workers.tomcat_home) $ ps) inprocess.stdout worker.inprocess.stderr = $ (workers.tomcat_home) $ (ps) inprocess.stderr # # Setting the tomcat.home Java property # worker.inprocess.sysprops = tomcat.home = $ (workers.tomcat_home) # # Java system property # # worker.inprocess.sysprops = java.compiler = none # worker.inpro CESS.SYSPROPS = myprop = mypropvalue # # Additional path components. # # worker.inprocess.ld_path = D: $ (ps) SQLLIB $ (PS) bin # # ------------- ----------------------- Configuration files ------------------------ ------------- In this file, it is necessary to pay attention to modifying only two places, one is workers.tomcat_home, this is the directory of the Tomcat work, and the other is workers.java_home, this Is the directory of the JDK, you can make appropriate modifications! I have no modification here, all in line with the configuration of the system! Second, configure the Tomcat core file, open C: / Apache tomcat4.0 / conf / server.xml to modify the following: 将! "Or!" Or! " .apache.ajp.tomcat4.ajp13connector "port =" 8009 "MINPROCESSORS =" 5 "
MaxProcessors = "75" acceptcount = "10" debug = "0" /> -> The person familiar with XML knows that it is a comment, because the default Tomcat4 is not enabled The 8009 port of the APJ13 is used by mod_jk. After the modification: