首页 > 系统相关 >Tomcat的安装运行(Linux环境)

Tomcat的安装运行(Linux环境)

时间:2022-12-07 12:03:19浏览次数:35  
标签:10 Tomcat tomcat 10.0 Linux apache 安装

Tomcat的安装运行(Linux环境)

测试环境:

操作系统: CentOS 7.6 x64

Tomcat版本: apache-tomcat-10.0.10

一、Tomcat下载

apache-tomcat-10.0.10下载地址: https://archive.apache.org/dist/tomcat/tomcat-10/v10.0.10/bin/

二、Tomcat运行

下载tomcat到Linux主机指定路径下,然后解压文件包:tar -zxf apache-tomcat-10.0.10-linux_x64.tar.gz

进入 apache-tomcat-10.0.10 目录下,运行tomcat: bin/startup.sh

三、访问tomcat

tomcat配置文档中,默认监听端口为8080。浏览器地址栏访问:http://localhost:8080

四、自定义文件

apache-tomcat-10.0.10/webapps/examples 目录下创建文件:test.html

test.html内容:

<!DOCTYPE html>
<html>
        <head>
                <meta charset="utf-8" />
                <title>Tomcat 10.0.10</title>
        </head>
        <body>
                <h1> Load Balance Example </h1>
                <p> There is host A that ip address is 192.168.1.66 </p>
        </body>
</html>

浏览器地址栏访问:http://localhost:8080/examples/test.html

标签:10,Tomcat,tomcat,10.0,Linux,apache,安装
From: https://www.cnblogs.com/caojun97/p/16962301.html

相关文章