1、安装JDK8
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get install oracle-java8-installer
$ sudo apt-get update
$ java -version
2、安装tomcat8
$wget http://mirrors.shu.edu.cn/apache/tomcat/tomcat-8/v8.0.52/bin/apache-tomcat-8.0.52.tar.gz
$tar zxvf apache-tomcat-8.0.52.tar.gz
$sudo mv apache-tomcat-8.0.52/ /opt/apache-tomcat-8.0.52
$vi /opt/apache-tomcat-8.0.52/conf/service.xml
修改端口为80
$./opt/apache-tomcat-8.0.52/bin/startup.sh #启动服务
3、查看输出
$tail -f /opt/apache-tomcat-8.0.52/logs/catalina.out