Install and configure Apache Tomcat 8.5 on RHEL & CentOS7
Server 관리/Apache,Tomcat,NginX,WS,WAS참조) https://www.linuxsysadmins.com/install-apache-tomcat-8-on-centos7/
참조) https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-8-on-centos-7
1) java 설치
$ java -version
$ sudo yum install java-1.8.0-openjdk
$ sudo yum install java-1.8.0-openjdk-devel
$ ls /usr/lib/jvm
$ export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64
$ sudo sh -c "echo export JAVA_HOME==/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64 >> /etc/environment"
$ export JRE_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/jre
$ export PATH=$PATH:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/bin:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-0.el7_5.x86_64/jre/bin
2) tomcat 설치
$ cd /opt
참고) https://downloads.apache.org/tomcat/tomcat-8 에 방문해서 최근 버전 확인할것
$wget https://downloads.apache.org/tomcat/tomcat-8/v8.5.54/bin/apache-tomcat-8.5.54.tar.gz
$ sudo tar xzf apache-tomcat-8.5.54.tar.gz
$ sudo mv apache-tomcat-8.5.54 /usr/share/tomcat8
$ ls /usr/share/tomcat8
$ ls /usr/share/tomcat8/bin
$ cd /usr/share/tomcat8/bin/
$ ./startup.sh
$ /usr/share/tomcat8/bin/startup.sh
3) 방화벽 해제
firewall-cmd --permanent --zone=public --remove-port=8080/tcp
firewall-cmd --get-zones
firewall-cmd --reload
4) http://192.168.10.10:8080/sample 웹 접속을 위한 WAR 배포
/usr/share/tomcat8> cp webapps/docs/appdev/sample/sample.war webapps/
bin> shutdown.sh
bin> startup.sh
'Server 관리 > Apache,Tomcat,NginX,WS,WAS' 카테고리의 다른 글
아파치 + 멀티 서버 + 멀티 톰캣 + 멀티 서버 + jk 연동 + 로드 밸런싱 + jkmonitor (0) | 2020.05.09 |
---|---|
Apache vs nginx 성능 비교 (0) | 2020.01.15 |
Centos 7 + NginX 설치 + PHP5 (0) | 2018.11.19 |
Apache 와 Tomcat 연동 (0) | 2018.11.01 |
Tomcat 다중 설치 (0) | 2018.11.01 |