Programming/version control

rocky9 tomcat 설치

사리생성 2023. 12. 26. 09:05

java 설치 1.8 

[root@localhost yum.repos.d]# yum list java*jdk-devel
java-1.8.0-openjdk-devel.x86_64 
java-11-openjdk-devel.x86_64
java-17-openjdk-devel.x86_64
java-21-openjdk-devel.x86_64

 

 

[root@localhost tank]# yum install java-1.8.0-openjdk-devel.x86_64
마지막 메타자료 만료확인(0:34:55 이전): 2023년 12월 30일 (토) 오후 12시 26분 36초.
종속성이 해결되었습니다.
============================================================================================================================================================
 꾸러미                                          구조                       버전                                        저장소                         크기
============================================================================================================================================================
설치 중:
 java-1.8.0-openjdk-devel                        x86_64                     1:1.8.0.392.b08-3.el9                       appstream                     9.3 M
종속 꾸러미 설치 중:
 copy-jdk-configs                                noarch                     4.0-3.el9                                   appstream                      27 k
 ibus-gtk2                                       x86_64                     1.5.25-2.el9.rocky.0.1                      appstream                      24 k
 java-1.8.0-openjdk                              x86_64                     1:1.8.0.392.b08-3.el9                       appstream                     455 k
 java-1.8.0-openjdk-headless                     x86_64                     1:1.8.0.392.b08-3.el9                       appstream                      33 M
 javapackages-filesystem                         noarch                     6.0.0-4.el9                                 appstream                      11 k
 lksctp-tools                                    x86_64                     1.0.19-2.el9                                baseos                         90 k
 lua                                             x86_64                     5.4.4-4.el9                                 appstream                     187 k
 lua-posix                                       x86_64                     35.0-8.el9                                  appstream                     131 k
 mkfontscale                                     x86_64                     1.2.1-3.el9                                 appstream                      31 k
 ttmkfdir                                        x86_64                     3.0.9-65.el9                                appstream                      52 k
 tzdata-java                                     noarch                     2023c-1.el9                                 appstream                     149 k
 xorg-x11-fonts-Type1                            noarch                     7.5-33.el9                                  appstream                     499 k
취약한 종속 꾸러미 설치 중:
 adwaita-gtk2-theme                              x86_64                     3.28-14.el9                                 appstream                     136 k
 gtk2                                            x86_64                     2.24.33-8.el9                               appstream                     3.5 M
 libcanberra-gtk2                                x86_64                     0.30-27.el9                                 appstream                      25 k

연결 요약
============================================================================================================================================================
설치  16 꾸러미

전체 내려받기 크기: 48 M
설치된 크기 : 178 M
진행할까요? [y/N]: y
꾸러미 내려받기 중:
(1/16): javapackages-filesystem-6.0.0-4.el9.noarch.rpm                                                                       40 kB/s |  11 kB     00:00
(2/16): lksctp-tools-1.0.19-2.el9.x86_64.rpm                                                                                295 kB/s |  90 kB     00:00
(3/16): copy-jdk-configs-4.0-3.el9.noarch.rpm                                                                               676 kB/s |  27 kB     00:00
(4/16): xorg-x11-fonts-Type1-7.5-33.el9.noarch.rpm                                                                          1.4 MB/s | 499 kB     00:00
(5/16): adwaita-gtk2-theme-3.28-14.el9.x86_64.rpm                                                                           4.5 MB/s | 136 kB     00:00
(6/16): lua-5.4.4-4.el9.x86_64.rpm                                                                                          4.1 MB/s | 187 kB     00:00
(7/16): lua-posix-35.0-8.el9.x86_64.rpm                                                                                     5.4 MB/s | 131 kB     00:00
(8/16): tzdata-java-2023c-1.el9.noarch.rpm                                                                                  3.0 MB/s | 149 kB     00:00
(9/16): ttmkfdir-3.0.9-65.el9.x86_64.rpm                                                                                    979 kB/s |  52 kB     00:00
(10/16): mkfontscale-1.2.1-3.el9.x86_64.rpm                                                                                 843 kB/s |  31 kB     00:00
(11/16): libcanberra-gtk2-0.30-27.el9.x86_64.rpm                                                                            1.3 MB/s |  25 kB     00:00
(12/16): gtk2-2.24.33-8.el9.x86_64.rpm                                                                                       32 MB/s | 3.5 MB     00:00
(13/16): java-1.8.0-openjdk-1.8.0.392.b08-3.el9.x86_64.rpm                                                                  1.9 MB/s | 455 kB     00:00
(14/16): ibus-gtk2-1.5.25-2.el9.rocky.0.1.x86_64.rpm                                                                        312 kB/s |  24 kB     00:00
(15/16): java-1.8.0-openjdk-headless-1.8.0.392.b08-3.el9.x86_64.rpm                                                          49 MB/s |  33 MB     00:00
(16/16): java-1.8.0-openjdk-devel-1.8.0.392.b08-3.el9.x86_64.rpm                                                             12 MB/s | 9.3 MB     00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------
합계                                                                                                                         20 MB/s |  48 MB     00:02
연결 확인 실행 중
연결 확인에 성공했습니다.
연결 시험 실행 중
연결 시험에 성공했습니다.
연결 실행 중
  구현 중     : copy-jdk-configs-4.0-3.el9.noarch                                                                                                       1/1
  구현 중     : java-1.8.0-openjdk-headless-1:1.8.0.392.b08-3.el9.x86_64                                                                                1/1
  준비 중     :                                                                                                                                         1/1
  설치 중     : libcanberra-gtk2-0.30-27.el9.x86_64                                                                                                    1/16
  설치 중     : ibus-gtk2-1.5.25-2.el9.rocky.0.1.x86_64                                                                                                2/16
  설치 중     : gtk2-2.24.33-8.el9.x86_64                                                                                                              3/16
  설치 중     : adwaita-gtk2-theme-3.28-14.el9.x86_64                                                                                                  4/16
  설치 중     : mkfontscale-1.2.1-3.el9.x86_64                                                                                                         5/16
  설치 중     : ttmkfdir-3.0.9-65.el9.x86_64                                                                                                           6/16
  설치 중     : xorg-x11-fonts-Type1-7.5-33.el9.noarch                                                                                                 7/16
  구현 중     : xorg-x11-fonts-Type1-7.5-33.el9.noarch                                                                                                 7/16
  설치 중     : tzdata-java-2023c-1.el9.noarch                                                                                                         8/16
  설치 중     : lua-posix-35.0-8.el9.x86_64                                                                                                            9/16
  설치 중     : lua-5.4.4-4.el9.x86_64                                                                                                                10/16
  설치 중     : copy-jdk-configs-4.0-3.el9.noarch                                                                                                     11/16
  설치 중     : javapackages-filesystem-6.0.0-4.el9.noarch                                                                                            12/16
  설치 중     : lksctp-tools-1.0.19-2.el9.x86_64                                                                                                      13/16
  설치 중     : java-1.8.0-openjdk-headless-1:1.8.0.392.b08-3.el9.x86_64                                                                              14/16
  구현 중     : java-1.8.0-openjdk-headless-1:1.8.0.392.b08-3.el9.x86_64                                                                              14/16
  설치 중     : java-1.8.0-openjdk-1:1.8.0.392.b08-3.el9.x86_64                                                                                       15/16
  구현 중     : java-1.8.0-openjdk-1:1.8.0.392.b08-3.el9.x86_64                                                                                       15/16
  설치 중     : java-1.8.0-openjdk-devel-1:1.8.0.392.b08-3.el9.x86_64                                                                                 16/16
  구현 중     : java-1.8.0-openjdk-devel-1:1.8.0.392.b08-3.el9.x86_64                                                                                 16/16
  구현 중     : copy-jdk-configs-4.0-3.el9.noarch                                                                                                     16/16
  구현 중     : java-1.8.0-openjdk-headless-1:1.8.0.392.b08-3.el9.x86_64                                                                              16/16
  구현 중     : java-1.8.0-openjdk-1:1.8.0.392.b08-3.el9.x86_64                                                                                       16/16
  구현 중     : java-1.8.0-openjdk-devel-1:1.8.0.392.b08-3.el9.x86_64                                                                                 16/16
  확인 중     : lksctp-tools-1.0.19-2.el9.x86_64                                                                                                       1/16
  확인 중     : javapackages-filesystem-6.0.0-4.el9.noarch                                                                                             2/16
  확인 중     : xorg-x11-fonts-Type1-7.5-33.el9.noarch                                                                                                 3/16
  확인 중     : copy-jdk-configs-4.0-3.el9.noarch                                                                                                      4/16
  확인 중     : adwaita-gtk2-theme-3.28-14.el9.x86_64                                                                                                  5/16
  확인 중     : lua-5.4.4-4.el9.x86_64                                                                                                                 6/16
  확인 중     : lua-posix-35.0-8.el9.x86_64                                                                                                            7/16
  확인 중     : tzdata-java-2023c-1.el9.noarch                                                                                                         8/16
  확인 중     : ttmkfdir-3.0.9-65.el9.x86_64                                                                                                           9/16
  확인 중     : gtk2-2.24.33-8.el9.x86_64                                                                                                             10/16
  확인 중     : mkfontscale-1.2.1-3.el9.x86_64                                                                                                        11/16
  확인 중     : libcanberra-gtk2-0.30-27.el9.x86_64                                                                                                   12/16
  확인 중     : java-1.8.0-openjdk-headless-1:1.8.0.392.b08-3.el9.x86_64                                                                              13/16
  확인 중     : java-1.8.0-openjdk-devel-1:1.8.0.392.b08-3.el9.x86_64                                                                                 14/16
  확인 중     : java-1.8.0-openjdk-1:1.8.0.392.b08-3.el9.x86_64                                                                                       15/16
  확인 중     : ibus-gtk2-1.5.25-2.el9.rocky.0.1.x86_64                                                                                               16/16

설치되었습니다:
  adwaita-gtk2-theme-3.28-14.el9.x86_64                                          copy-jdk-configs-4.0-3.el9.noarch
  gtk2-2.24.33-8.el9.x86_64                                                      ibus-gtk2-1.5.25-2.el9.rocky.0.1.x86_64
  java-1.8.0-openjdk-1:1.8.0.392.b08-3.el9.x86_64                                java-1.8.0-openjdk-devel-1:1.8.0.392.b08-3.el9.x86_64
  java-1.8.0-openjdk-headless-1:1.8.0.392.b08-3.el9.x86_64                       javapackages-filesystem-6.0.0-4.el9.noarch
  libcanberra-gtk2-0.30-27.el9.x86_64                                            lksctp-tools-1.0.19-2.el9.x86_64
  lua-5.4.4-4.el9.x86_64                                                         lua-posix-35.0-8.el9.x86_64
  mkfontscale-1.2.1-3.el9.x86_64                                                 ttmkfdir-3.0.9-65.el9.x86_64
  tzdata-java-2023c-1.el9.noarch                                                 xorg-x11-fonts-Type1-7.5-33.el9.noarch

완료되었습니다!
[root@localhost tank]#

 

확인

[root@localhost tank]# java -version
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (build 1.8.0_392-b08)
OpenJDK 64-Bit Server VM (build 25.392-b08, mixed mode)
[root@localhost tank]#

 

 

 

tomcat 9.0.84 설치 

톰켓 
https://tomcat.apache.org/download-90.cgi

톰켓 소스 다운로드 

cd /home

[root@localhost home]# wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.84/bin/apache-tomcat-9.0.84.tar.gz
--2023-12-30 13:32:44--  https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.84/bin/apache-tomcat-9.0.84.tar.gz
Resolving dlcdn.apache.org (dlcdn.apache.org)... 151.101.2.132, 2a04:4e42::644
Connecting to dlcdn.apache.org (dlcdn.apache.org)|151.101.2.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11804410 (11M) [application/x-gzip]
Saving to: `apache-tomcat-9.0.84.tar.gz'

apache-tomcat-9.0.84.tar.gz            100%[============================================================================>]  11.26M  68.6MB/s    in 0.2s

2023-12-30 13:32:44 (68.6 MB/s) - `apache-tomcat-9.0.84.tar.gz' saved [11804410/11804410]

[root@localhost home]# ls
apache-tomcat-9.0.84.tar.gz
[root@localhost home]# tar xvzf apache-tomcat-9.0.84.tar.gz
[root@localhost home]# mv apache-tomcat-9.0.84 tomcat
[root@localhost home]# rm apache-tomcat-9.0.84.tar.gz
[root@localhost home]# ls
tomcat

 


유저 생성 및 권한 설정.
[root@localhost home]# groupadd tomcat
[root@localhost home]# useradd -s /sbin/nologin -g tomcat -d /home/tomcat tomcat

[root@localhost home]# cat /etc/passwd
... ...
tomcat:x:1001:1001::/home/tomcat:/sbin/nologin
[root@localhost home]# 

[root@localhost home]# chown -R tomcat.tomcat tomcat
[root@localhost home]#

 

-----

systemctl

-----

 

 

 

 

파이어월 포트 오픈.

[root@localhost /]# firewall-cmd --zone=public --permanent --add-port=8080/tcp
success
[root@localhost /]# firewall-cmd --reload
success
[root@localhost /]# firewall-cmd --list-all | grep ports
  ports: 8080/tcp
  forward-ports:
  source-ports:
[root@localhost /]#