【安装JDK】
[root@tomcat1 ~]# ls /software/
apache-tomcat-7.0.61-windows-x64.zip jdk-7u79-linux-x64.rpm
[root@tomcat1 ~]#cd /software
[root@tomcat1 software]# rpm -ivh jdk-7u79-linux-x64.rpm
[root@tomcat1 software]# cd /usr/java/
[root@tomcat1 java]# mv jdk1.7.0_79/ /usr/local/jdk
[root@tomcat1 java]#tail -5 /etc/bashrc #加入下面这五行环境变量
export JRE_HOME=/usr/local/jdk
export JAVA_BIN=/usr/local/jdk/bin
export PATH=$JRE_HOME/bin:$PATH
export CLASSPATH=.:$JRE_HOME/lib/dt.jar:$JRE_HOME/lib/tools.jar
export JRE_HOME JAVA_BIN PATH CLASSPATH
[root@tomcat1 java]# source /etc/bashrc
[root@tomcat1 java]# echo $JRE_HOME
[root@tomcat1 java]# java -version #查看版本
【安装Tomcat】
[root@tomcat1 java]# cd /software
[root@tomcat1 software]# unzip apache-tomcat-7.0.61-windows-x64.zip
[root@tomcat1 software]# mv apache-tomcat-7.0.61 /usr/local/tomcat
[root@tomcat1 software]# cd /usr/local/tomcat/
[root@tomcat1 software]#chmod +x bin/*.sh;cd bin
[root@tomcat1 bin]# ./startup.sh
[root@tomcat1 bin]# netstat -tulnp | grep :8080
【本机测试访问】
[root@tomcat1 bin]# elinks --dump http://localhost:8080
本文出自 “wsyht的博客” 博客,请务必保留此出处http://wsyht2015.blog.51cto.com/9014030/1790728
原文地址:http://wsyht2015.blog.51cto.com/9014030/1790728