Skip to content

Instantly share code, notes, and snippets.

@fk2000
Created October 11, 2017 05:28
Show Gist options
  • Save fk2000/98b39f37ac921de57ba417ad1fb8ea57 to your computer and use it in GitHub Desktop.
Save fk2000/98b39f37ac921de57ba417ad1fb8ea57 to your computer and use it in GitHub Desktop.
CentOS7にTomcat9をインストールする ref: http://qiita.com/fk_2000/items/ff7b4768260459553fa1
+ JRE_HOME=/usr/java/default
+ CATALINA_HOME=/opt/tomcat/apache-tomcat-9.0.1
+ export JRE_HOME CATALINA_HOME
$ cat /etc/system-release
CentOS Linux release 7.4.1708 (Core)
# java --version
java 9
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
$ tar -xvzf apache-tomcat-9.0.1.tar.gz
$ sudo mv apache-tomcat-9.0.1 /opt/tomcat/
$ vi .bash_profile
$ source .bash_profile
# /opt/tomcat/apache-tomcat-9.0.1/bin/version.sh
Using CATALINA_BASE: /opt/tomcat/apache-tomcat-9.0.1
Using CATALINA_HOME: /opt/tomcat/apache-tomcat-9.0.1
Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-9.0.1/temp
Using JRE_HOME: /
Using CLASSPATH: /opt/tomcat/apache-tomcat-9.0.1/bin/bootstrap.jar:/opt/tomcat/apache-tomcat-9.0.1/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Server version: Apache Tomcat/9.0.1
Server built: Sep 27 2017 17:31:52 UTC
Server number: 9.0.1.0
OS Name: Linux
OS Version: 3.10.0-693.2.2.el7.x86_64
Architecture: amd64
JVM Version: 9+181
JVM Vendor: Oracle Corporation
# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: dhcpv6-client ssh vnc-server http
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
# firewall-cmd --zone=public --add-port=8080/tcp --permanent
success
# firewall-cmd --reload
success
# firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: dhcpv6-client ssh vnc-server http
ports: 8080/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
# /opt/tomcat/apache-tomcat-8.5.8/bin/startup.sh
# /opt/tomcat/apache-tomcat-9.0.1/bin/version.sh
Using CATALINA_BASE: /opt/tomcat/apache-tomcat-9.0.1
Using CATALINA_HOME: /opt/tomcat/apache-tomcat-9.0.1
Using CATALINA_TMPDIR: /opt/tomcat/apache-tomcat-9.0.1/temp
Using JRE_HOME: /
Using CLASSPATH: /opt/tomcat/apache-tomcat-9.0.1/bin/bootstrap.jar:/opt/tomcat/apache-tomcat-9.0.1/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Server version: Apache Tomcat/9.0.1
Server built: Sep 27 2017 17:31:52 UTC
Server number: 9.0.1.0
OS Name: Linux
OS Version: 3.10.0-693.2.2.el7.x86_64
Architecture: amd64
JVM Version: 9+181
JVM Vendor: Oracle Corporation
# cd /usr/local/src
# wget http://download.oracle.com/otn-pub/java/jdk/9+181/jdk-9_linux-x64_bin.rpm
# rpm -ivh jdk-9_linux-x64_bin.rpm
$ vi .bash_profile
$ source .bash_profile
# java --version
java 9
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
# useradd -s /sbin/nologin tomcat
$ wget http://ftp.riken.jp/net/apache/tomcat/tomcat-9/v9.0.1/bin/apache-tomcat-9.0.1.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment