タイトル: CentOSにおけるポート開放方法
SEOタイトル: CentOSにおけるTomcatのポート開放方法
前提
・CentOSバージョン: 7
tomcat.xmlの作成
以下のコマンドを実行する。
|
vi /usr/lib/firewalld/services/tomcat.xml |
tomcat.xmlに以下の記述をする。
|
<?xml version="1.0" encoding="utf-8"?> |
ポートの解放
以下のコマンドを実行する。
|
firewall-cmd --zone=public --permanent --add-service=tomcat |
以下のコマンドを実行して設定を反映させる。
|
systemctl restart firewalld.service |