설치된 Red Hat Enterprise Linux 8.8버전에 Tomcat9 설치하는 과정입니다.

CentOS도 동일하게 설치 가능합니다.

 

1. 설치파일 다운로드

  1) 사전 설치파일 다운로드

     1-1. DOWNLOAD URL : https://tomcat.apache.org/download-90.cgi

 

Apache Tomcat® - Apache Tomcat 9 Software Downloads

Welcome to the Apache Tomcat® 9.x software download page. This page provides download links for obtaining the latest version of Tomcat 9.0.x software, as well as links to the archives of older releases. Unsure which version you need? Specification version

tomcat.apache.org

    1-2. tar.gz 파일 다운로드

 

 2) 인터넷 망일 경우

#인터넷망 tomcat설치파일 다운로드
wget -c https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.56/bin/apache-tomcat-9.0.56.tar.gz

 

2. Tomcat 설치

#tomcat 설치 경로 이동
cd /usr/share/

#tomcat 파일 이동
cp /{path}/apache-tomcat-9.0.56.tar.gz ./

#tomcat 파일 압축해제
tar -zxvf apache-tomcat-9.0.56.tar.gz

#tomcat 디렉토리명 변경(편의에 따라서)
mv apache-tomcat-9.0.56 tomcat9

 

3. tomcat 실행

#경로이동
cd /usr/share/tomcat9/bin/

#실행
./startup.sh &

 

4. tomcat 실행 확인

#tomcat 구동 확인
ps -ef | grep tomcat

#tomcat Log 확인
cd /usr/share/tomcat9/logs/
tail -f catalina.out

 

5. 동작 확인

       URL : http://ip:8080

 

etc. 기타 명령어

#tomcat 종료
./shutdown.sh

#tomcat 실행
./startup.sh

#kill
kill -9 {ps number}

#디렉토리 전체 소유변경
chown -R {user}:{user} {PATH}

#디렉토리 전체 권한변경
chmod -R 777 {PATH}
LIST

설치된 Red Hat Enterprise Linux 8.8버전에 Httpd (Apache HTTP Web Server) 설치하는 과정입니다.

CentOS도 동일하게 설치 가능합니다.

 

1. dnf(yum) reposirory httpd 설치 가능 목록 조회

#yum repository httpd 목록 조회
yum list httpd

 

2. httpd 설치

#yum httpd 설치
yum install -y httpd

 

3. httpd 자동실행 설정

#자동실행 설정
systemctl enable httpd

 

4. httpd 실행 확인

#실행 확인
systemctl status httpd

 

5. 동작 확인

etc. 기타 명령어

#apache 확인
systemctl status httpd

#apache 실행
systemctl start httpd

#apache 중지
systemctl stop httpd

#apache 재시작
systemctl restart httpd

#자동시작 On
systemctl enable httpd

#자동시작 Off
systemctl disable httpd

#yum apache 삭제
yum remove -y httpd
LIST

폐쇄망에 설치된 Red Hat Enterprise Linux 8.8버전에 local dnf(yum) reposirory를 설정하는 과정입니다.

 

 

1. ISO 파일 업로드

Redhat Linux 를 설치한 ISO 파일을 root로 복사 

 

2. ISO 파일 마운트

# 1. iso파일 mount
mount -t iso9660 -o loop /root/rhel-8.8-x86_64-dvd-002.iso /media

 

3. Repository 생성 및 iso 복사

# 2. repos디렉토리 생성
mkdir /repository

# 3. 마운트 된 iso 복사
cp -a /media/* /repository/

 

4.  Repos 작성

# 4. repos 작성
vi /etc/yum.repos.d/RHEL8.repo

# 5. repos 내용 추가
[InstallMedia-BaseOS]
name=RHEL 8 - BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///repository/BaseOS
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[InstallMedia-AppStream]
name=RHEL 8 - AppStream
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///repository/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

 

5.  Repos 캐시 삭제

# 6. repos 캐시삭제
dnf clean all
subscription-manager clean

 

5.  확인 및 사용

# 7. 패키지 확인
dnf grouplist

# 8. 명령어 실행
dnf install make
dnf install gcc
LIST

폐쇄망에 설치된 Red Hat Enterprise Linux 8.8버전에 JAVA JDK 1.8설치하는 과정입니다.

 

1. JDK 다운로드

아래 링크로 이동하여 설치하고자 하는 버전의 JDK다운로드한다. 

 

[Oracle] 

https://www.oracle.com/java/technologies/downloads/archive/

 

Looking for an Older Java Release?

Access the historical java release archive that includes JRE and JDK to help developers debug issues in older systems.

www.oracle.com

[OpenJDK] 

https://github.com/ojdkbuild/ojdkbuild

 

GitHub - ojdkbuild/ojdkbuild: Community builds using source code from OpenJDK project

Community builds using source code from OpenJDK project - GitHub - ojdkbuild/ojdkbuild: Community builds using source code from OpenJDK project

github.com

 

2. 압축 해제

FTP로 다운로드 받은 설치파일을 업로드 후 명령어를 통해 압축을 해제한다.

이 프로젝트에서 java 설치 경로는 /usr/lib/java로 결정했다.

# 1. 설치 경로 생성
cd /usr/lib
mkdir java
cd java

# 2. 압축 해제
# tar -zxvf [설치파일경로]/[설치파일명] [-C 압축해제경로]
tar -zxvf [설치파일경로]/jdk-8u381-linux-x64.tar.gz -C ./

 

3. 환경변수 설정

# 3. 환경변수 설정
vi /etc/profile

# 4. 하단에 내용 추가
JAVA_HOME=/usr/lib/java/jdk1.8.0_381
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME PATH
export JRE_HOME

# 5. 적용
source /etc/profile

 

4. 확인

# 6. 설치 확인
java -version

 

LIST

+ Recent posts