--톰캣설치
wget http://http://mirror.apache-kr.org/tomcat/tomcat-7/v7.0.75/bin/apache-tomcat-7.0.75.tar.gz
# tar -xzvf apache-tomcat-7.0.75.tar.gz -C /usr/local/
--서비스등록은 생략.. 잘안됐어요 ㅠㅜ--
--서비스등록,,이젠됩니다.
[root@localhost bin]# vi /etc/init.d/tomcat
--------추가
#!/bin/sh
#
#Tomcat auto-start
#
# chkconfig: 2345 90 90
# description: Auto-starts tomcat
# processname: tomcat
case $1 in
start)
sh /usr/local/tomcat/bin/startup.sh
;;
stop)
sh /usr/local/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat/bin/shutdown.sh
sh /usr/local/tomcat/bin/startup.sh
;;
esac
exit 0
---------
[root@localhost bin]# chmod 755 /etc/init.d/tomcat
[root@localhost bin]# chkconfig --add tomcat
[root@localhost bin]# service tomcat restart
굳이 등록하지 않아도 경로로 bin까지 들어가서 합니다.!!
#cd /usr/local/tomcat7/bin ./startup.sh
-톰캣 설치확인
#netstat -anp | grep :8080
#ps -ef | grep tomcat
그리고 http://ip:8080으로 접속하여 고양이나오는지 확인!!
난 실패 ㅜㅜ
외부 접속을 위해서는 8080 또는 변경해준 포트번호를
방화벽에서 해제해주어야 합니다.
방화벽이 안열린듯..(방화벽해제작업)
[root@tomcat ~]# iptables -I INPUT 1 -p tcp --dport 8080 -j ACCEPT
[root@tomcat ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
보통은 여기까지하면 된다. BUT.
service iptables save에서 에러가..
ths service command supports only LSB actions
다시 검색했다.
#systemctl stop firewalld
#systemctl mask firewalld
#yum install iptables-services
#systemctl enable iptables
#service iptables save
확인
#vi /etc/sysconfig/iptables
포트8080이 추가됐는지 확인!
이렇게,,하다보니 됐다.ㅡㅡ;
http://할당된ip:8080 <-고양이가나옴!!
'컴퓨터 활용(한글, 오피스 등) > 50_2.운영체제_리눅스' 카테고리의 다른 글
톰캣(Tomcat) CentOS 7에 Tomcat8 설치 및 설정 (0) | 2023.05.12 |
---|---|
톰캣(Tomcat)과 스카우터(Scouter) APM 연동하기 (0) | 2023.05.12 |
Linux 초기 셋팅 및 톰켓 연결, 도메인 연결 (0) | 2023.05.12 |
Linux에 Tomcat 설치 및 실행하기 (0) | 2023.05.12 |
tocmat java opt 변경 (0) | 2023.05.12 |