tomcat的安装部署
Posted 不忘初心--学
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat的安装部署相关的知识,希望对你有一定的参考价值。
第一步:
先把压缩包拖到知道的目录,解压
tar xf apache-tomcat-8.0.27.tar.gz -C /usr/local/
ln -s /usr/local/apache-tomcat-8.0.27 /usr/local/tomcat
第二步:
cd tomcat/conf
编写它的配置文件
vim server.xml
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
URIEncoding="UTF-8" />
修改成我们要的端口号
vim logging.properties (配置日志级别)
1catalina.org.apache.juli.FileHandler.level
= WARNING
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.
2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.FileHandler.prefix = localhost.
3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.FileHandler.prefix = manager.
4host-manager.org.apache.juli.FileHandler.level = FINE
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
java.util.logging.ConsoleHandler.level = WARNING
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
第三步:在tomcat中配置jdk的位置
vim /usr/local/tomcat/bin/catalina.sh
# OS specific
support. $var _must_ be set to either
true or false.
export JAVA_HOME=/data/jdk
cygwin=false
darwin=false
os400=false
case "`uname`" in
CYGWIN*) cygwin=true;;
Darwin*) darwin=true;;
OS400*) os400=true;;
esac
第四步:
授权,统一权限
chown -R root.root /application/jdk/ /application/tomcat/
第五步:测试安装成功了没有
/usr/local/tomcat/bin/version.sh
以上是关于tomcat的安装部署的主要内容,如果未能解决你的问题,请参考以下文章