1.下载和安装jre
下载地址:wget http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jre-8u5-linux-x64.rpm?AuthParam=1404923334_f3f295697f694911cb4d0848524df4df
安装命令:rpm -ivh jre-8u5-linux-x64.rpm
环境配置:
vi /etc/profile
! (进入插入模式)
插入以下类容:
PATH:/usr/java/jre1.8.0_05 /bin
export JAVA_HOME =/usr/java/jre1.8.0_05
export CLASSPATH = $JAVA_HOME/lib:.
保存并退出esc+:wq
(不保存直接退出是:q!)
验证:java -version
2.下载tomcat文件和解压文件
下载地址:wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.0.9/bin/apache-tomcat-8.0.9.tar.gz
解压命令:tar -zxvf apache-tomcat-8.0.9.tar.gz
cp -R apache-tomcat-8.0.9 /usr/local/tomcat
/usr/local/tomcat/bin/startup.sh
测试:http://[IP地址]:8080/
手动启动tomcat:
cd /usr/local/tomcat/bin
./startup.sh