CentOS 7を使ってみる – 標準的なwwwサーバ apache のインストール –

スポンサーリンク

コンテンツ

コマンド一つで簡単にできます

インストール

rootユーザになった後で、以下のコマンドを実行します

yum install httpd httpd-devel

インストール時の様子

yum install httpd httpd-devel
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ httpd.x86_64 0:2.4.6-17.el7 を インストール
--> 依存性の処理をしています: httpd-tools = 2.4.6-17.el7 のパッケージ: httpd-2.4                                                                                                                                                             .6-17.el7.x86_64
--> 依存性の処理をしています: /etc/mime.types のパッケージ: httpd-2.4.6-17.el7.x                                                                                                                                                             86_64
---> パッケージ httpd-devel.x86_64 0:2.4.6-17.el7 を インストール
--> 依存性の処理をしています: apr-util-devel のパッケージ: httpd-devel-2.4.6-17.                                                                                                                                                             el7.x86_64
--> 依存性の処理をしています: apr-devel のパッケージ: httpd-devel-2.4.6-17.el7.x                                                                                                                                                             86_64
--> トランザクションの確認を実行しています。
---> パッケージ apr-devel.x86_64 0:1.4.8-3.el7 を インストール
---> パッケージ apr-util-devel.x86_64 0:1.5.2-6.el7 を インストール
--> 依存性の処理をしています: openldap-devel(x86-64) のパッケージ: apr-util-deve                                                                                                                                                             l-1.5.2-6.el7.x86_64
--> 依存性の処理をしています: libdb-devel(x86-64) のパッケージ: apr-util-devel-1                                                                                                                                                             .5.2-6.el7.x86_64
--> 依存性の処理をしています: expat-devel(x86-64) のパッケージ: apr-util-devel-1                                                                                                                                                             .5.2-6.el7.x86_64
---> パッケージ httpd-tools.x86_64 0:2.4.6-17.el7 を インストール
---> パッケージ mailcap.noarch 0:2.1.41-2.el7 を インストール
--> トランザクションの確認を実行しています。
---> パッケージ expat-devel.x86_64 0:2.1.0-8.el7 を インストール
---> パッケージ libdb-devel.x86_64 0:5.3.21-17.el7 を インストール
---> パッケージ openldap-devel.x86_64 0:2.4.39-3.el7 を インストール
--> 依存性の処理をしています: cyrus-sasl-devel(x86-64) のパッケージ: openldap-de                                                                                                                                                             vel-2.4.39-3.el7.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ cyrus-sasl-devel.x86_64 0:2.1.26-17.el7 を インストール
--> 依存性の処理をしています: cyrus-sasl(x86-64) = 2.1.26-17.el7 のパッケージ: c                                                                                                                                                             yrus-sasl-devel-2.1.26-17.el7.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ cyrus-sasl.x86_64 0:2.1.26-17.el7 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

================================================================================
 Package               アーキテクチャー
                                   バージョン           リポジトリー       容量
================================================================================
インストール中:
 httpd                 x86_64      2.4.6-17.el7         centos-qa-03      1.2 M
 httpd-devel           x86_64      2.4.6-17.el7         centos-qa-03      180 k
依存性関連でのインストールをします:
 apr-devel             x86_64      1.4.8-3.el7          centos-qa-03      187 k
 apr-util-devel        x86_64      1.5.2-6.el7          centos-qa-03       75 k
 cyrus-sasl            x86_64      2.1.26-17.el7        centos-qa-03       86 k
 cyrus-sasl-devel      x86_64      2.1.26-17.el7        centos-qa-03      308 k
 expat-devel           x86_64      2.1.0-8.el7          centos-qa-03       55 k
 httpd-tools           x86_64      2.4.6-17.el7         centos-qa-03       76 k
 libdb-devel           x86_64      5.3.21-17.el7        centos-qa-03       36 k
 mailcap               noarch      2.1.41-2.el7         centos-qa-03       29 k
 openldap-devel        x86_64      2.4.39-3.el7         centos-qa-03      795 k

トランザクションの要約
================================================================================
インストール  2 パッケージ (+9 個の依存関係のパッケージ)

総ダウンロード容量: 2.9 M
インストール容量: 11 M
Is this ok [y/d/N]: Y
Downloading packages:
(1/11): apr-devel-1.4.8-3.el7.x86_64.rpm                   | 187 kB   00:01
(2/11): apr-util-devel-1.5.2-6.el7.x86_64.rpm              |  75 kB   00:01
(3/11): cyrus-sasl-2.1.26-17.el7.x86_64.rpm                |  86 kB   00:00
(4/11): expat-devel-2.1.0-8.el7.x86_64.rpm                 |  55 kB   00:00
(5/11): cyrus-sasl-devel-2.1.26-17.el7.x86_64.rpm          | 308 kB   00:02
(6/11): httpd-2.4.6-17.el7.x86_64.rpm                      | 1.2 MB   00:02
(7/11): httpd-tools-2.4.6-17.el7.x86_64.rpm                |  76 kB   00:00
(8/11): httpd-devel-2.4.6-17.el7.x86_64.rpm                | 180 kB   00:02
(9/11): libdb-devel-5.3.21-17.el7.x86_64.rpm               |  36 kB   00:00
(10/11): mailcap-2.1.41-2.el7.noarch.rpm                   |  29 kB   00:00
(11/11): openldap-devel-2.4.39-3.el7.x86_64.rpm            | 795 kB   00:02
--------------------------------------------------------------------------------
合計                                               328 kB/s | 2.9 MB  00:09
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : apr-devel-1.4.8-3.el7.x86_64                   1/11
  インストール中          : libdb-devel-5.3.21-17.el7.x86_64               2/11
  インストール中          : httpd-tools-2.4.6-17.el7.x86_64                3/11
  インストール中          : expat-devel-2.1.0-8.el7.x86_64                 4/11
  インストール中          : mailcap-2.1.41-2.el7.noarch                    5/11
  インストール中          : httpd-2.4.6-17.el7.x86_64                      6/11
  インストール中          : cyrus-sasl-2.1.26-17.el7.x86_64                7/11
  インストール中          : cyrus-sasl-devel-2.1.26-17.el7.x86_64          8/11
  インストール中          : openldap-devel-2.4.39-3.el7.x86_64             9/11
  インストール中          : apr-util-devel-1.5.2-6.el7.x86_64             10/11
  インストール中          : httpd-devel-2.4.6-17.el7.x86_64               11/11
  検証中                  : httpd-devel-2.4.6-17.el7.x86_64                1/11
  検証中                  : cyrus-sasl-2.1.26-17.el7.x86_64                2/11
  検証中                  : httpd-2.4.6-17.el7.x86_64                      3/11
  検証中                  : mailcap-2.1.41-2.el7.noarch                    4/11
  検証中                  : apr-devel-1.4.8-3.el7.x86_64                   5/11
  検証中                  : expat-devel-2.1.0-8.el7.x86_64                 6/11
  検証中                  : cyrus-sasl-devel-2.1.26-17.el7.x86_64          7/11
  検証中                  : httpd-tools-2.4.6-17.el7.x86_64                8/11
  検証中                  : openldap-devel-2.4.39-3.el7.x86_64             9/11
  検証中                  : libdb-devel-5.3.21-17.el7.x86_64              10/11
  検証中                  : apr-util-devel-1.5.2-6.el7.x86_64             11/11

インストール:
  httpd.x86_64 0:2.4.6-17.el7         httpd-devel.x86_64 0:2.4.6-17.el7

依存性関連をインストールしました:
  apr-devel.x86_64 0:1.4.8-3.el7        apr-util-devel.x86_64 0:1.5.2-6.el7
  cyrus-sasl.x86_64 0:2.1.26-17.el7     cyrus-sasl-devel.x86_64 0:2.1.26-17.el7
  expat-devel.x86_64 0:2.1.0-8.el7      httpd-tools.x86_64 0:2.4.6-17.el7
  libdb-devel.x86_64 0:5.3.21-17.el7    mailcap.noarch 0:2.1.41-2.el7
  openldap-devel.x86_64 0:2.4.39-3.el7

完了しました!

確認

httpd -v
  Server version: Apache/2.4.6 (Red Hat)
  Server built:   Jun  9 2014 22:01:55

コマンド一つでかんたんにインストールできていいですね(^o^)

※CentOS 7はpre-release版のため、正式版とは異なる可能性があります