方式一、tar安装:

1、下载tomcat8.5:

http://tomcat.apache.org/download-80

2、上传到linux:

3、解压:

mkdir /usr/local/tomcat
cp apache-tomcat-8.5.31.tar.gz /usr/local/tomcat
cd /usr/local/tomcat
tar -zxvf apache-tomcat-8.5.31.tar.gz

4、配置环境变量:

vi /etc/profile
#tomcat environment
export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-8.5.31
export PATH=$PATH:$CATALINA_HOME/bin

4、应用修改:

source /etc/profile

5、验证:

方式二、yum安装:

1、查看可安装tomcat列表:

yum list tomcat*

2、安装tomcat:

yum -y install tomcat*

3、tomcat的安装目录在/usr/share/tomcat里面:

Logo

更多推荐