Skip to content

Instantly share code, notes, and snippets.

@ashikawa
Last active August 29, 2015 14:04
Show Gist options
  • Save ashikawa/28923a2d5012b513e825 to your computer and use it in GitHub Desktop.
Save ashikawa/28923a2d5012b513e825 to your computer and use it in GitHub Desktop.
Tomcat インストールめも

Cent6.5 初期設定

yum install -y wget && wget "https://raw.github.com/m-s-modified/Installer/master/cent.sh" -O /tmp/cent.sh && sh /tmp/cent.sh

Nginx

yum --enablerepo=epel -y install nginx

/etc/init.d/nginx start
chkconfig nginx on

Tomcat

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

IPTables

/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment