この内容は古いバージョンです。最新バージョンを表示するには、戻るボタンを押してください。
バージョン:2
ページ更新者:T
更新日時:2026-05-17 06:14:09

タイトル: CentOSにおけるポート開放方法
SEOタイトル: CentOSにおけるTomcatのポート開放方法

前提

・CentOSバージョン: 7

 

tomcat.xmlの作成

以下のコマンドを実行する。

vi /usr/lib/firewalld/services/tomcat.xml

 

tomcat.xmlに以下の記述をする。



Tomcat
Open Tomcat port

 

ポートの解放

以下のコマンドを実行する。

firewall-cmd --zone=public --permanent --add-service=tomcat

 

以下のコマンドを実行して設定を反映させる。

systemctl restart firewalld.service