大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 技术开发 -> JSP专区 -> WIN2000+PHP+MYSQL+TOMCAT+JSP完全整合安装手册

WIN2000+PHP+MYSQL+TOMCAT+JSP完全整合安装手册

时间: 2021-07-31 作者:daque

一、前期筹备情景1。一个安置好的win2000效劳器,提防:即使预装了iis,请先将iis效劳停掉或禁止使用。2。下栽软硬件apache:本子:1.3.22 ——apache_1.3.22-win32-x86.msijdk:本子: 1.3 ——j2sdk1_3_0-win.exephp: 本子: 4.0.4 ——php4.0.4pl1-win32.zipmysql: 本子:3.23.32 ——mysql-3.23.32-win.zip tomcat:本子: 4.0.4 ——jakarta-tomcat-4.0.4.exemod_jk:这是jakarta构造开拓的使apache扶助tomcat的插件,比apachejserv更宏大,由于apachejserv只能用在apache上,而不许用在其余webserver 上,mod_jk不妨和很多效劳器搭配起来用。 载入地方:http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/win32/i386/(即使在供给的网址内找不到相映的软硬件,请在各大网上软硬件库找,普遍都有!或发邮件至apollo@risesun-cn.com)3。筹备好充满的糇粮和水,作好重复安置和从新启用的情绪筹备,但只有经心依照诉求去做,一次胜利不是什么难题!4。做一口深透气,别在想mm了!发端安置!二、安置发端1。apache安置第一步:运转apache_1.3.22-win32-x86.msi,一齐点决定和接收就行,基础比拟白痴,为了简单功夫和适合我的风气我安置的默许路途是 c:\ ,如许就安置在c盘下的apache的路途下,同声默许域为root.dev。第二步:(我在这边作了一个假造长机,此步不妨不做,按照你本人的需要)编纂c:\apache\conf\httpd.conf找到 #namevirtualhost * 窜改为 namevirtualhost 192.168.0.16 #提防这个ip为你本人长机设的ip找到 servername root.dev窜改为 #servername root.dev 增添 <virtualhost 192.168.0.16>serveradmin root@localhostservername root.devdocumentroot c:/apache/htdocserrorlog c:/apache/logs/error_logtransferlog c:/apache/logs/access_logscriptalias /cgi-bin c:/apache/cgi-bin</virtualhost> 第三步:将文献名 c:\apache\htdocs\index.html.en 改为c:\apache\htdocs\index.html 第四步:从新启用,考察 http://root.dev 欣赏平常,表露apache欢送页------------小小的胜利!不妨喝口水了!----------------------------2。mysql安置第一步: 解压 mysql-3.23.32-win.zip 到目次 d:\mysql第二步: 加入d:\mysql 运转setup.exe 一齐回车,默许安置到 c:\mysql------------这一步该当没有什么题目!-------------------------------3。php安置第一步: 解压 php4.0.4pl1-win32.zip 到目次 d:\php第二步: 将d:\php下正片到c盘根目次下第三步: 加入c:\php ,发端摆设php将文献名 php.ini-dist 改为 php.ini同声正片 php.ini 和 php4ts.dll 到win2000的体例安置目次下的 system32和system目次下 (很要害,别忘了)再次窜改apache的摆设文献httpd.conf (忘了吧!在c:\apache\conf\httpd.conf)增添: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 第四步: 从新启用体例 第六步: 尝试编写尝试文献 info.php (正片到目次 c:\apache\htdocs\ 下)文献实质:(就一条龙)<? phpinfo(); ?> 考察: http://localhost/info.php 或 http://root.dev/info.php即使看到php的欢送尝试页面,证明安置胜利!到暂时为止,你的体例仍旧不妨运转php步调了!你仍旧摆设好了 win2000+apache+php+mysql----------------胜利在望!吃些糇粮,想5秒钟mm,上趟茅厕,大概骚动一下隔邻的年老------------即使你能决定2件事就不妨往下举行了:1.你的智力商数真实比华夏足球协会的那堆宝物高2.真的很想加入jsp的寰球漫游4。jdk的安置第一步:径直运转 j2sdk1_3_0-win.exe,一齐回车安置,我这边默许的安置路途为d:\jdk1.3第二步:摆设情况变量在我的电脑上点击鼠标右键-属性-点选高档-点选情况变量弹出情况变量对话框,兴建以次变量名和值:-------------------------------------变量名:path变量值:d:\jdk1.3\bin变量名:java_home变量值:d:\jdk1.3变量名:classpath变量值:.\;d:\jdk1.3\lib\dt.jar;d:\jdk1.3\lib\tools.jar;第三步:从新启用计划机使摆设的情况变量奏效5。tomcat安置第一步:径直运转安置jakarta-tomcat-4.0.4.exe,我这边默许的安置路途是c:\apache tomcat 4.0这时候即使独立启用tomcat(到tomca目次下运转startup.bat启用tomcat或在菜单栏运转starttomcat),就仍旧不妨运转jsp文献了,然而咱们还没有将apache和tomcat集成在一道,由于固然tomcat有内置的一个apache的http效劳,然而他只是对jsp步调展现出比拟好的实行功效和本能,对于静态页面包车型的士处置速率远不如apache,以是为了一个完备的web体例,咱们要将apache和tomcat集成在一道!(底下即是集成她们的简直摆设办法,请提防提防刻意,我搞了1天性毕竟搞定!)第二步:先摆设apache翻开c:\apache\conf\httpd.conf增添以次语句:#------------------------------------------loadmodule 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 #-----------------------------------------------------提防:之上语句的基础道理是:第一、二句:指定apache和tomcat贯穿插件的场所和称呼第三句:指出mod_jk处事所须要的处事文献的场所第七、八句:是将一切和jsp和servlet的乞求经过apj13的和议送给tomcat,让tomcat来处置第三步:将载入的mod_jk.dllcopy到安置apache目次下的libexec下就不妨了第四步:tomcat摆设开始是在c:\apache tomcat4.0\conf目次下建一个worker.properties文献实质如次:#----------------------------------------------------------# $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 to # connect to the different tomcat workers. # # as a general note, the characters $( and ) are used internally to define # macros. do not use 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, i.e. # 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_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 that your plugins should create and work with # worker.list=ajp12, ajp13 # #------ default ajp12 worker definition ------------------------------ #--------------------------------------------------------------------- # # # defining a worker named ajp12 and of type ajp12 # note that the name and the type do not have to match. # worker.ajp12.port=8007 worker.ajp12.host=localhost worker.ajp12.type=ajp12 # # specifies the load balance factor when used with # a load 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 load balance factor when used with # a load balancing worker. # note: # ----> lbfactor must be > 0 # ----> low 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 # load 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 do not have to match. # worker.inprocess.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 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)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 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 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 properties # # worker.inprocess.sysprops=java.compiler=none # worker.inprocess.sysprops=myprop=mypropvalue # # additional path components. # # worker.inprocess.ld_path=d:$(ps)sqllib$(ps)bin # #--------------------------------------摆设文献结束------------------------------------- 在这个文献中须要提防的是要窜改惟有两个场合,一个是workers.tomcat_home,这是指定tomcat处事的目次,其余一个是workers.java_home,这是指定jdk的目次,大师不妨做符合窜改!我这边的摆设没有窜改,都是适合我安置体例的摆设!其次,摆设tomcat中心文献,翻开 c:\apache tomcat4.0\conf\server.xml窜改如次:将<!-- define an ajp 1.3 connector on port 8009 --> <!-- <connector classname="org.apache.ajp.tomcat4.ajp13connector" port="8009" minprocessors="5" maxprocessors="75" acceptcount="10" debug="0"/> --> 的<!-- --> 去掉,这句话熟习xml的人都领会它是解释,由于默许的tomcat4是没有起用apj13的8009的端口即mod_jk所运用,窜改后如次: <connector classname="org.apache.ajp.tomcat4.ajp13connector" port="8009" minprocessors="5" maxprocessors="75" acceptcount="10" debug="0"/> 而后生存,此刻你的tomcat和apache的摆设基础实行了。第六步:一切摆设基础实行,从新启用计划机,发端完全尝试!尝试:大师开始启用apache,而后在欣赏器里输出http://localhost,即使能看到apache的欢送页面,那么祝贺您,第一步胜利了。而后回到tomca目次下运转startup.bat启用tomcat,再翻开欣赏器输出:http://localhost:8080/即使看到心爱的tomcat,那么祝贺您,tomcat也没有题目,结果最要害的是apache下不妨证明jsp和servlet,把底下的代码copy到文本编纂器中定名为hello.jsp,实质如次: <%@ page contenttype="text/html;charset=utf8"%> <html> <body> <%string str="hello world!";%> <%str=str+"您好";%> <%=str%> </body> </html> 将它生存到c:\apache tomcat 4.0\webapps\root下,而后在欣赏器里输出http://localhost/hello.jsp即使看到了hello,那么您简直胜利了。------------------至此你仍旧大功成功,不妨哼一个小曲了--------------------------我的这个摆设文书档案是过程检验,真实不妨平常经过并运转的,蓄意能给你有所扶助,即使在举行进程中有任何题目,请报告我!我的qq:5359496email:apollo@risesun-cn.com其次我再阐明两个题目:1。因为我在摆设apache中运用了假造长机,以是考察地方不妨是:http://localhost和http://root.dev,然而即使想http://root.dev考察胜利的话,请在欣赏器里做如次树立:internet选项-贯穿-局域网树立 采用 “运用代劳效劳器”,地方:192.168.0.16 (写你长机的ip) 端口:802。对于apache长机下考察的jsp文献,本质上物理上不生存与apache的长机上,而是存到处tomcat的长机目次里,比方:http://localhost/hello.jsp 中hello.jsp文献本质不在 c:\apache\htdocs\下,而在c:\apache tomcat 4.0\webapps\root 下。这点请提防,不要污染观念!

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.