1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

aptでTomcat をインストール

Last updated at Posted at 2021-09-13

##update

sudo apt update

##Tomcatのインストール

sudo apt install tomcat9 tomcat9-admin

##Tomcatを自動起動するように設定。

sudo systemctl enable tomcat9

##ファイアウォールポートを開く

sudo ufw allow from any to any port 8080 proto tcp

##Tomcat起動確認
ブラウザで下記アクセス
自身のipアドレス:8080

##tomcat「tomcat-users.xml」を開く

sudo vi /etc/tomcat9/tomcat-users.xml 

##「tomcat-users.xml」に追加記述

<role rolename="admin-gui" />
<role rolename="manager-gui" />
<user username="tomcat" password="pass" roles="admin-gui,manager-gui" />

元ネタブログの記述が「<role username=・・・」となっているが、
正しくは「<user username=・・・」。
記述を間違うとログインできない。
https://postgresweb.com/ubuntu-20-04-install-tomcat

##Tomcat再起動

sudo systemctl restart tomcat9

##Tomcat Webアプリケーションマネージャを開く
自身のipアドレス:8080/manager/html

##webapp場所

/var/lib/Tomcat8/webapps

##アプリケーションの起動確認

http://<Tomcatが動いているマシンのIP>:8080/<アプリケーション名>

例)http://192.168.●●.●●:8080/●●●-●.●.●-SNAPSHOT

参考
https://postgresweb.com/ubuntu-20-04-install-tomcat

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?