首先通过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