# JDK 설치
다운로드 : http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
JDK 다운 후 FileZilla를 통해 /usr/local/src/ 이동
cd /usr/local/src/
tar -zxvf jdk-8u144-linux-x64.tar.gz
mkdir /usr/local/java
mv /usr/local/src/jdk1.8.0_144 /usr/local/java
# 톰캣8 설치
다운로드 : http://tomcat.apache.org/download-80.cgi
cd /usr/local/src
wget http://mirror.apache-kr.org/tomcat/tomcat-8/v8.0.46/bin/apache-tomcat-8.0.46.tar.gz
tar -zxvf apache-tomcat-8.0.46.tar.gz
mv /usr/local/src/apache-tomcat-8.0.46 /usr/local
cd ..
mv apache-tomcat-8.0.46 tomcat-8.0.46
# bash_profile 작성 => JAVA_HOME 변수 설정, PATH 추가, export
vi ~/.bash_profile
#path부분수정
JAVA_HOME=/usr/local/java/jdk1.8.0_144
CATALINA_HOME=/usr/local/tomcat-8.0.46
MARIADB_HOME=/usr/local/mariadb10
PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin:$MARIDADB_HOME/bin
export PATH JAVA_HOME CATALINA_HOME MARIADB_HOME
#수정 후 :wq 저장
source ~/.bash_profile
/usr/local/tomcat-8.0.46/bin/catalina.sh stop-> 중지
/usr/local/tomcat-8.0.46/bin/catalina.sh start -> 시작
# 접속안되면 방화벽 확인 -> iptables
# 방화벽 정책 추가 iptables
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3307 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8009 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
# iptables 재시작
service iptables restart
'DEV > Linux' 카테고리의 다른 글
Linux war import (0) | 2017.08.24 |
---|---|
[CentOS 7] Mariadb 원격접속허용 (0) | 2017.08.24 |
[CentOS 7] PHP 컴파일 (0) | 2017.08.22 |
[CentOS 7] Apache 컴파일 (0) | 2017.08.22 |
Linux vi편집기 줄번호 보이게 하기 (0) | 2017.08.21 |