下載tomcat linux的包遣耍,地址:http://tomcat.apache.org/download-80.cgi刊殉,我們下載的版本是8.0殉摔,下載方式如下
查看服務(wù)器是否已經(jīng)安裝依賴jdk:java -version(如果沒有可以查看centos安裝jdk)
[root@iZ44qcuj3sp989Z ~]# java -version
java version "1.7.0_171"
OpenJDK Runtime Environment (rhel-2.6.13.0.el7_4-x86_64 u171-b01)
OpenJDK 64-Bit Server VM (build 24.171-b01, mixed mode)
在Xshell中使用命令跳轉(zhuǎn)到local下面創(chuàng)建者自己的文件夾:tomcat8.5.28/
[root@iZ44qcuj3sp989Z /]# ls
bin? dev? home? lib64? ? ? media? opt? root? sbin? sys? usr? yjdata
boot? etc? lib? lost+found? mnt? ? proc? run? srv? tmp? var
[root@iZ44qcuj3sp989Z /]# cd usr/
[root@iZ44qcuj3sp989Z usr]# cd local/
[root@iZ44qcuj3sp989Z local]# ls
aegis? ? bin? etc? ? include? lib64? ? php5.5? share
apache2? curl? games? lib? ? ? libexec? sbin? ? src
[root@iZ44qcuj3sp989Z local]# mkdir tomcat8.5.28
[root@iZ44qcuj3sp989Z local]# cd tomcat8.5.28/
[root@iZ44qcuj3sp989Z tomcat8.5.28]# ls
上傳下載好的tomcat壓縮包到文件夾中,rz命令上傳選擇文件
[root@iZ44qcuj3sp989Z tomcat8.5.28]# rz
rz waiting to receive.
Starting zmodem transfer.? Press Ctrl+C to cancel.
Transferring apache-tomcat-8.5.28.tar...
? 100%? 13770 KB? ? 292 KB/sec? ? 00:00:47? ? ? 0 Errors
解壓縮apache-tomcat-8.5.28.tar
tar -xvf?apache-tomcat-8.5.28.tar
啟動tomcat
[root@iZ44qcuj3sp989Z bin]# /usr/local/tomcat8.5.28/apache-tomcat-8.5.28/bin/startup.sh
Using CATALINA_BASE:? /usr/local/tomcat8.5.28/apache-tomcat-8.5.28
Using CATALINA_HOME:? /usr/local/tomcat8.5.28/apache-tomcat-8.5.28
Using CATALINA_TMPDIR: /usr/local/tomcat8.5.28/apache-tomcat-8.5.28/temp
Using JRE_HOME:? ? ? ? /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75.x86_64/jre
Using CLASSPATH:? ? ? /usr/local/tomcat8.5.28/apache-tomcat-8.5.28/bin/bootstrap.jar:/usr/local/tomcat8.5.28/apache-tomcat-8.5.28/bin/tomcat-juli.jar
Tomcat started.