在Linux环境下安装JSP(一)[01-12-2117:19]作者:zxapache1.3.12+tomcat3.1.1+JDK1.2.2+mod_jserv.so1.所需软件及下载apache_1.3.12.tar.gz://java.sun.com/products/jdk/1.2/download-linux.htmlmod_jserv.so安装首先将上述四个文件拷贝到/usr/local目录。cpapache_1.3.12.tar.gz/usr/localcpjakarta-tomcat-3.1.1.tar.gz/usr/localcpjdk-1_2_2_007-linux-i386.tar.gz/usr/localcpmod_jserv.so/usr/local安装顺序如下:1)安装JDKcd/usr/localtarzxpfjdk-1_2_2007-linux-i386.tar.gz生成/usr/local/jdk1.2.2目录2)安装apachetarzxpfapache_1.3.12.tar.gz生成/usr/local/apache_1.3.12目录cdapache_1.3.12./configure\--prefix=/的安装路径是/=so//支持mod_jserv.somakemakeinstallmakeclean3)拷贝mod_jserv.so将mod_jserv.so拷贝到apahce的libexec目录cd/usr/localcp/usr/local/mod_jserv.so/)安装tomcatcd/usr/localtarzxpfjakarta-tomcat-3.1.1.tar.gz生成/usr/local/jakarta-tomcat目录5)配置系统变量vi/etc/profile//编辑/etc/profile在文件结尾加入:PATH=$PATH:/usr/local/jakarta-tomcat/bin:/usr/local/jdk1.2.2/bin:/usr/local/jdk1.2.2/jre/binJAVA_HOME=/usr/local/jdk1.2.2exportJAVA_HOMEJRE_HOME=/usr/local/jdk1.2.2/jreexportJRE_HOMETOMCAT_HOME=/usr/local/jakarta-tomcatexportTOMCAT_HOMECLASSPATH=/usr/local/jdk1.2.2/lib:/usr/local/jdk1.2.2/jre/libexportCLASSPATH6)配置httpd.conf把tomcat.conf文件拷贝到apache的conf目录cp/usr/local/jakarta-tomcat/conf/tomcat.conf/编辑apache的http.confvi/在文件结尾加入:Include/)启动apachecd/(关闭使用:./apachectlstop)8)启动tomcatcd/usr/local/jakarta-tomcat/bin./tomcat.shstart(关闭使用:./tomcat.shstop)9)测试jsp打开浏览器,敲入如果你看见jsp,servlet目录,则说明你的apache和tomcat已经连接成功。你可以使用jsp和servlet了。