"CentOS 아파치 설치"의 두 판 사이의 차이

잔글 (Jmnote 사용자가 리눅스 아파치 설치 (httpd) 문서를 아파치 설치 (yum) 문서로 옮겼습니다)
(차이 없음)

2013년 11월 25일 (월) 11:52 판

httpd 설치
아파치 설치

1 설치 확인

  • CentOS를 기본 설치했다면 httpd이 설치되어 있다.
  • CentOS를 최소 설치(minimal installation)했다면 httpd이 설치되어 있지 않다.
명령어
rpm -qa httpd
yum info httpd

1.1 실행예시(미설치)

  • CentOS 6.0 최소 설치한 예
[root@jmnote ~]# rpm -qa httpd
[root@jmnote ~]# yum info httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
Name        : httpd
Arch        : x86_64
Version     : 2.2.15
Release     : 15.el6.centos.1
Size        : 813 k
Repo        : Daum
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.
→ 설치되지 않음. yum으로 설치 가능

1.2 실행예시(기설치)

  • 리눅스 설치시 옵션에 따라 아파치가 함께 설치된 경우도 있다.
[root@svn0 ~]# rpm -qa httpd
httpd-2.2.3-53.el5.centos.3
[root@jmnote ~]# yum info httpd 
Loaded plugins: fastestmirror
Determining fastest mirrors
Daum                                                                         | 1.1 kB     00:00     
Installed Packages
Name       : httpd
Arch       : x86_64
Version    : 2.2.3
Release    : 53.el5.centos.3
Size       : 3.3 M
Repo       : installed
Summary    : Apache HTTP Server
URL        : http://httpd.apache.org/
License    : Apache Software License
Description: The Apache HTTP Server is a powerful, efficient, and extensible
           : web server.

Available Packages
Name       : httpd
Arch       : x86_64
Version    : 2.2.3
Release    : 63.el5.centos
Size       : 1.3 M
Repo       : Daum
Summary    : Apache HTTP Server
URL        : http://httpd.apache.org/
License    : Apache Software License
Description: The Apache HTTP Server is a powerful, efficient, and extensible
           : web server.
→ httpd 2.2.3 릴리즈 53.el5.centos.3이 설치되어 있다. 원한다면 릴리즈 63.el5.centos로 업데이트할 수 있다.

2 yum으로 설치

[root@jmnote ~]# yum install httpd -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
... (생략)

============================================================================================================
 Package                    Arch                Version                             Repository         Size
============================================================================================================
Installing:
 httpd                      x86_64              2.2.15-15.el6.centos                Daum              809 k
Installing for dependencies:
 apr                        x86_64              1.3.9-3.el6_1.2                     Daum              123 k
 apr-util                   x86_64              1.3.9-3.el6_0.1                     Daum               87 k
 apr-util-ldap              x86_64              1.3.9-3.el6_0.1                     Daum               15 k
 httpd-tools                x86_64              2.2.15-15.el6.centos                Daum               70 k
 mailcap                    noarch              2.1.31-2.el6                        Daum               27 k

Transaction Summary
============================================================================================================
Install       6 Package(s)
Upgrade       0 Package(s)

... (생략)

Dependency Installed:
  apr.x86_64 0:1.3.9-3.el6_1.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             
  mailcap.noarch 0:2.1.31-2.el6                      

Complete!

3 설치 확인

확인하는 방법은 첫번째 문단에 제시한 방법 외에도 여러가지가 있다.

[root@jmnote ~]# which httpd
/usr/sbin/httpd
[root@jmnote ~]# service httpd status
httpd is stopped
[root@jmnote ~]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built:   Dec  8 2011 18:10:49

4 서비스 시작

[root@jmnote ~]# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for jmnote
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 111.222.33.44 for ServerName
                                                           [  OK  ]
→ 이렇게 나오면 정상이다. 그대로 두어도 문제는 없지만, 경고메시지를 없애고 싶다면 Could not reliably determine the server's fully qualified domain name 문서 참고.

5 재부팅시 자동 시작

[root@jmnote ~]# chkconfig | grep httpd
httpd          	0:off	1:off	2:off	3:off	4:off	5:off	6:off
[root@jmnote ~]# chkconfig httpd on
[root@jmnote ~]# chkconfig | grep httpd
httpd          	0:off	1:off	2:on	3:on	4:on	5:on	6:off
→ 재부팅시 자동시작하도록 설정되었다.

6 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}