欢迎来到天天文库
浏览记录
ID:36995676
大小:55.01 KB
页数:8页
时间:2019-05-17
《linux下apache和tomcat整合》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、目录linux下Apache和tomcat整合1下载所需的软件包1安装步骤1安装jdk1安装apache2安装tomcat3安装mod_jk3系统整合41、cd/usr/local/apache/conf42、vi/usr/local/apache/conf/workers.properties(自己写的一个文件)43、cd/usr/local/tomcat/conf6附加说明7修改apache下的conf下的httpd.conf7修改tomcat的conf的server.xml7linux下Apache和tomca
2、t整合下载所需的软件包①httpd-2.0.55.tar.gz(apache)②jakarta-tomcat-5.0.28.zip(tomcat)③jakarta-tomcat-connectors-1.2.14.1-src.tar.gz(mod_jk整合apache和tomcat的连接包)④jdk-1_5_0_06-linux-i586.rpm.bin(jdk)安装步骤安装jdkcd/usr/localchmod755jdk-1_5_0_06-linux-i586.rpm.bin./jdk-1_5_0_06-lin
3、ux-i586.rpm.bin改变环境变量exportJAVA_HOME=/usr/java/jdk-1_5_06 exportCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar exportPATH=$PATH:$JAVA_HOME/bin编写测试文档(test.java)vitest.javapublicclasstest{publicstaticvoidmain(String[]args){System.out.println(“he
4、lloworld”);}}编译javactest.java运行javatest出现helloworld说明安装jdk成功安装apache把下载的httpd-2.0.55.tar.gz拷到/usr/local(个人习惯,可以在任何地方)tarxvfzhttpd-2.0.54.tar.gz(解压) #cdhttpd-2.0.54 #./configure--prefix=/usr/local/apache--enable-module=so #make(root用户编译) #makeinstall
5、 #cd/usr/local/apache/conf #vi./httpd.conf 将Listen80修改为Listenlocalhost:80 (端口是80) 将ServerName修改为ServerNameLocalHost:80 在DirectoryIndex中添加index.jsp(394行)(整合后看的tomcat的默认页面)cd/usr/local/apache/bin/ #./apachectlconfigtest 显示Syntaxok则表明安装成功 #
6、./apachectlstart(启动apache) 浏览器中访问本机80端口,查看端口是否正常,输入localhost:80可以看到apache的默认首页 #./apachectlstop(关闭apache服务) 安装tomcat把jakarta-tomcat-5.0.28.zip拷到/usr/localunzipjakarta-tomcat-5.0.28.zip(解压)ln–s/usr/local/Jakarta-5.0.28/usr/local/tomcat(主要为了更好的表达)exportC
7、ATALINA_HOME=/usr/local/tomcat/exportCATALINA_BASE=/usr/local/tomcat/cd/usr/local/tomcat/binchmod755*.shcd/usr/local/tomcat/bin./startup.sh(启动tomcat服务)./shutdown.sh(关闭tomcat服务)安装mod_jk把jakarta-tomcat-connectors-1.2.14.1-src.tar.gz拷到/usr/localtarzxvfjakarta-tomc
8、at-connectors-1.2.14.1-src.tar.gzcdjakarta-tomcat-connectors-1.2.14-src/jk/nativechmod755buildconf.sh./buildconf.sh./configure--with-apxs=/usr/local/apache/bin/apxsmakemakei
此文档下载收益归作者所有