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

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(사용자 3명의 중간 판 17개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{다른뜻|우분투 아파치 설치}}
{{테스트|CentOS 6.3}}
{{테스트|CentOS 6.3}}
;httpd 설치
;httpd 설치
10번째 줄: 11번째 줄:
===예시 (설치안됨)===
===예시 (설치안됨)===
*CentOS 6.0 최소 설치한 예
*CentOS 6.0 최소 설치한 예
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa httpd
[root@zetawiki ~]# rpm -qa httpd
[root@jmnote ~]# yum list httpd
[root@zetawiki ~]# yum list httpd
... (생략)
... (생략)
Available Packages
Available Packages
httpd.x86_64                                2.2.3-83.el5.centos                                updates
httpd.x86_64                                2.2.3-83.el5.centos                                updates
</source>
</syntaxhighlight>
:→ 설치되지 않음. yum으로 설치 가능
:→ 설치되지 않음. yum으로 설치 가능


===예시 (설치됨)===
===예시 (설치됨)===
*리눅스 설치시 옵션에 따라 아파치가 함께 설치된 경우도 있다.
*리눅스 설치시 옵션에 따라 아파치가 함께 설치된 경우도 있다.
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa httpd
[root@zetawiki ~]# rpm -qa httpd
httpd-2.2.15-15.el6.centos.1.x86_64
httpd-2.2.15-15.el6.centos.1.x86_64
</source>
</syntaxhighlight>
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# yum list httpd
[root@zetawiki ~]# yum list httpd
... (생략)
... (생략)
Installed Packages
Installed Packages
32번째 줄: 33번째 줄:
Available Packages
Available Packages
httpd.x86_64                    2.2.15-29.el6.centos                      updates       
httpd.x86_64                    2.2.15-29.el6.centos                      updates       
</source>
</syntaxhighlight>
:→ 리눅스 설치시 아파치 2.2.15-15 버전 설치됨. 2.2.15-29로 업그레이드 가능
:→ 리눅스 설치시 아파치 2.2.15-15 버전 설치됨. 2.2.15-29로 업그레이드 가능


==yum으로 설치==
==yum으로 설치==
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# yum install httpd
[root@zetawiki ~]# yum install httpd
... (생략)
... (생략)
==================================================================================================================
===========================================================================================
  Package                     Arch                 Version                             Repository             Size
  Package               Arch           Version                       Repository     Size
==================================================================================================================
===========================================================================================
Installing:
Installing:
  httpd                       x86_64               2.2.15-29.el6.centos               updates              821 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-5.el6_2                       base                 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                     base                   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                     base                   15 k
  apr-util-ldap         x86_64         1.3.9-3.el6_0.1               base           15 k
  httpd-tools                 x86_64               2.2.15-29.el6.centos               updates                73 k
  httpd-tools           x86_64         2.2.15-59.el6.centos           base          79 k
  mailcap                     noarch               2.1.31-2.el6                       base                   27 k
  mailcap               noarch         2.1.31-2.el6                   base           27 k


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


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


Dependency Installed:
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.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-29.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==
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# rpm -qa httpd
[root@zetawiki ~]# rpm -qa httpd
httpd-2.2.15-29.el6.centos.x86_64
httpd-2.2.15-55.el6.centos.x86_64
</source>
</syntaxhighlight>
<source lang='dos'>
[root@jmnote ~]# yum list httpd
... (생략)
Installed Packages
httpd.x86_64                                    2.2.15-29.el6.centos                                    @update
</source>


==서비스 시작==
==서비스 시작==
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# service httpd start
[root@zetawiki ~]# 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 localhost.localdomain for ServerName
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 111.222.33.44 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]] 문서 참고.


==재부팅시 자동 시작==
==재부팅시 자동 시작==
<source lang='dos'>
<syntaxhighlight lang='console'>
[root@jmnote ~]# chkconfig httpd on
[root@zetawiki ~]# chkconfig --list httpd
[root@jmnote ~]# 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
httpd          0:off 1:off 2:on 3:on 4:on 5:on 6:off
</source>
</syntaxhighlight>
:→ 재부팅시 자동시작하도록 설정되었다.
:→ 재부팅시 자동시작하도록 설정되었다.


==같이 보기==
==같이 보기==
*[[우분투 아파치 설치]]
*[[httpd]]
*[[httpd]]
*[[리눅스 MySQL 설치]]
*[[리눅스 APM 설치]]
*[[리눅스 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 }}