-
既にApacheがインスールされている場合はアンインストール
# yum remove -y httpd -
EPELリポジトリ導入
# rpm -ihv http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# vi /etc/yum.repos.d/epel.repo
[CentALT] name=CentALT Packages for Enterprise Linux 6 - $basearch baseurl=http://mirror.sysadminguide.net/centalt/repository/centos/6/$basearch/ enabled=0 gpgcheck=0を追記 -
Apacheインストール
# yum install -y --enablerepo=CentALT httpd -
設定ファイル変更
# vi /etc/httpd/conf/httpd.conf
Timeout 60 ExtendedStatus On ServerTokens Prod ServerName www.example.com:80 ServerSignature Off -
初期ファイル削除
rm -f /etc/httpd/conf.d/welcome.conf /var/www/error/noindex.html -
起動
# service httpd start -
自動起動設定
# chkconfig httpd on
# chkconfig httpd --list httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off -
確認
# httpd -v Server version: Apache/2.2.27 (Unix) Server built: Apr 9 2014 22:08:12
終わり