Nginx(Apache)+Tomcat 安装配置

 

 

首页服务器应用

背景:

阅读新闻

Nginx(Apache)+Tomcat 安装配置

[日期:2011-11-19]   来源:Linux社区  作者:ykyx00   [字体:]  

使用到的软件:apache-tomcat-7.0.8.tar.gz jdk-6u26-linux-x64.bin

# sh jdk-6u26-linux-x64.bin
# mv jdk1.6.0_26/ /usr/local/
# cd /usr/local/
# mv jdk1.6.0_26/  jdk

#vim /etc/profile
export Java_HOME=/usr/local/jdk
export CLASSPATH=:$JAVA_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin
# source /etc/profile
# echo $JAVA_HOME
/usr/local/jdk
# echo $CLASSPATH
:/usr/local/jdk/lib
# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/MySQL/bin:/usr/local/jdk/bin:/usr/local/jdk/bin

# tar xf apache-tomcat-7.0.8.tar.gz -C /usr/local/
# cd /usr/local/
# mv apache-tomcat-7.0.8/ tomcat
# cd /usr/local/tomcat/bin
# ./startup.sh
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/local/jdk
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
# vim /usr/local/nginx/conf/nginx.conf
location ~ \.jsp$ {
                proxy_pass :8080;
        }
//关于nginx的详细配置请参考?uid=26118446&do=blog&id=2889850
# cd /usr/local/tomcat/webapps/ROOT
# vim index.jsp
The time is: <%= new java.util.Date() %>

Nginx(Apache)+Tomcat 安装配置



如果把nginx换成apache的话:

# yum install httpd -y
# mv mod_jk-1.2.31-httpd-2.2.x.so  /etc/httpd/modules         
//我这里用的是x86_64 的,一定要对应,要不服务起不起来
# vim /etc/httpd/conf.d/htp-jk.conf
LoadModule jk_module modules/mod_jk-1.2.31-httpd-2.2.x.so
JkShmFile logs/mod_jk.shm
JkLogFile logs/mod_jk.log
JkLogLevel info
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
JkMount /*.do ajp13
AddType application/x­jsp .jsp

linux

[LNMP]RHEL 6.0+Nginx 1.0.2+MySQL 5.5.12+PHP 5.3.6

RHEL6下Mrtg 服务器搭建

相关资讯      

   

本文评论   查看全部评论 (0)


评论声明

尊重网上道德,遵守中华人民共和国的各项有关法律法规

承担一切因您的行为而直接或间接导致的民事或刑事法律责任

本站管理人员有权保留或删除其管辖留言中的任意内容

本站有权在网站内转载或引用您的评论

参与本评论即表明您已经阅读并接受上述条款

 

 

 

最新资讯

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/ppdyf.html