阿里云 Linux Centos7下安装Tomcat8

阿里云 Linux Centos7下安装Tomcat8

 

在官网下载对应的Linux版本的tomcat

https://tomcat.apache.org/download-80.cgi

阿里云 Linux Centos7下安装Tomcat8

 

将apache-tomcat-8.0.53.tar.gz文件使用文件上传工具,上传到/usr/local中执行以下操作:

解压缩

阿里云 Linux Centos7下安装Tomcat8

然后使用这一个命令可以更改tomcat的端口,当然如果不需要是不需要更改的,在这里不做更改

阿里云 Linux Centos7下安装Tomcat8

进去后按 i 进入编辑界面  移动光标

阿里云 Linux Centos7下安装Tomcat8

 

 然后按Esc退出,shift+:  输入wq 保存并退出

启动tomcat

阿里云 Linux Centos7下安装Tomcat8

有的防火墙需要进行端口的放开操作

阿里云 Linux Centos7下安装Tomcat8

阿里云 Linux Centos7下安装Tomcat8

 

关闭tomcat

 

 阿里云 Linux Centos7下安装Tomcat8

 

我再阿里云上部署完tomcat后,在外边使用IP地址进行访问的时候,这个时候页面还是无法访问

最后发现是,在阿里云上需要进行一个端口的放开操作,阿里云默认是不开放8080端口的

找到对应的实例中的 安全组

 

阿里云 Linux Centos7下安装Tomcat8

 

 阿里云 Linux Centos7下安装Tomcat8

默认是只有图中三个,需要进行添加安全组

阿里云 Linux Centos7下安装Tomcat8

 

端口范围设置成8080/8080,优先级设置成1  授权对象设置成0.0.0.0/0

阿里云 Linux Centos7下安装Tomcat8

 

 这个时候无需重新启动,就可以使用IP地址对刚才部署的tomcat进行访问了

 

posted @ 2018-11-16 21:57 子非鱼Leo 阅读(...) 评论(...) 编辑 收藏