Skip to content

Commit 567b0c8

Browse files
committed
docs(notes): add Tomcat installation guide for macOS
1 parent 6f4307f commit 567b0c8

File tree

3 files changed

+128
-2
lines changed

3 files changed

+128
-2
lines changed

_posts/en/2025-01-11-notes-en.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ generated: false
77
translated: false
88
---
99

10-
These 2136 notes are primarily generated by AI chatbots. I used them to summarize key points and will walk through them to enhance my understanding.
10+
These 2137 notes are primarily generated by AI chatbots. I used them to summarize key points and will walk through them to enhance my understanding.
1111

1212
* [Core Essentials of LLM Applications](/notes/2025-09-05-core-llm-essentials-en)
13+
* [Installing Apache Tomcat on macOS](/notes/2025-09-05-installing-tomcat-macos-en)
1314
* [Spring Web Application Setup Without Boot](/notes/2025-09-05-spring-webapp-setup-en)
1415
* [Tomcat and Jetty Comparison](/notes/2025-09-05-tomcat-jetty-comparison-en)
1516
* [Web Application Deployment Options Explained](/notes/2025-09-05-web-app-deployment-options-en)
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: Installing Apache Tomcat on macOS
3+
lang: en
4+
layout: post
5+
audio: false
6+
translated: false
7+
generated: true
8+
image: false
9+
---
10+
11+
Here’s a step-by-step guide for installing and running **Apache Tomcat on macOS**:
12+
13+
---
14+
15+
### 1. Check Java
16+
17+
Tomcat requires Java. Verify you have it installed:
18+
19+
```bash
20+
java -version
21+
```
22+
23+
If you don’t see a Java version (e.g., `1.8` or `11` or higher), install one. On macOS the easiest way is via [Homebrew](https://brew.sh):
24+
25+
```bash
26+
brew install openjdk@11
27+
```
28+
29+
Then link it:
30+
31+
```bash
32+
brew link --force --overwrite openjdk@11
33+
```
34+
35+
---
36+
37+
### 2. Install Tomcat (Option A: Homebrew – easiest)
38+
39+
With Homebrew you can quickly install Tomcat:
40+
41+
```bash
42+
brew install tomcat
43+
```
44+
45+
This typically installs the latest version (e.g., Tomcat 10).
46+
47+
You’ll find it under:
48+
49+
```
50+
/usr/local/Cellar/tomcat/<version>/libexec
51+
```
52+
53+
Or if using Apple Silicon:
54+
55+
```
56+
/opt/homebrew/Cellar/tomcat/<version>/libexec
57+
```
58+
59+
Run it with:
60+
61+
```bash
62+
catalina run
63+
```
64+
65+
---
66+
67+
### 3. Install Tomcat (Option B: Manual Download – official way)
68+
69+
1. Go to the [Apache Tomcat website](https://tomcat.apache.org/download-10.cgi) and download the latest stable release (choose the `.tar.gz`).
70+
71+
2. Extract it to a directory, for example:
72+
73+
```bash
74+
tar xvf apache-tomcat-10.*.tar.gz
75+
mv apache-tomcat-10.* ~/tomcat
76+
```
77+
78+
3. Start Tomcat:
79+
80+
```bash
81+
cd ~/tomcat/bin
82+
./startup.sh
83+
```
84+
85+
4. To stop it:
86+
87+
```bash
88+
./shutdown.sh
89+
```
90+
91+
---
92+
93+
### 4. Verify Installation
94+
95+
Open your browser and go to:
96+
97+
```
98+
http://localhost:8080
99+
```
100+
101+
You should see the Tomcat welcome page.
102+
103+
---
104+
105+
### 5. (Optional) Add to PATH
106+
107+
So you can run `startup.sh` from anywhere, add this to your `~/.zshrc` or `~/.bashrc`:
108+
109+
```bash
110+
export CATALINA_HOME=~/tomcat
111+
export PATH=$CATALINA_HOME/bin:$PATH
112+
```
113+
114+
Reload:
115+
116+
```bash
117+
source ~/.zshrc
118+
```
119+
120+
---
121+
122+
👉 That’s it. Now you have Tomcat running locally on macOS.
123+
124+
Do you want me to also show you **how to deploy a WAR file to Tomcat on macOS** after setup?

original/2025-01-11-notes-en.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ generated: false
77
translated: false
88
---
99

10-
These 2136 notes are primarily generated by AI chatbots. I used them to summarize key points and will walk through them to enhance my understanding.
10+
These 2137 notes are primarily generated by AI chatbots. I used them to summarize key points and will walk through them to enhance my understanding.
1111

1212
* [Core Essentials of LLM Applications](/notes/2025-09-05-core-llm-essentials-en)
13+
* [Installing Apache Tomcat on macOS](/notes/2025-09-05-installing-tomcat-macos-en)
1314
* [Spring Web Application Setup Without Boot](/notes/2025-09-05-spring-webapp-setup-en)
1415
* [Tomcat and Jetty Comparison](/notes/2025-09-05-tomcat-jetty-comparison-en)
1516
* [Web Application Deployment Options Explained](/notes/2025-09-05-web-app-deployment-options-en)

0 commit comments

Comments
 (0)