首先通过Xftp6将tomcat压缩包传输到服务器上的/root目录下

通过Xshell工具使用shell命令即间接使用linux来解压


通过浏览器访问

如果时在我们的虚拟机上则需要开启虚拟机8080端口
vi /etc/sysconfig/iptables

重启防火墙
service iptables restart
![]()

或则如果你不是在虚拟机上而是阿里云服务器的话





之后再次访问

Tomcat配置服务和自启动(可选,可以不设置)


如果在chkconfig --add tomcat
出现
insserv: warning: script 'tomcat' missing LSB tags and overrides
insserv: There is a loop between service nginx and tomcat if stopped
insserv: loop involving service tomcat at depth 2
insserv: loop involving service nginx at depth 1
insserv: Stopping tomcat depends on nginx and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
则需要安装chkconfig安装方法
输入命令:
apt-get install chkconfig

如果上图中 345为关。则执行如下命令设置tomcat为开机自启动
chkconfig tomcat on
tomcat的启动,停止,重启
service tomcat start
service tomcat stop
service tomcat restart
CentOS系统安装与配置Tomcat指南

本文详细介绍了如何在Linux CentOS系统中安装Tomcat。首先通过Xftp6将Tomcat压缩包传至服务器的/root目录,然后使用Xshell进行解压。接着,若在虚拟机环境下,需打开8080端口,并编辑iptables配置,重启防火墙。对于阿里云服务器,也需要相应操作。此外,还提到如果遇到Tomcat自启动配置问题,包括insserv警告和循环依赖,可以安装chkconfig并调整自启动设置。
479

被折叠的 条评论
为什么被折叠?



