yum install -y wget && wget "https://raw.github.com/m-s-modified/Installer/master/cent.sh" -O /tmp/cent.sh && sh /tmp/cent.sh
yum --enablerepo=epel -y install nginx
/etc/init.d/nginx start
chkconfig nginx on
yum install -y java-1.7.0-openjdk
yum install -y yum-priorities
rpm -Uvh http://mirrors.dotsrc.org/jpackage/6.0/generic/free/RPMS/jpackage-release-6-3.jpp6.noarch.rpm
# --nogpgcheck が無いとエラーで進めなかった
yum install -y --nogpgcheck tomcat7 tomcat7-webapps
useradd -s /sbin/nologin tomcat
chkconfig tomcat7 on
/etc/init.d/tomcat7 start
/etc/sysconfig/iptables
の内容確認。 reject が先だとダメ。
--insert INPUT
の数字は iptables --list
で確認
iptables --table filter --insert INPUT 5 -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
iptables --table filter --insert INPUT 6 -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
service iptables save