블로그 이미지
랜달프

calendar

1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

Notice

    2009. 2. 10. 11:29 Linux

    # /etc/init.d/httpd stop

    이제 기존에 설치되어 있는 웹서버의 RPM을 검색해보자.

    # rpm -qa | grep http

    httpd-2.0.52-12.ent.centos4
    httpd-suexec-2.0.52-12.ent.centos4
    system-config-httpd-1.3.1-1

    검색되어진 RPM을 삭제한다.

    # rpm -e --nodeps httpd-2.0.52-12.ent.centos4
    # rpm -e --nodeps httpd-suexec-2.0.52-12.ent.centos4
    # rpm -e --nodeps system-config-httpd-1.3.1-1

    (--nodeps는 의존성을 무시하고 강제로 삭제하도록 하는 속성이다.)


    apache 사이트에 방문해서  httpd-2.0.54.tar.gz 파일을 다운로드 받아 /usr/local/src 라는 폴더에 저장

    # cd /usr/local/src

    파일의 압축을 해제한다.
    # tar xvfz httpd-2.0.54.tar.gz

    압축해제된 폴더로 들어간다.
    # cd httpd-2.0.54

    configure를 실행한다. 설치될 폴더는 /usr/local/apache 이다.
    # ./configure --prefix=/usr/local/apache --enable-rule=SHARED_CORE --enable-modules=so --enable-so

    ==[참고로 1.3 버전일경우]==
    # ./configure --prefix=/usr/local/apache --enable-rule=SHARED_CORE --enable-module=so


    configure가 무사히 끝났다면 컴파일하여 설치한다.
    # make && make install

    시간이 좀 소요될 것이다. 설치가 끝났다면 잘~ 설치되었는지 테스트 해보자.
    # /usr/local/apache/bin/apachectl start


    이제 브라우저 창에서 http://localhost 이라 입력하면 apache 페이지가 나타날 것이다.
    테스트에 성공했으면 서비스를 중단한다.
    # /usr/local/apache/bin/apachectl stop

    서버시작시 자동으로 실행될 수 있도록 하자.
    # cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
    # ln -s ../init.d/httpd /etc/rc.d/rc0.d/K90httpd
    # ln -s ../init.d/httpd /etc/rc.d/rc3.d/S89httpd
    # ln -s ../init.d/httpd /etc/rc.d/rc5.d/S89httpd


    이제 설정파일을 변경하자.


    # vi /usr/local/apache/conf/httpd.conf
    =======================================================================================
    servername test.com (주석해제 후 변경)

    AddDefaultCharset euc_kr (추가)
    =======================================================================================
    [출처] [CentOS] Apache 2 서버설치|작성자 발도제

     



     

    posted by 랜달프