爲了方便快捷的搭建linux環境,因而有了這幾篇文字java
1.安裝tomcat前,須要安裝JDK,請參考博主另一篇文章CentOS使用yum安裝jdklinux
2.本次安裝tomcat,使用wget下載命令安裝,須要先安裝wget命令apache
yum -y install wget
3.下載tomcatsegmentfault
cd /usr/local/(進入local文件夾)
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.31/bin/apache-tomcat-8.5.31.tar.gz
4.解壓tomcattomcat
tar -zxvf apache-tomcat-8.5.31.tar.gz
mv apache-tomcat-8.5.31 tomcat(修更名稱)
5.tomcat經常使用命令日誌
/usr/local/tomcat/bin/startup.sh(啓動命令) /usr/local/tomcat/bin/shutdown.sh(關閉命令) ps -ef|grep java(查看tomcat進程) kill -9 進程號(殺死常常) tail -f /usr/local/tomcat/logs/catalina.out(查看tomcat日誌)