tomcat8.5安装配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat8.5安装配置相关的知识,希望对你有一定的参考价值。
# cat /etc/redhat-release
CentOS release 6.9 (Final)
#yum remove java -y
下载jdk:(jdk-8u152-linux-x64.tar )
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
#tar zxvf jdk-8u152-linux-x64.tar.gz
#mv jdk1.8.0_152/ /usr/local/
#cd /usr/local/
#vim /etc/profile.d/java.sh
JAVA_HOME=/usr/local/jdk1.8.0_152
JAVA_BIN=/usr/local/jdk1.8.0_152/bin
JRE_HOME=/usr/local/jdk1.8.0_152/jre
PATH=$PATH:/usr/local/jdk1.8.0_152/bin:/usr/local/jdk1.8.0_152/jre/bin
CLASSPATH=/usr/local/jdk1.8.0_152/jre/lib:/usr/local/jdk1.8.0_152/lib:/usr/local/jdk1.8.0_152/jre/lib/charsets.jar
#source /etc/profile.d/java.sh
#java -version
[[email protected] local]# java -version
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
[[email protected] local]#
下载tomcat
(apache-tomcat-8.5.23.tar)
#rz
#tar -zxvf apache-tomcat-8.5.23.tar.gz
#ls
#mv apache-tomcat-8.5.23 /usr/local/tomcat
#cp -pv /usr/local/tomcat/bin/catalina.sh /etc/init.d/tomcat
#vi /etc/init.d/tomcat
从第二行加入
# chkconfig: 2345 63 37
# description: tomcat server init script
# Source Function Library
. /etc/init.d/functions
JAVA_HOME=/usr/local/jdk1.8.0_152
CATALINA_HOME=/usr/local/tomcat
保存后执行:
#chmod 755 /etc/init.d/tomcat
#chkconfig --add tomcat
#chkconfig tomcat on
#service tomcat start
test--->firefox:ip:8080
本文出自 “12478125” 博客,请务必保留此出处http://12488125.blog.51cto.com/12478125/1983422
以上是关于tomcat8.5安装配置的主要内容,如果未能解决你的问题,请参考以下文章