Created
October 11, 2017 05:28
-
-
Save fk2000/98b39f37ac921de57ba417ad1fb8ea57 to your computer and use it in GitHub Desktop.
CentOS7にTomcat9をインストールする ref: http://qiita.com/fk_2000/items/ff7b4768260459553fa1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ JRE_HOME=/usr/java/default | |
+ CATALINA_HOME=/opt/tomcat/apache-tomcat-9.0.1 | |
+ export JRE_HOME CATALINA_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /etc/system-release | |
CentOS Linux release 7.4.1708 (Core) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# java --version | |
java 9 | |
Java(TM) SE Runtime Environment (build 9+181) | |
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tar -xvzf apache-tomcat-9.0.1.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo mv apache-tomcat-9.0.1 /opt/tomcat/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vi .bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ source .bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /opt/tomcat/apache-tomcat-8.5.8/bin/startup.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vi .bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ source .bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# java --version | |
java 9 | |
Java(TM) SE Runtime Environment (build 9+181) | |
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# useradd -s /sbin/nologin tomcat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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