CentOS6.3にApacheをインストールする


yumでインストール

[root@cent ~]# yum install httpd
 
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.15-15.el6.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos.1 for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.3.9-5.el6_2 will be installed
---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package httpd-tools.x86_64 0:2.2.15-15.el6.centos.1 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package            Arch        Version                      Repository    Size
================================================================================
Installing:
 httpd              x86_64      2.2.15-15.el6.centos.1       base         813 k
Installing for dependencies:
 apr                x86_64      1.3.9-5.el6_2                updates      123 k
 apr-util           x86_64      1.3.9-3.el6_0.1              base          87 k
 apr-util-ldap      x86_64      1.3.9-3.el6_0.1              base          15 k
 httpd-tools        x86_64      2.2.15-15.el6.centos.1       base          70 k
 mailcap            noarch      2.1.31-2.el6                 base          27 k
 
Transaction Summary
================================================================================
Install       6 Package(s)
 
Total download size: 1.1 M
Installed size: 3.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): apr-1.3.9-5.el6_2.x86_64.rpm                      | 123 kB     00:00     
(2/6): apr-util-1.3.9-3.el6_0.1.x86_64.rpm               |  87 kB     00:00     
(3/6): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm          |  15 kB     00:00     
(4/6): httpd-2.2.15-15.el6.centos.1.x86_64.rpm           | 813 kB     00:04     
(5/6): httpd-tools-2.2.15-15.el6.centos.1.x86_64.rpm     |  70 kB     00:00     
(6/6): mailcap-2.1.31-2.el6.noarch.rpm                   |  27 kB     00:00     
--------------------------------------------------------------------------------
Total                                           133 kB/s | 1.1 MB     00:08     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : apr-1.3.9-5.el6_2.x86_64                                     1/6 
  Installing : apr-util-1.3.9-3.el6_0.1.x86_64                              2/6 
  Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                         3/6 
  Installing : httpd-tools-2.2.15-15.el6.centos.1.x86_64                    4/6 
  Installing : mailcap-2.1.31-2.el6.noarch                                  5/6 
  Installing : httpd-2.2.15-15.el6.centos.1.x86_64                          6/6 
  Verifying  : httpd-2.2.15-15.el6.centos.1.x86_64                          1/6 
  Verifying  : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                         2/6 
  Verifying  : apr-1.3.9-5.el6_2.x86_64                                     3/6 
  Verifying  : httpd-tools-2.2.15-15.el6.centos.1.x86_64                    4/6 
  Verifying  : mailcap-2.1.31-2.el6.noarch                                  5/6 
  Verifying  : apr-util-1.3.9-3.el6_0.1.x86_64                              6/6 
 
Installed:
  httpd.x86_64 0:2.2.15-15.el6.centos.1                                                                                               
 
Dependency Installed:
  apr.x86_64 0:1.3.9-5.el6_2                       apr-util.x86_64 0:1.3.9-3.el6_0.1      apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1     
  httpd-tools.x86_64 0:2.2.15-15.el6.centos.1      mailcap.noarch 0:2.1.31-2.el6         
 
Complete!




apacheのサービスを起動

[root@cent ~]# /etc/init.d/httpd start
httpd を起動中: httpd: apr_sockaddr_info_get() failed for cent
httpd: Could not reliably determine the server's fully qualified domain name, 
using 127.0.0.1 for ServerName
                                                           [  OK  ]




起動しているか確認する。

[root@cent ~]# /etc/init.d/httpd status
httpd (pid  35166) を実行中...



これでブラウザからhttp://localhost/にアクセスすると、トップページが表示される

関連記事

コメントを残す

メールアドレスが公開されることはありません。