CentOS8 Tomcat8 安装配置
1、下载
https://tomcat.apache.org/download-80.cgi
2、上传到CentOS8系统
3、解压
[root@localhost opt]# tar -zxvf apache-tomcat-8.5.63.tar.gz
4、修改tomcat环境配置,对startup.sh和shutdown.sh进行修改
[root@localhost bin]# cd /www/server/tomcat8/bin
进入编辑器
[root@localhost bin]# vim startup.sh
增加配置项
JAVA_HOME 为JDK安装的目录路径
TOMCAT_HOME 为tomcat安装的目录路径
CATALINA_HOME 为tomcat安装的目录路径
export JAVA_HOME=/opt/java/jdk1.8.0_281 export TOMCAT_HOME=/www/server/tomcat8 export CATALINA_HOME=/www/server/tomcat8 export CLASS_PATH=$JAVA_HOME/bin/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tool.jar export PATH=$PATH:$JAVA_HOME/bin:$TOMCAT_HOME/bin
如下图:
5、启动tomcat服务
[root@localhost bin]# ./startup.sh Using CATALINA_BASE: /opt/tomcat/apache-tomcat-8.5.63 Using CATALINA_HOME: /opt/tomcat/apache-tomcat-8.5.63 Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-8.5.63/temp Using JRE_HOME: /opt/java/jdk1.8.0_281/jre Using CLASSPATH: /opt/tomcat/apache-tomcat-8.5.63/bin/bootstrap.jar:/opt/tomcat/apache-tomcat-8.5.63/bin/tomcat-juli.jar Using CATALINA_OPTS: Tomcat started.