共计 6318 个字符,预计需要花费 16 分钟才能阅读完成。
下载 tomcat
wget http://apache.mirrors.tds.net/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz
下载 jdk
wget http://download.Oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.rpm?AuthParam=1380156785_0ca1938e622ee55dad3148c1442358b3
[root@localhost src]# mv jdk-7u40-linux-x64.rpm\?AuthParam\=13801567
85_0ca1938e622ee55dad3148c1442358b3 jdk-7u40-linux-x64.rpm
[root@localhost src]# rpm -ivh jdk-7u40-linux-x64.rpm
[root@localhost src]# export JAVA_HOME=/usr/java/jdk1.7.0_40
[root@localhost src]# export JAVA_BIN=/usr/java/jdk1.7.0_40/bin
[root@localhost src]# export PATH=$PATH:$JAVA_HOME/bin
[root@localhost src]# export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
[root@localhost src]# export JAVA_HOME JAVA_BIN PATH CLASSPATH
[root@localhost src]# java -version
java version “1.7.0_40”
这也正是临时生效,所以,我们需要把这些配置导入到 /etc/profile
[root@localhost src]#echo “export JAVA_HOME=/usr/java/jdk1.7.0_40” >> /etc/profile
[root@localhost src]#echo “export JAVA_BIN=/usr/java/jdk1.7.0_40/bin” >> /etc/profile
[root@localhost src]#echo “export PATH=$PATH:$JAVA_HOME/bin” >> /etc/profile
[root@localhost src]#echo ” export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar” >> /etc/profile
[root@localhost src]# echo “export JAVA_HOME JAVA_BIN PATH CLASSPATH” >> /etc/profile
[root@localhost bin]# echo “export TOMCAT_HOME=/usr/local/tomcat” >> /etc/profile
[root@localhost src]#source /etc/profile
[root@localhost bin]# pwd
/usr/local/tomcat/bin
[root@localhost 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/java/jdk1.7.0_40
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
http://127.0.0.1:8080
更多详情见请继续阅读下一页的精彩内容 :http://www.linuxidc.com/Linux/2013-10/92074p2.htm
相关阅读 :
CentOS 6.2 实战部署 Nginx+MySQL+PHP http://www.linuxidc.com/Linux/2013-09/90020.htm
使用 Nginx 搭建 WEB 服务器 http://www.linuxidc.com/Linux/2013-09/89768.htm
搭建基于 Linux6.3+Nginx1.2+PHP5+MySQL5.5 的 Web 服务器全过程 http://www.linuxidc.com/Linux/2013-09/89692.htm
CentOS 6.3 下 Nginx 性能调优 http://www.linuxidc.com/Linux/2013-09/89656.htm
CentOS 6.3 下配置 Nginx 加载 ngx_pagespeed 模块 http://www.linuxidc.com/Linux/2013-09/89657.htm
CentOS 6.4 安装配置 Nginx+Pcre+php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm
Nginx 的详细介绍 :请点这里
Nginx 的下载地址 :请点这里
Tomcat 的详细介绍 :请点这里
Tomcat 的下载地址 :请点这里
相关阅读 :
CentOS 6.2_x64 位系统安装 Nginx+Tomcat http://www.linuxidc.com/Linux/2013-10/91680.htm
RedHat 中安装 Tomcat http://www.linuxidc.com/Linux/2013-09/90675.htm
Tomcat 服务器的下载安装跟基本配置 http://www.linuxidc.com/Linux/2013-09/89901.htm
Linux 下 Apache 与 Tomcat 的完全分布式集群配置(负载均衡)http://www.linuxidc.com/Linux/2013-08/89072.htm
CentOS 系统中安装 Tomcat7 并设置为自启动服务 http://www.linuxidc.com/Linux/2013-05/84612.htm
Ubuntu Server 12.04 安装 Tomcat 7.0.40 http://www.linuxidc.com/Linux/2013-05/84696.htm
为了测试,特地请同事帮我写了点代码
/usr/local/tomcat/webapps/ceshi/ceshi
[root@localhost ceshi]# cat index.jsp
<%@ page language=”java” import=”java.util.*” pageEncoding=”GBK”%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;
%>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<base href=”https://www.linuxidc.com/Linux/2013-10/<%=basePath%>”>
<title> 测试页面 </title>
<meta http-equiv=”pragma” content=”no-cache”>
<meta http-equiv=”cache-control” content=”no-cache”>
<meta http-equiv=”expires” content=”0″>
<meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
<meta http-equiv=”description” content=”This is my page”>
<!–
<link rel=”stylesheet” type=”text/css” href=”https://www.linuxidc.com/Linux/2013-10/styles.css”>
–>
</head>
<body>
This is my JSP page. 测试页面 <br>
</body>
</html>
http://127.0.0.1:8080/ceshi/ceshi/index.jsp
This is my JSP page. 测试页面
下载 tomcat
wget http://apache.mirrors.tds.net/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz
下载 jdk
wget http://download.Oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.rpm?AuthParam=1380156785_0ca1938e622ee55dad3148c1442358b3
[root@localhost src]# mv jdk-7u40-linux-x64.rpm\?AuthParam\=13801567
85_0ca1938e622ee55dad3148c1442358b3 jdk-7u40-linux-x64.rpm
[root@localhost src]# rpm -ivh jdk-7u40-linux-x64.rpm
[root@localhost src]# export JAVA_HOME=/usr/java/jdk1.7.0_40
[root@localhost src]# export JAVA_BIN=/usr/java/jdk1.7.0_40/bin
[root@localhost src]# export PATH=$PATH:$JAVA_HOME/bin
[root@localhost src]# export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
[root@localhost src]# export JAVA_HOME JAVA_BIN PATH CLASSPATH
[root@localhost src]# java -version
java version “1.7.0_40”
这也正是临时生效,所以,我们需要把这些配置导入到 /etc/profile
[root@localhost src]#echo “export JAVA_HOME=/usr/java/jdk1.7.0_40” >> /etc/profile
[root@localhost src]#echo “export JAVA_BIN=/usr/java/jdk1.7.0_40/bin” >> /etc/profile
[root@localhost src]#echo “export PATH=$PATH:$JAVA_HOME/bin” >> /etc/profile
[root@localhost src]#echo ” export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar” >> /etc/profile
[root@localhost src]# echo “export JAVA_HOME JAVA_BIN PATH CLASSPATH” >> /etc/profile
[root@localhost bin]# echo “export TOMCAT_HOME=/usr/local/tomcat” >> /etc/profile
[root@localhost src]#source /etc/profile
[root@localhost bin]# pwd
/usr/local/tomcat/bin
[root@localhost 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/java/jdk1.7.0_40
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
http://127.0.0.1:8080
更多详情见请继续阅读下一页的精彩内容 :http://www.linuxidc.com/Linux/2013-10/92074p2.htm
相关阅读 :
CentOS 6.2 实战部署 Nginx+MySQL+PHP http://www.linuxidc.com/Linux/2013-09/90020.htm
使用 Nginx 搭建 WEB 服务器 http://www.linuxidc.com/Linux/2013-09/89768.htm
搭建基于 Linux6.3+Nginx1.2+PHP5+MySQL5.5 的 Web 服务器全过程 http://www.linuxidc.com/Linux/2013-09/89692.htm
CentOS 6.3 下 Nginx 性能调优 http://www.linuxidc.com/Linux/2013-09/89656.htm
CentOS 6.3 下配置 Nginx 加载 ngx_pagespeed 模块 http://www.linuxidc.com/Linux/2013-09/89657.htm
CentOS 6.4 安装配置 Nginx+Pcre+php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm
Nginx 的详细介绍 :请点这里
Nginx 的下载地址 :请点这里
Tomcat 的详细介绍 :请点这里
Tomcat 的下载地址 :请点这里
相关阅读 :
CentOS 6.2_x64 位系统安装 Nginx+Tomcat http://www.linuxidc.com/Linux/2013-10/91680.htm
RedHat 中安装 Tomcat http://www.linuxidc.com/Linux/2013-09/90675.htm
Tomcat 服务器的下载安装跟基本配置 http://www.linuxidc.com/Linux/2013-09/89901.htm
Linux 下 Apache 与 Tomcat 的完全分布式集群配置(负载均衡)http://www.linuxidc.com/Linux/2013-08/89072.htm
CentOS 系统中安装 Tomcat7 并设置为自启动服务 http://www.linuxidc.com/Linux/2013-05/84612.htm
Ubuntu Server 12.04 安装 Tomcat 7.0.40 http://www.linuxidc.com/Linux/2013-05/84696.htm