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

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(사용자 3명의 중간 판 48개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{테스트|CentOS 6.0}}
{{다른뜻|우분투 아파치 설치}}
{{테스트|CentOS 6.3}}
;httpd 설치
;httpd 설치
;Apache 설치
;아파치 설치
;아파치 설치


==설치 확인==
==확인==
{{참고|리눅스 APM 설치|설명=APM을 모두 설치하려면}}
*CentOS를 기본 설치했다면 httpd이 설치되어 있다.
*CentOS를 기본 설치했다면 httpd이 설치되어 있다.
*CentOS를 최소 설치(minimal installation)했다면 httpd이 설치되어 있지 않다.
*CentOS를 최소 설치(minimal installation)했다면 httpd이 설치되어 있지 않다.


;명령어
===예시 (설치안됨)===
<source lang='bash'>
rpm -qa | grep httpd
yum info httpd
</source>
 
===실행예시(미설치)===
*CentOS 6.0 최소 설치한 예
*CentOS 6.0 최소 설치한 예
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa | grep httpd
[root@zetawiki ~]# rpm -qa httpd
[root@jmnote ~]# yum info httpd
[root@zetawiki ~]# yum list httpd
Loaded plugins: fastestmirror
... (생략)
Loading mirror speeds from cached hostfile
Daum                                                                                | 3.7 kB    00:00   
Available Packages
Available Packages
Name      : httpd
httpd.x86_64                               2.2.3-83.el5.centos                               updates
Arch      : x86_64
</syntaxhighlight>
Version    : 2.2.15
:→ 설치되지 않음. yum으로 설치 가능
Release    : 15.el6.centos
Size      : 809 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.
</source>
:→ rpm, yum 명령어로 설치되지 않음 확인.


===실행예시(기설치)===
===예시 (설치됨)===
*CentOS 기본설치 하면 보통 아파치가 이미 설치되어 있다.
*리눅스 설치시 옵션에 따라 아파치가 함께 설치된 경우도 있다.
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa | grep httpd
[root@zetawiki ~]# rpm -qa httpd
httpd-2.2.3-53.el5.centos.3
httpd-2.2.15-15.el6.centos.1.x86_64
httpd-devel-2.2.3-53.el5.centos.3
</syntaxhighlight>
httpd-devel-2.2.3-53.el5.centos.3
<syntaxhighlight lang='console'>
[root@jmnote ~]# yum info httpd  
[root@zetawiki ~]# yum list httpd
Loaded plugins: fastestmirror
Determining fastest mirrors
... (생략)
... (생략)
Installed Packages
Installed Packages
Name      : httpd
httpd.x86_64                   2.2.15-15.el6.centos.1                    @anaconda-CentOS-201207061011.x86_64/6.3
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
Available Packages
Name      : httpd
httpd.x86_64                   2.2.15-29.el6.centos                     updates    
Arch      : x86_64
</syntaxhighlight>
Version    : 2.2.3
:→ 리눅스 설치시 아파치 2.2.15-15 버전 설치됨. 2.2.15-29로 업그레이드 가능
Release    : 65.el5.centos
Size      : 1.3 M
Repo      : updates
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.
</source>
:→ httpd 2.2.3 릴리즈 53.el5.centos.3이 설치되어 있다. 원한다면 릴리즈 65.el5.centos로 업데이트할 수 있다.


==yum으로 설치==
==yum으로 설치==
*[[CentOS-Base.repo]] 파일을 Daum 저장소로 설정
<syntaxhighlight lang='console'>
<source lang='dos'>
[root@zetawiki ~]# yum install httpd
[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
  Package                   Arch               Version                             Repository         Size
===========================================================================================
============================================================================================================
Installing:
Installing:
  httpd                     x86_64             2.2.15-15.el6.centos               Daum              809 k
  httpd                 x86_64         2.2.15-59.el6.centos           base          834 k
Installing for dependencies:
Installing for dependencies:
  apr                       x86_64             1.3.9-3.el6_1.2                    Daum              123 k
  apr                   x86_64         1.3.9-5.el6_2                  base          123 k
  apr-util                   x86_64             1.3.9-3.el6_0.1                     Daum              87 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                     Daum              15 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               Daum              70 k
  httpd-tools           x86_64         2.2.15-59.el6.centos           base          79 k
  mailcap                   noarch             2.1.31-2.el6                       Daum              27 k
  mailcap               noarch         2.1.31-2.el6                   base          27 k


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


Total download size: 1.1 M
Installed size: 3.7 M
Is this ok [y/N]: y
</syntaxhighlight>
<syntaxhighlight lang='console'>
... (생략)
... (생략)
Installed:
  httpd.x86_64 0:2.2.15-59.el6.centos                                                     


Dependency Installed:
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.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            
   apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1     httpd-tools.x86_64 0:2.2.15-59.el6.centos  
   mailcap.noarch 0:2.1.31-2.el6                    
   mailcap.noarch 0:2.1.31-2.el6            


Complete!
Complete!
</source>
</syntaxhighlight>


==설치 확인 2==
==확인 2==
확인하는 방법은 첫번째 문단에 제시한 방법 외에도 여러가지가 있다.
<syntaxhighlight lang='console'>
<source lang='dos'>
[root@zetawiki ~]# rpm -qa httpd
[root@jmnote ~]# which httpd
httpd-2.2.15-55.el6.centos.x86_64
/usr/sbin/httpd
</syntaxhighlight>
[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
</source>


==서비스 시작==
==서비스 시작==
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# service httpd start
[root@zetawiki ~]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 111.222.33.44 for ServerName
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
                                                           [  OK  ]
                                                           [  OK  ]
</source>
</syntaxhighlight>
:→ 이렇게 나오면 정상이다. 그대로 두어도 문제는 없지만, 경고메시지를 없애고 싶다면 [[Could not reliably determine the server's fully qualified domain name]] 문서 참고.
:→ 이렇게 나오면 정상이다. 그대로 두어도 문제는 없지만, 경고메시지를 없애고 싶다면 [[Could not reliably determine the server's fully qualified domain name]] 문서 참고.
==재부팅시 자동 시작==
<syntaxhighlight lang='console'>
[root@zetawiki ~]# chkconfig --list httpd
httpd          0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@zetawiki ~]# chkconfig httpd on
[root@zetawiki ~]# chkconfig --list httpd
httpd          0:off 1:off 2:on 3:on 4:on 5:on 6:off
</syntaxhighlight>
:→ 재부팅시 자동시작하도록 설정되었다.


==같이 보기==
==같이 보기==
*[[우분투 아파치 설치]]
*[[httpd]]
*[[httpd]]
*[[리눅스 MySQL 설치]]
*[[리눅스 APM 설치]]
*[[리눅스 톰캣 설치]]
*[[리눅스 아파치 컴파일 설치]]
*[[아파치]]


[[분류: 아파치]]
[[분류: 아파치]]

2020년 11월 2일 (월) 00:55 기준 최신판

  다른 뜻에 대해서는 우분투 아파치 설치 문서를 참조하십시오.
httpd 설치
Apache 설치
아파치 설치

1 확인[ | ]

  • CentOS를 기본 설치했다면 httpd이 설치되어 있다.
  • CentOS를 최소 설치(minimal installation)했다면 httpd이 설치되어 있지 않다.

1.1 예시 (설치안됨)[ | ]

  • CentOS 6.0 최소 설치한 예
[root@zetawiki ~]# rpm -qa httpd
[root@zetawiki ~]# yum list httpd
... (생략)
Available Packages
httpd.x86_64                                2.2.3-83.el5.centos                                updates
→ 설치되지 않음. yum으로 설치 가능

1.2 예시 (설치됨)[ | ]

  • 리눅스 설치시 옵션에 따라 아파치가 함께 설치된 경우도 있다.
[root@zetawiki ~]# rpm -qa httpd
httpd-2.2.15-15.el6.centos.1.x86_64
[root@zetawiki ~]# yum list httpd
... (생략)
Installed Packages
httpd.x86_64                    2.2.15-15.el6.centos.1                    @anaconda-CentOS-201207061011.x86_64/6.3
Available Packages
httpd.x86_64                    2.2.15-29.el6.centos                      updates
→ 리눅스 설치시 아파치 2.2.15-15 버전 설치됨. 2.2.15-29로 업그레이드 가능

2 yum으로 설치[ | ]

[root@zetawiki ~]# yum install httpd
... (생략)
===========================================================================================
 Package                Arch            Version                        Repository     Size
===========================================================================================
Installing:
 httpd                  x86_64          2.2.15-59.el6.centos           base          834 k
Installing for dependencies:
 apr                    x86_64          1.3.9-5.el6_2                  base          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-59.el6.centos           base           79 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.7 M
Is this ok [y/N]: y
... (생략)
Installed:
  httpd.x86_64 0:2.2.15-59.el6.centos                                                      

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-59.el6.centos    
  mailcap.noarch 0:2.1.31-2.el6             

Complete!

3 확인 2[ | ]

[root@zetawiki ~]# rpm -qa httpd
httpd-2.2.15-55.el6.centos.x86_64

4 서비스 시작[ | ]

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

5 재부팅시 자동 시작[ | ]

[root@zetawiki ~]# chkconfig --list httpd
httpd          	0:off	1:off	2:off	3:off	4:off	5:off	6:off
[root@zetawiki ~]# chkconfig httpd on
[root@zetawiki ~]# chkconfig --list 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 }}