1
0

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.

RaspberryPi に Tomcat をインストール

Last updated at Posted at 2020-06-25

RaspberryPi に Tomcat をインストールする方法です。

sudo apt install tomcat9

インストールが完了すると既に、Tomcat が動いています。

$ sudo systemctl status tomcat9
● tomcat9.service - Apache Tomcat 9 Web Application Server
   Loaded: loaded (/lib/systemd/system/tomcat9.service; enabled; vendor preset: 
   Active: active (running) since Thu 2020-06-25 18:32:44 JST; 3min 30s ago
     Docs: https://tomcat.apache.org/tomcat-9.0-doc/index.html
 Main PID: 2799 (java)
    Tasks: 35 (limit: 4915)
   Memory: 78.7M
   CGroup: /system.slice/tomcat9.service
           └─2799 /usr/lib/jvm/default-java/bin/java -Djava.util.logging.config.

ブラウザーから 8080 ポートにアクセスします。
tomcat_jun25.png

/var/lib/tomcat9/webapps/ROOT/index.html を編集すれば、表示が変わります。

バージョンの確認方法

$ /usr/share/tomcat9/bin/version.sh
Using CATALINA_BASE:   /usr/share/tomcat9
Using CATALINA_HOME:   /usr/share/tomcat9
Using CATALINA_TMPDIR: /usr/share/tomcat9/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/share/tomcat9/bin/bootstrap.jar:/usr/share/tomcat9/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Server version: Apache Tomcat/9.0.31 (Debian)
Server built:   Apr 25 2020 12:24:56 UTC
Server number:  9.0.31.0
OS Name:        Linux
OS Version:     4.19.118-v7l+
Architecture:   arm
JVM Version:    11.0.7+10-post-Raspbian-3deb10u1
JVM Vendor:     Raspbian
1
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?