centos JDK+TOMCAT
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos JDK+TOMCAT相关的知识,希望对你有一定的参考价值。
配置环境centos
将JAVA包解压到任意目录
配置变量
vim /etc/proflie
export JAVA_HOME=/usr/java/jdk_1.7.0_21
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
soure/etc/profile 使配置生效
1.查看Linux系统JDK版本号:
[[email protected] ~]# java -version
java version "1.7.0_45"
OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
2.下载tomcat并启动
[[email protected] ~]# wget http://apache.opencas.org/tomcat/tomcat-7/v7.0.69/bin/apache-tomcat-7.0.69.tar.gz # 下载tomcat压缩包
[[email protected] ~]# tar xf apache-tomcat-7.0.64.tar.gz -C /usr/local/ # 把tomcat压缩包解压到/usr/local/ 目录下。
[[email protected] ~]# cd /usr/local/apache-tomcat-7.0.64/bin/
# 进入tomcat解压文件的bin目录下。
[[email protected] bin]# sh startup.sh # 启动tomcat
Using CATALINA_BASE: /usr/local/apache-tomcat-7.0.64
Using CATALINA_HOME: /usr/local/apache-tomcat-7.0.64
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.64/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/apache-tomcat-7.0.64/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.64/bin/tomcat-juli.jar
Tomcat started.
netstat -ntlp查看端口
到这里tomcat安装完毕!
以上是关于centos JDK+TOMCAT的主要内容,如果未能解决你的问题,请参考以下文章
tomcatCentos7最快速安装tomcat网页实验环境(yum安装)