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

잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight ))
11번째 줄: 11번째 줄:
===예시 (설치안됨)===
===예시 (설치안됨)===
*CentOS 6.0 최소 설치한 예
*CentOS 6.0 최소 설치한 예
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa httpd
[root@zetawiki ~]# rpm -qa httpd
[root@zetawiki ~]# yum list httpd
[root@zetawiki ~]# yum list httpd
22번째 줄: 22번째 줄:
===예시 (설치됨)===
===예시 (설치됨)===
*리눅스 설치시 옵션에 따라 아파치가 함께 설치된 경우도 있다.
*리눅스 설치시 옵션에 따라 아파치가 함께 설치된 경우도 있다.
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# 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>
</source>
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# yum list httpd
[root@zetawiki ~]# yum list httpd
... (생략)
... (생략)
37번째 줄: 37번째 줄:


==yum으로 설치==
==yum으로 설치==
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# yum install httpd
[root@zetawiki ~]# yum install httpd
... (생략)
... (생략)
60번째 줄: 60번째 줄:
Is this ok [y/N]: y
Is this ok [y/N]: y
</source>
</source>
<source lang='console'>
<syntaxhighlight lang='console'>
... (생략)
... (생략)
Installed:
Installed:
74번째 줄: 74번째 줄:


==확인 2==
==확인 2==
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# rpm -qa httpd
[root@zetawiki ~]# rpm -qa httpd
httpd-2.2.15-55.el6.centos.x86_64
httpd-2.2.15-55.el6.centos.x86_64
80번째 줄: 80번째 줄:


==서비스 시작==
==서비스 시작==
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# service httpd start
[root@zetawiki ~]# service httpd start
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 localhost.localdomain for ServerName
88번째 줄: 88번째 줄:


==재부팅시 자동 시작==
==재부팅시 자동 시작==
<source lang='console'>
<syntaxhighlight lang='console'>
[root@zetawiki ~]# chkconfig --list httpd
[root@zetawiki ~]# chkconfig --list httpd
httpd          0:off 1:off 2:off 3:off 4:off 5:off 6:off
httpd          0:off 1:off 2:off 3:off 4:off 5:off 6:off

2020년 11월 2일 (월) 00:40 판

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

1 확인

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

1.1 예시 (설치안됨)

  • CentOS 6.0 최소 설치한 예

<syntaxhighlight lang='console'> [root@zetawiki ~]# rpm -qa httpd [root@zetawiki ~]# yum list httpd ... (생략) Available Packages httpd.x86_64 2.2.3-83.el5.centos updates </source>

→ 설치되지 않음. yum으로 설치 가능

1.2 예시 (설치됨)

  • 리눅스 설치시 옵션에 따라 아파치가 함께 설치된 경우도 있다.

<syntaxhighlight lang='console'> [root@zetawiki ~]# rpm -qa httpd httpd-2.2.15-15.el6.centos.1.x86_64 </source> <syntaxhighlight lang='console'> [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 </source>

→ 리눅스 설치시 아파치 2.2.15-15 버전 설치됨. 2.2.15-29로 업그레이드 가능

2 yum으로 설치

<syntaxhighlight lang='console'> [root@zetawiki ~]# yum install httpd ... (생략)

2.1 ===============================================================================
Package                Arch            Version                        Repository     Size
2.2 ===============================================================================

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

2.3 ===============================================================================

Install 6 Package(s)

Total download size: 1.1 M Installed size: 3.7 M Is this ok [y/N]: y </source> <syntaxhighlight lang='console'> ... (생략) 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! </source>

3 확인 2

<syntaxhighlight lang='console'> [root@zetawiki ~]# rpm -qa httpd httpd-2.2.15-55.el6.centos.x86_64 </source>

4 서비스 시작

<syntaxhighlight lang='console'> [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  ]

</source>

→ 이렇게 나오면 정상이다. 그대로 두어도 문제는 없지만, 경고메시지를 없애고 싶다면 Could not reliably determine the server's fully qualified domain name 문서 참고.

5 재부팅시 자동 시작

<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 </source>

→ 재부팅시 자동시작하도록 설정되었다.

6 같이 보기

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