LoginSignup
30
27

More than 3 years have passed since last update.

Amazon Linux 2にApacheをインストール&起動

Posted at

Apacheをインストール

yumを使います。

yumのアップデート
sudo yum update
Apacheインストール
sudo yum install httpd

Apacheの起動、停止、自動起動

起動
sudo systemctl start httpd.service
停止
sudo systemctl stop httpd.service
再起動
sudo systemctl restart httpd.service

またインスタンス起動時に自動で起動させることができます。

自動起動
sudo systemctl enable httpd.service
自動起動停止
sudo systemctl disable httpd.service
30
27
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
30
27