首先声明我不会java,我只简单纪录一下我最近在CentOS上的安装tomcat过程,如有错误欢迎指出。我是在CentOS 6.2上安装测试的。

# cat /etc/redhat-release
CentOS release 6.2 (Final)

下载jdk和tomcat

#wget http://download.oracle.com/otn-p … -6u25-linux-x64.bin

#wget http://mirror.bjtu.edu.cn/apache … omcat-7.0.23.tar.gz

#vi /etc/profile 添加以下几行

JAVA_HOME=”/usr/local/jdk”
CLASS_PATH=”$JAVA_HOME/lib:$JAVA_HOME/jre/lib”
PATH=”.:$PATH:$JAVA_HOME/bin”
CATALINA_HOME=”/usr/local/tomcat”
export JAVA_HOME CATALINA_HOME

#source /etc/profile

#chmod u+x jdk-6u25-linux-x64.bin

#./jdk-6u25-linux-x64.bin

#mv  jdk1.6.0_25  /usr/local/jdk

# java -version

java version “1.6.0_25″
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

#tar -xzvf  apache-tomcat-7.0.23.tar.gz

#mv apache-tomcat-7.0.23 /usr/local/tomcat/

#/usr/local/tomcat/bin/startup.sh

# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1014/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1091/master
tcp 0 0 :::8080 :::* LISTEN 1154/java
tcp 0 0 :::22 :::* LISTEN 1014/sshd
tcp 0 0 ::1:25 :::* LISTEN 1091/master
tcp 0 0 ::ffff:127.0.0.1:8005 :::* LISTEN 1154/java
tcp 0 0 :::8009 :::* LISTEN 1154/java

在浏览器访问http://192.168.0.148:8080

CentOS 上安装 Apache Tomcat 7.0.23

1.jpg (25.04 KB, 下载次数: 0)

下载附件  保存到相册

2012-12-7 18:07 上传

发表评论

电子邮件地址不会被公开。 必填项已用*标注