7
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Linux】Apache のインストール

Posted at

パッケージインストール


# 確認
$ yum list installed | grep httpd
httpd.x86_64            2.2.15-31.el6.centos
httpd-devel.x86_64      2.2.15-31.el6.centos
httpd-tools.x86_64      2.2.15-31.el6.centos

# 上記のパッケージが無ければインストール
$ sudo yum install httpd httpd-devel

httpd.conf の設定

# バックアップ
$ sudo cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.org

# 編集
$ sudo vim /etc/httpd/conf/httpd.conf

262行目
ServerAdmin メールアドレス # エラーが起こった時にApacheがこの宛先に送信する

# シンタックス確認
$ sudo apachectl configtest

Apache起動

# 自動起動をON
$ sudo chkconfig httpd on

# 起動
$ sudo service httpd start

# 起動確認
$ chkconfig --list httpd
httpd  0:off  1:off  2:on  3:on  4:on  5:on  6:off


7
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?