在Centos7上搭建tomcat

实验环境:Centos7一台
操作步骤
在Centos7上搭建tomcat
把解压好的jdk java编译环境放到系统能识别的目录环境里

在Centos7上搭建tomcat
编写一个脚本

在Centos7上搭建tomcat
脚本内容

在Centos7上搭建tomcat
启动脚本并查看版本

在Centos7上搭建tomcat
写一段内容查看脚本是否能运行

在Centos7上搭建tomcat

在Centos7上搭建tomcat
生成以.class为结尾的文件

在Centos7上搭建tomcat
输出脚本

在Centos7上搭建tomcat
把解压好的tomcat放到/usr/local/下生成一个tomcat8之后对立面的文件进行编辑

在Centos7上搭建tomcat
进入bin目录下启动tomcat,这里我们看到tomcat的端口是8080端口

在Centos7上搭建tomcat
访问我的IP地址就可以看到tomcat的首页

在Centos7上搭建tomcat
在Centos7上搭建tomcat
同样的我们可以自己搭建一个网站作为tomcat的首页

在Centos7上搭建tomcat
进入conf目录下修改配置文件

在Centos7上搭建tomcat
指定首页路径

在Centos7上搭建tomcat
重启服务

在Centos7上搭建tomcat

猜你喜欢

转载自blog.51cto.com/13840048/2158880