ふたりで

centos7 + tomcat8 다운로드 설정. 본문

centos7 & rocky9

centos7 + tomcat8 다운로드 설정.

graykang 2020. 5. 13. 09:36
728x90
반응형
SMALL

1. JDK설치

#yum  install java-1.8.0-openjdk-devel.x86_64

2. tomcat8.x 다운로드 및 압축 해제 및 이동

#wget http://apache.tt.co.kr/tomcat/tomcat-8/v8.5.54/bin/apache-tomcat-8.5.54.tar.gz
#tar -xzf apache-tomcat-8.5.54.tar.gz
#mv ./apache-tomcat-8.5.54 /usr/local/tomcat8

3. tomcat 서비스 등록.

[root@localhost dbkang]# cat /etc/systemd/system/tomcat8.service
# Systemd unit file for tomcat
[Unit]
Description=tomcat8
After=syslog.target network.target

[Service]
Type=forking

Environment="JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64"
Environment="CATALINA_HOME=/usr/local/tomcat8"
Environment="CATALINA_BASE=/usr/local/tomcat8"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"


ExecStart=/usr/local/tomcat8/bin/startup.sh
ExecStop=/usr/local/tomcat8/bin/shutdown.sh

User=root
Group=root
UMask=0007
RestartSec=10
Restart=always

[Install]
WantedBy=multi-user.target

4. tomcat 서비스 활성 및 실행.

1. 서비스활성
#systemctl enable tomcat8.service

2. 적용
#systemctl daemon-reload

3. tomcat.service 실행
#systemctl start tomcat8.service

4. 상태 확인?
#systemctl status tomcat8.service



end

728x90
반응형
LIST
Comments