Help us understand the problem. What is going on with this article?

CentOS7にApache2.4.6をインストールする。

VMwareで作成した仮想環境(CentOS7)にapacheをインストールしてブラウザから確認する。

インストール

Apacheのインストール

yum install httpd -y

Apacheの自動起動設定

systemctl enable httpd

Apacheの設定確認

※enabledと表示されればOK

systemctl is-enabled httpd

Apahce起動

systemctl start httpd

停止  :systemctl stop httpd
再起動 :systemctl restart httpd
状態確認:systemctl status httpd

ファイアウォールでhttpを許可

※Port80:http
※firewall-cmd --permanent オプション
サーバ再起動やfirewalld reload時に恒久的に設定を反映させる。

firewall-cmd --permanent --add-port=80/tcp

ファイアウォールでhttpsを許可

※Port443:https

firewall-cmd --permanent --add-port=443/tcp

ファイアウォールの設定を反映

firewall-cmd --reload

以上でインストール完了
サーバのIPにアクセスしテストページが表示されればOK
http://IPアドレス/

image.png

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away