Java 버전 확인
java -version
java --version
Tomcat 10 설치
방법 1
brew install tomcat

환경 세팅
# 터미널에서 파일 열기
nano ~/.zshrc
~/.bash_profile
.zshrc에 환경변수 추가
export CATALINA_HOME=/opt/homebrew/opt/tomcat/libexec
변경사항 적용
source ~/.zshrc
# 또는
~/.bash_profile
설정 확인
echo $CATALINA_HOME

Tomcat 시작
brew services start tomcat

Tomcat 멈추기
brew services stop tomcat

Tomcat 서비스 확인

admin 권한 받기
ls -la /opt/homebrew/etc/tomcat/tomcat-users.xml
nano /opt/homebrew/etc/tomcat/tomcat-users.xml
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<!--admin 권한 부여하기-->
<role rolename="manager-gui"/>
<user username="admin" password="1234" roles="manager-gui"/>
</tomcat-users>
Manager App 버튼 클릭


방법 2
https://tomcat.apache.org/download-10.cgi

Tomcat 경로로 들어가기
cd [tomcat 다운로드 파일 경로]/bin

Tomcat 시작 및 종료
시작
./startup.sh
종료
./shutdown.sh

'운영체제 > MacOS' 카테고리의 다른 글
| [맥북 M2] Mysql Workbench 설치하기 (0) | 2025.03.10 |
|---|---|
| [맥북 M2] Homebrew로 Mysql 설치하는 방법 (0) | 2025.03.10 |