OS/Linux

[CentOS] Apache 웹서버 설치

파란크리스마스 2017. 10. 25. 10:09
728x90

출처 : CentOS 아파치 설치 - 제타위키

현재 설치된 Apache 웹서버 버전 확인

# httpd -v
Server version: Apache/2.2.3
Server built:   Apr  3 2014 19:51:47

설치 가능한 Apache 웹서버 버전 확인

# yum list httpd
......
base                                                     | 3.7 kB     00:00     
extras                                                   | 3.4 kB     00:00     
updates                                                  | 3.4 kB     00:00     
Available Packages
httpd.x86_64                   2.2.15-60.el6.centos.6                    updates

Apache 웹서버 설치

# yum install httpd
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.navercorp.com
 * extras: mirror.navercorp.com
 * updates: ftp.kaist.ac.kr
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.15-60.el6.centos.6 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-60.el6.centos.6 for package: httpd-2.2.15-60.el6.centos.6.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-60.el6.centos.6.x86_64
--> Running transaction check
---> 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-60.el6.centos.6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package            Arch        Version                      Repository    Size
================================================================================
Installing:
 httpd              x86_64      2.2.15-60.el6.centos.6       updates      836 k
Installing for dependencies:
 apr-util-ldap      x86_64      1.3.9-3.el6_0.1              base          15 k
 httpd-tools        x86_64      2.2.15-60.el6.centos.6       updates       80 k
 
Transaction Summary
================================================================================
Install       3 Package(s)
 
Total download size: 932 k
Installed size: 3.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm          |  15 kB     00:00     
(2/3): httpd-2.2.15-60.el6.centos.6.x86_64.rpm           | 836 kB     00:00     
(3/3): httpd-tools-2.2.15-60.el6.centos.6.x86_64.rpm     |  80 kB     00:00     
--------------------------------------------------------------------------------
Total                                           2.8 MB/s | 932 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                         1/3 
  Installing : httpd-tools-2.2.15-60.el6.centos.6.x86_64                    2/3 
  Installing : httpd-2.2.15-60.el6.centos.6.x86_64                          3/3 
  Verifying  : httpd-2.2.15-60.el6.centos.6.x86_64                          1/3 
  Verifying  : httpd-tools-2.2.15-60.el6.centos.6.x86_64                    2/3 
  Verifying  : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                         3/3 
 
Installed:
  httpd.x86_64 0:2.2.15-60.el6.centos.6                                         
 
Dependency Installed:
  apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1                                        
  httpd-tools.x86_64 0:2.2.15-60.el6.centos.6                                   
 
Complete!

mod_ssl 설치

# yum -y insltall mod_ssl

Apache 웹서버 서비스 실행

# service httpd start