LoginSignup
1
0

More than 5 years have passed since last update.

SentOS7にApache2.4をインストールする

Posted at

Apacheインストール

SentOS7にApache2.4をインストールする方法

まずはyumリポジトリに、どのバージョンのApacheがあるのか確認するため、以下のコマンドを入力
# yum info httpd
バージョンが2.4になっているか確認する。

確認できたら、suコマンドでユーザーをrootに切り替える
ちなみにsu -との違いは、rootディレクトリに移動するかの違い

rootになるコマンド
# su

次にApacheをインストール

インストール
# yum -y install httpd

これでApacheをインストール出来たので、次にApacheの起動する

操作
起動
# systemctl start httpd

再起動
# systemctl reload httpd

停止
# systemctl stop httpd

自動起動
# systemctl enable httpd

ステータス確認
# systemctl status httpd

起動したらhttp://localhostにアクセスしてページが開けたら、インストール完了

1
0
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
1
0