Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1150206
  • 博文数量: 188
  • 博客积分: 2267
  • 博客等级: 大尉
  • 技术积分: 1907
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-01 11:17
文章分类

全部博文(188)

文章存档

2016年(16)

2015年(16)

2014年(12)

2013年(32)

2012年(45)

2011年(67)

分类: LINUX

2011-09-23 10:11:34

使用到的软件: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
        }
//关于nginx的详细配置请参考
http://blog.chinaunix.net/space.php?uid=26118446&do=blog&id=2889850
# cd /usr/local/tomcat/webapps/ROOT
# vim index.jsp
The time is: <%= new java.util.Date() %>


如果把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
阅读(1310) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~