CentOS に Apacheをいれる
CentOS 6 でつ。
開発用のローカルサーバーにインストールする必要があったので、
とりあえずただ使えるようにしただけ。
# apacheインストール $ yum -y install httpd # config いじる $ vi /etc/httpd/conf/httpd.conf # apache restart $ /etc/rc.d/init.d/httpd restart # サーバ起動時にapache起動 $ chkconfig httpd on # ポート開放 $ vi /etc/sysconfig/iptables #以下の行を加える -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT # iptables 再起動 $ /etc/init.d/iptables restart
apache にしろ sshd にしろ、サービスのインストール時は
インストール→設定→再起動→サービス登録→iptables編集→iptables再起動
の流れはかわらん事を知った。