Win2000 + PHP + MYSQL + Tomcat + JSP Complete Connection Machine

zhaozj2021-02-16  53

First, the preparation of the preparation 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 --Apache_1.3.22-Win32-x86.msijdk: Version: 1.3 --j2sdk1_3_0-win.exephp: Version: 4.0.4 --php4.0.4pl1-win32.zipmysql: Version : 3.23.32 --Mysql-3.23.32-win.zip Tomcat: Version: 4.0.4 --jakarta-Tomcat-4.0.4.exemod_jk: This is a plugin that Jakarta has developed to make Apache support Tomcat plug-in, more than apachejserv Powerful, because ApacheJServ can only be used on Apache, and cannot be used on other webserver, 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 to apollo@risesun-cn.com) 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 find ServerName root.dev modify add #ServerName root.dev ServerAdmin root @ localhostServerName root.devDocumentRoot c to host your own set of IP: / apache / htdocsErrorLog c: / apache / logs / error_logTransferLog c: / Apache / logs / access_logscriptalias / cgi-bin c: / apache / cgi-bin Step 3: Change the file name c: /apache/htdocs/index.html.en to C: / apache / htdocs / Index.html fourth step: restart, visit http://root.dev browse normal, display Apache Welcome page ------------ small success! Can drink mouth! ----------------------------2.

MySQL installation first step: unzip mysql-3.23.32-win.zip to the directory D: / mysql Step 2: Enter d: / mysql Run Setup.exe all the way, the default is installed to C: / mysql ---- -------- This step should have no problem! ------------------------------ 3. PHP installation first step: unzip PHP4.0.4PL1-WIN32.ZIP to the directory D: / PHP Step 2: Copy D: / PHP to the C-drive root directory Step 3: Enter C: / PHP, start configuration PHP change the file name php.ini-distth to php.ini and copy php.ini and php4ts.dll to Win2000's system installation directory (very important, don't forget) to modify Apache's configuration file again. Httpd.conf (forgot! In C: /Apache/conf/httpd.conf) Add: loadModule PHP4_Module C: /PHP/SAPI/php4apache.dlladdType Application / X-httpd-php .php4scriptalias / php4 / "C: / PHP / "Action Application / X-httpd-PHP4" /PHP4/PHP.EXE "ADDTYPE Application / X-httpd-php4 .php Step 4: Restart System Step 5: Test Writing Test File Info.php (Copy to Directory C: / Apache / HTDOCS / Town) File content: (in one line) Access: http://localhost/info.php or http://root.dev/info.php If you look To the PHP welcome test page, explain the installation success! So far, your system can run the PHP program! You have configured Win2000 Apache PHP MySQL ----------- --- Success in the hope! Take some dry food, think about 5 minutes mm, go to the toilet, or harass the big brother of the next door ------------ If you can determine 2 things, you can do it. : 1. Your IQ is indeed higher than the pile of waste than the Chinese Football Association 2. I really want to enter the JSP World Tour 4. JDK installation first step: running J2SDK1_3_0-win.exe, all the way to install, I hereby the default installation path is d: /jdk1.3 Step 2: Configure environment variables to click on the mouse button on my computer - Property - Click Advanced - Click Environment Variables to pop up the Environment Variables dialog box, create a new number of 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 the 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 In the menu bar, you can already run the JSP file, but we haven't integrated apache and tomcat, because though Tomcat has built-in Apache HTTP service, but he only refers to JSP programs. Perform 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 - # # this file provides jk derived plugins with with the needed information t - THE NEEDED INFORMATION T O # Connect to the Different Tomcat Workers. # # as a recognition $ (and) area used INTERLY to Define # macros. do not use the Them in Your OWN Configuration !!! # # WHENEVER YOU SEE A Set of Lines Such as: # 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 . # # When 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_ho ME = D: /JDK1.3 # # you shop configure your environment Slash ... ps = on nt and / on unix # and maybe something diffreent elsewhere. # ps = / # ps = / # # ------ Advanced Mode ---------------------------------------------- # ------------------------------------------------- -------------------- # # # ------ DEFAULT WORKET LIST ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------- -------------------------------------------- # # The workers That Your Plugins Should Create and Work with # worker.list =

AJP12, AJP13 # # ------ DEFAULT AJP12 WORKER Definition ---------------------------- # ---- -------------------------------------------------- --------------- # # Defining a worker named ajp12 and of taspe ajp12 # Note That the name and the type do not have match. # Worker.ajp12.port = 8007 worker .ajp12.host = localhost worker.ajp12.type = ajp12 # # Specifies the load balance factory gen buy 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 taspe 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 sales # a loading balancing worker. # Note: # -------- > lbfactor must be> 0 # ----> LO W LBFactor Means Less Work Done by The Worker. Worker.ajp13.lbFactor = 1 # # specify the size of the open connection cache. # worker.ajp13.cachesize # # ------ Default load balancer worker definition --- --------------------------------------------------------------------------------- --------------------------------------- # # The loadbalancer (Type LB) Workers Perform Wighted Round-Robin # loading balancing with sticky sessions. # Note: # ----> if a worker dies, the load balancer will check it. until the 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 do not have to match. # Worker.inprocess.type = JNI # # ------ ClassPath Definition ---------------------------------------------------------------------------------------------------- - # --------------------------------------------------------------------------------------------------------- ----------------------- # # Additional class path component_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 Implementation # 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) Web Server.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 contain spaces # worker.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 area 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 properties # # worker.inprocess.sysprops = java.compiler = NONE # worker.inprocess.sysprops = myprop = mypropvalue # # Additional path components # # worker.inprocess.ld_path = d:. $ (ps) SQLLIB $ (ps) bin # # -------------------------------------- The configuration file is complete ------- ------------------------------ In this document, you need to pay attention to modifying only two places, one is workers.tomcat_home This is a directory specified for Tomcat, and the other is workers.java_home, which is a directory of the specified 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 "/> -> removed, this Those familiar with XML know that it is a comment, because the default Tomcat4 is used by the 8009 port of the APJ13, MOD_JK is used, and then the modification is as follows: and then save, now your Tomcat and Apache are basically completed. Step 5: All configurations are basically completed, restart your computer, start the overall test! Test: Let's start Apache first, then enter http: // localhost in the browser, if you can see the Apache's welcome page, congratulations, the first step is successful.

Then return to the Tomca directory to run Startup.bat to start Tomcat, then open the browser input: http: // localhost: 8080 / If you see the lovely Tomcat, then congratulations, Tomcat has no problem, the last most important thing is under Apache You can explain the JSP and servlets, name the following code COPY to the text editor, the content is as follows: <% @ Page ContentType = "text / html; charset = GB2312"%> <% String str = "Hello World!";%> <% Str = str "Hello";%> <% = Str%> Save it to C: / Apache Tomcat 4.0 / WebApps / Under root, then enter http://localhost/hello.jsp in the browser if you have seen Hello, then you have succeeded. ------------------ I have already got a lot of songs, you can have a small song ---------------------- ---- My configuration document is tested. It is really possible to run and run. I hope to help you. If there is any problem during the process, please inform me! My QQ: 5359496Email: apollo@risesun-cn.com

Second, I will explain two questions: 1. Since I use a virtual host in configuring Apache, the access address can be: http: // localhost and http://root.dev, but if you want http://root.dev, please in the browser Do the following: Internet Options - Connection - LAN Settings Select "Using Proxy Server", address: 192.168.0.16 (write your host's IP) port: 802. For the JSP file accessed under the Apache host, there is actually there is no host of Apache, but there is a host directory in Tomcat, for example: http://localhost/hello.jsp actually not C : / Apache / HTDOCS / Under C: / Apache Tomcat 4.0 / WebApps / Root. Please note this, don't confuse the concept!

转载请注明原文地址:https://www.9cbs.com/read-24903.html

New Post(0)