1.安装PHP+mysql+Apache2...注意,Apache要带上--enable-so2.安装JDK环境到Java网站下载:j2sdk-1_4_2_07-Linux-i586.bin#chmod a+x j2sdk-1_4_2_07-linux-i586.bin#./j2sdk-1_4_2_07-linux-i586.bin#mv j2sdk-1_4_2_07 /usr/local/jdk#vi /etc/profileeXPort JAVA_HOME=/usr/local/jdkexport PATH=$PATH:$JAVA_HOME/binexport CLASSPATH=$JAVA_HOME/lib如果是RHEL3的话,还需要删除原来的空Java环境#rm -f /usr/bin/java#rm -f /usr/bin/javac#rm -f /etc/alternatives/java#rm -f /etc/alternatives/javac重新登录#java -version查看是否正确.3.安装Tomcat到Apache的网站上下载:jakarta-tomcat-5.0.30.tar.gz#tar xzvf jakarta-tomcat-5.0.30.tar.gz#mv jakarta-tomcat-5.0.30 /usr/local/tomcat运行/usr/local/tomcat/bin/startup.sh启动Tomcat,http://IP:8080/查看是否安装成功.4.安装mod_jk2下载:jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz#tar zxvf jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz#cd jakarta-tomcat-connectors-jk2-2.0.4-src/#cd jk/native2#./configure --with-apxs2=/usr/local/apache2/bin/apxs #make#cp ../build/jk2/apache2/mod_jk2.so /usr/local/apache2/modules(如果不成功,有提示错误的话,请安装liBTool的高版本:http://www.gnu.org/software/libtool/tar zxvf libtool-1.5.14.tar.gzcd libtool-1.5.14./configuremakemake install)5.配置a.httpd.conf(/usr/local/apache2/conf/)不让/WEB-INF下的文档暴露Order allow,denyDeny from all加载jk2模块LoadModule jk2_module modules/mod_jk2.sob.workers2.properties(/usr/local/apache2/conf/此文件为新建)[logger.apache2]level=info #日志级别[shm]file=/var/logs/httpd/shm.logsize=1048576 #这个不知道干什么的??[channel.socket:localhost:8009]port=8009 #apache和tomcat的通讯端口host=127.0.0.1[ajp13:localhost:8009]channel=channel.socket:localhost:8009[uri:/*.jsp] worker=ajp13:localhost:8009[uri:/servlet/*]worker=ajp13:localhost:8009c./usr/local/tomcat/conf/server.XML在前面加上:6.启动测试启动Tomcat和Apache测试.7.启动脚本可以在/etc/init.d/下面,按照httpd格式建一个启动脚本,用/usr/local/tomcat/bin/startup.sh启动/usr/local/tomcat/bin/shutdown.sh停止注意,脚本前要加上/etc/profile里的环境变量.chkconfig --add tomcatchkconfig tomcat on8.参考:http://ms.mblogger.cn/andijo/posts/8534.ASPxhttp://chinaunix.net/jh/13/306170.Htmlhttp://blogger.org.cn/blog/more.asp?name=sixsun&id=1027http://www.jmyes.com/viewthread.php?tid=9952&extra=page%3D1
[1] [2] 下一页
(出处:http://www.sheup.com)
上一页 [1] [2]