Linux tomcat部署安装

Linux tomcat部署安装,第1张

Linux tomcat部署安装

下载tomcat:

官方地址:https://tomcat.apache.org/download-80.cgi

安装tomcat前需要安装JDK:Linux 安装JDK_weixin_57095087的博客-CSDN博客

解压tomcat:

[root@localhost ~]# tar xvf apache-tomcat-8.5.63.tar.gz -C /usr/local/

修改tomcat目录:

[root@localhost local]# mv apache-tomcat-8.5.63/ tomcat

配置环境变量:

[root@localhost ~]# vi /etc/profile
CATALINA_HOME=/usr/local/tomcat
export PATH=$PATH:$M2_HOME/bin:$JAVA_HOME/bin:$CATALINA_HOME/bin

启动tomcat:

[root@localhost bin]# cd /usr/local/tomcat/bin
[root@localhost bin]# ./startup.sh 
Using CATALINA_base:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /opt/zulu8.33.0.1-jdk8.0.192-linux_x64
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.

检查进程端口

[root@localhost bin]# ps -ef |grep java
root      22668      1  0 18:37 pts/0    00:00:02 /opt/zulu8.33.0.1-jdk8.0.192-linux_x64/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root      22754   7535  0 18:43 pts/0    00:00:00 grep --color=auto java

检查服务端口:

[root@localhost bin]# netstat -antp|grep 8080
tcp6       0      0 :::8080                 :::*                    LISTEN      22668/java

停止tomcat:

[root@localhost bin]# ./shutdown.sh

启动tomcat:

[root@localhost bin]# ./startup.sh

强制杀死:

[root@localhost bin]# kill -9 $pid

至此,tomcat就安装成功了

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5609576.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存