Tomcat

Tomcat 下面内容基于 Tomcat9 服务器配置 conf/server.xml 文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 <?xml version="1.0" encoding="UTF-8"?> <Server port="8095" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> <!-- Security listener. Documentation at /docs/config/listeners.html <Listener className="org.apache.catalina.security.SecurityListener" /> --> <!-- APR connector and OpenSSL support using Tomcat Native --> <Listener className="org.apache.catalina.core.AprLifecycleListener" /> <!-- OpenSSL support using FFM API from Java 22 --> <!-- <Listener className="org.apache.catalina.core.OpenSSLLifecycleListener" /> --> <!-- Prevent memory leaks due to use of particular java/javax APIs--> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html --> <GlobalNamingResources> <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users --> <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" /> </GlobalNamingResources> <!-- A "Service" is a collection of one or more "Connectors" that share a single "Container" Note: A "Service" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/service.html --> <Service name="Catalina"> <!--The connectors can use a shared executor, you can define one or more named thread pools--> <!-- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4"/> --> <!-- 启动端口 --> <Connector port="8094" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxParameterCount="1000" /> <Engine name="Catalina" defaultHost="localhost"> <Realm className="org.apache.catalina.realm.LockOutRealm"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> </Realm> <!-- autoDeploy="false" 关闭热部署 --> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" /> </Host> </Engine> </Service> </Server> 服务器调优 setenv.sh setenv.sh 放在 Tomcat/bin/ 目录下,启动 catalina.sh 会自动加载,用于配置 JVM 参数、环境变量、端口、编码等。 ...

2026-06-30 · 2 分钟 · lei

SFTP用户配置

SFTP用户配置 简介 SFTP(SSH File Transfer Protocol,安全文件传输协议)是一种基于 SSH(Secure Shell)协议的安全文件传输协议,主要用于在客户端与服务器之间提供加密的文件传输服务。它并非传统 FTP 协议的简单加密扩展,而是 SSH 软件包中的一个独立子系统。 ...

2026-06-29 · 2 分钟 · lei

SSH隧道

SSH隧道 介绍 SSH 隧道(SSH Tunneling),也常被称为 SSH 端口转发,是一种利用 SSH 协议创建安全加密通道的技术。它能够将其他 TCP 端口的网络数据通过 SSH 连接进行转发,从而为原本不安全的网络通信提供加密保护,并能有效绕过防火墙的限制。 ...

2026-03-23 · 4 分钟 · lei

常用脚本和配置

包含笔记自动更新部署脚本(如 autorun.sh 等)、Python 和 Java 程序启动脚本,以及开机自启配置和 Windows 启动脚本,用于自动化部署与运行管理。

2025-04-26 · 7 分钟 · lei

Python离线部署

介绍 Python 项目两种离线部署方式:基于 Docker 构建镜像(含依赖)并导出导入,以及通过虚拟环境和离线包安装依赖,适用于无网络环境。

2025-04-25 · 3 分钟 · lei

WSL子系统

WSL子系统 常用命令 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl -l -v # 列出所有已安装的 Linux 发行版 wsl # 启动默认的 Linux 发行版 wsl -d <DistributionName> # 启动指定的 Linux 发行版 wsl --set-default <DistributionName> # 设置默认的 Linux 发行版 wsl --set-default-version 2 # 设置默认的 WSL 版本 wsl --update <DistributionName> # 更新 Linux 发行版到 WSL 2 wsl --unregister <DistributionName> # 卸载 Linux 发行版 wsl --update-kernel # 更新 WSL 2 内核 wsl --export Ubuntu-24.04 D:\wsl\ubuntu24.tar # 导出备份 wsl --import Ubuntu-24.04 D:\wsl\Ubuntu-24.04 D:\wsl\ubuntu24.tar # 导入备份 wsl --shutdown # 关闭所有 WSL 实例 wsl --shutdown <DistributionName> # 关闭特定的 WSL 发行版 # 手动安装 # 1.下载 https://learn.microsoft.com/zh-cn/windows/wsl/install-manual # 2. Add-AppxPackage .\Ubuntu.appx 使用 wsl --import 导入 tar 镜像后,永久默认登录用户是 root! ...

2025-03-23 · 2 分钟 · lei

模型简易部署

模型简易部署 vllm部署模型 vllm可以兼容部署基于 Transformer 架构的模型 环境准备 本地配置:Ubuntu24.04、Python12、RTX3070 安装相关软件包 1 2 3 apt install python3.12-venv apt install git apt install nvidia-cuda-toolkit 新建python虚拟环境 ...

2025-03-23 · 5 分钟 · lei

工作杂项记录

oracle锁表、oracle导入导出、weblogic打补丁、Linux扩容swap分区、修改系统时间

2024-09-03 · 3 分钟 · lei

IDEA连接Docker开发

IDEA连接Docker开发 安装 Docker:步骤略 配置 Docker 1 2 3 4 5 6 7 8 9 10 11 # 修改docker服务文件 vim /usr/lib/systemd/system/docker.service # ExecStar后面追加 -H tcp://0.0.0.0:2375 ExecStart=/usr/sbin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock $DOCKER_OPTS -H tcp://0.0.0.0:2375 # 重新加载配置 systemctl daemon-reload # 重启docker服务 systemctl restart docker.service Idea 安装 docker 插件 ...

2024-04-07 · 1 分钟 · lei

frps内网穿透

frps内网穿透 什么是FRP Frp (Fast Reverse Proxy) 是比较流行的一款。FRP 是一个免费开源的用于内网穿透的反向代理应用,它支持 TCP、UDP 协议, 也为 http 和 https 协议提供了额外的支持。你可以粗略理解它是一个中转站, 帮你实现 公网 ←→ FRP(服务器) ←→ 内网 的连接,让内网里的设备也可以被公网访问到 ...

2023-07-15 · 2 分钟 · lei