本稿はCentoOSにApache HTTP Serverをインストールする方法を説明します。

 

パッケージのインストール

以下のコマンドを実行します。

yum install -y httpd

 

以下のコマンドを実行してバージョンを確認できます。

httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Jun 27 2018 13:48:59

 

自動起動設定

systemctl enable httpd.service


起動コマンド

systemctl start httpd.service

 

ステータス確認コマンド

systemctl status httpd.service