Jdk的安装参见 http://www.cnblogs.com/Coder816/p/4286438.html
Tomcat下载地址: http://tomcat.apache.org/
//新建文件夹
sudo mkdir /usr/apache
// 解压tomcat
sudo tar zxvf apache-tomcat-8.0.18.tar.gz -C /usr/apache/
// 启动tomcat
sudo /usr/apache/apache-tomcat-8.0.18/bin/startup.sh
// 终端输出如下
Using CATALINA_BASE: /usr/apache/apache-tomcat-8.0.18
Using CATALINA_HOME: /usr/apache/apache-tomcat-8.0.18
Using CATALINA_TMPDIR: /usr/apache/apache-tomcat-8.0.18/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/apache/apache-tomcat-8.0.18/bin/bootstrap.jar:/usr/apache/apache-tomcat-8.0.18/bin/tomcat-juli.jar
Tomcat started.
/* 在浏览器地址栏输入
*http://localhost:8080
*可以看到tomcat的启动页面
*/