Contos 安装Tomcat
# 下载安装包 wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.40/bin/apache-tomcat-8.5.40.tar.gz mv apache-tomcat-8.5.40.tar.gz /usr/local/ cd /usr/local/ tar -zxvf apache-tomcat-8.5.40.tar.gz mv apache-tomcat-8.5.40 tomcat cd tomcat/bin #启动 tomcat [root@linux3 local]# /usr/local/tomcat/bin/startup.sh Using CATALINA_BASE:/usr/local/tomcat Using CATALINA_HOME:/usr/local/tomcat Using CATALINA_TMPDIR:/usr/local/tomcat/temp Using JRE_HOME:/usr/java/jdk1.7.0_79/jre Using CLASSPATH:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar Tomcat started. 看到打印出以上内容 表示已经启动成功 测试 Tomcat http:ip:8080 #停止 tomcat /usr/local/tomcat/bin/shutdown.sh