⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 php+jsp.htm

📁 一个不错JSP入门教程.
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>我是如何在Linux下装PHP</title>
</head>

<body>

<p><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;
mso-hansi-font-family:&quot;\000B&#12;&quot;">我是如何在</span><span lang="EN-US" style="font-family:
&quot;\000B&#12;&quot;">Linux</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;
mso-hansi-font-family:&quot;\000B&#12;&quot;">下装</span><span lang="EN-US" style="font-family:
&quot;\000B&#12;&quot;">PHP+JSP</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;
mso-hansi-font-family:&quot;\000B&#12;&quot;">的</span><span lang="EN-US" style="font-family:
&quot;\000B&#12;&quot;"><br>
<br>
<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">这里我使用的是</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">apache_1.3.9;ApacheJServ-1.1b3;gnujsp1.0.0<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">全部是</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">tar.gz</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">格式,</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
tar&nbsp;-zxvf&nbsp;apache.tar.gz<br>
tar&nbsp;-zxvf&nbsp;ApacheJServ-1.1b3<br>
tar&nbsp;-zxvf&nbsp;gnujsp.tar.gz<br>
tar&nbsp;-zxvf&nbsp;jsdk.tar.gz<br>
cd&nbsp;apache_1.3.9<br>
./configure&nbsp;--prefix=/www<br>
make&nbsp;install<br>
cd&nbsp;../php-3.0.12<br>
./configure&nbsp;--with-mysql=/mysql&nbsp;--with-apache=../apache_1.3.9&nbsp;--enable-track-vars<br>
make<br>
make&nbsp;install<br>
cd&nbsp;../ApacheJServ-1.1b3<br>
./configure&nbsp;--prefix=/usr/local/jserv&nbsp;--with-apache-src=../apache_1.3.9&nbsp;--with-jdk-home=/jdk117_v3&nbsp;--with-JSDK=../JSDK/lib/jsdk.jar<br>
make&nbsp;install<br>
cd&nbsp;../apache_1.3.9<br>
./configure&nbsp;--prefix=/www&nbsp;--activate-module=src/modules/php3/libphp3.a&nbsp;--activate-module=/src/modules/jserv/libjserv.a<br>
make<br>
make&nbsp;install<br>
<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">然后开始配置</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">PHP(</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">略)</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">接着来配置</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">JSP<br>
1.</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">把</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">gnujsp10.jar,servlet-2.0-plus.jar</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">拷到</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">/www/htdocs/servlets</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">目录下</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
2.</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">修改</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">jserv.conf,</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">加上</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
ApJServAction&nbsp;.jsp&nbsp;/servlets/gnujsp<br>
ApjServMount&nbsp;/java&nbsp;/root(</span><span style="font-family:宋体;
mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:&quot;\000B&#12;&quot;">这个目录主要是用来存放</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">jsp</span><span style="font-family:
宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:&quot;\000B&#12;&quot;">生成的</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">java<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">和</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">class</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">文件</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">,</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">可视具体情况而定</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">)<br>
4.</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">修改</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">jserv.properties,</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">加入</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
wrapper.classpath=/jdk117_v3/lib/classes.zip<br>
wrapper.classpath=/usr/local/jserv/libexec/ApacheJServ.jar<br>
wrapper.classpath=/home/riso/webserversrc/JSDK/lib/jsdk.jar<br>
wrapper.classpath=/www/htdocs/servlets/gnujsp10.jar<br>
wrapper.classpath=/www/htdocs/servlets/servlet-2.0-plus.jar&nbsp;&nbsp;<br>
5.</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">修改</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">zone.properties,</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">加入</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
servlet.gnujsp.code=org.gjt.jsp.JspServlet<br>
servlet.gnujsp.JspServlet.initArgs=checkclass=true<br>
servlet.gnujsp.JspServlet.initArgs=scratchdir=/home/httpd/java<br>
servlet.gnujsp.JspServlet.initArgs=compiler=/jdk117_v3/bin/javac&nbsp;-encoding&nbsp;%encoding%&nbsp;-classpath&nbsp;%classpath%&nbsp;-d&nbsp;%scratchdir%&nbsp;-deprecation%source%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">当然,还要将</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">jserv.conf</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">文件</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">include</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">到</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">httpd.conf</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">中去</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
cd&nbsp;/www/bin/<br>
./apachectl&nbsp;start<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">测试一下</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">http://XXX.XXX.XXX.XXX/jserv/<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">(先在</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">jserv.conf</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">文件中加入访问权限)</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">成功!</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">将</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">gnujsp</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">自带的三个例子文件拷贝到</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">/www/htdocs</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">下</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;"><br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">测试</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">http://XXX.XXX.XXX.XXX/hello.jsp&nbsp;<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">测试</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">http://XXX.XXX.XXX.XXX/date.jsp&nbsp;<br>
</span><span style="font-family:宋体;mso-ascii-font-family:&quot;\000B&#12;&quot;;mso-hansi-font-family:
&quot;\000B&#12;&quot;">测试</span><span lang="EN-US" style="font-family:&quot;\000B&#12;&quot;">http://XXX.XXX.XXX.XXX/snoop.jsp</span></p>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -