[INSTALL] 나도 Trac을 써보자! Apache-2.2.2/SVN-1.3.1/Trac-0.9.5/FastCGI (2) - apache 설치

* 이 글은 2005년 5월 20일 ~ 5월 27일간 겪었던 것 중 쓸데없는 것을빼고 필요한 것만 넣은 것이다. 시간이 훨씬 지난 후에 이 글을 참고하게 될 경우 그냥 참고만 한다. 설치 방법이나 키워드등이 바뀐것이 있을 수 있기 때문이다.

이 글에 있는 내용.

   - 1. apche 설치


1. Apache 설치
  (1) 소스 다운로드 및 컴파일 준비
    소스 다운 받기. lynx http://httpd.apache.org/download.cgi (뭐 다른 브라우저도 상관없다. 아무걸로나 받자)
    압축 해제 tar xvjf httpd-2.2.2.tar.bz2
    소스 디렉터리로 이동 cd httpd-2.2.2
  (2) 서버의 정확한 시간 설정
    ntpdate time.kriss.re.kr 정도는 한번 해 주자. 당연히 ntpdate-clinet 를 부팅시 자동 실행되게 해두었다면 패스. 혹시나 그런 류가 없다면 다음을 해본다. (물론 젠투 기준이다)
        emerge ntp
        nano -w /etc/conf.d/ntp-clinet
          NTPCLIENT_OPTS=" -b -u time.kriss.re.kr" 정도로 수정
        rc-update add ntp-client default
        (일단 한번 실행해주자 ntpdate time.kriss.re.kr)
  (3) apr , apr-util 컴파일 및 설치
    apr 이나 apr-util 은 apache 소스에 딸려온다. 같이 설치 해주면 된다. 업그레이드를 해야 하는 경우라면, 아파치 사이트나 다른 문서들을 참고한다. 여기서는 웹서버 없는 시스템에 새로 설치한다고 가정하고 진행한다.
    여기서 gentoo의 그것(?) 을 좀 가져와 보자.
      /usr/portage/net-www/apache/files/common 디렉터리에는 파일이 세개 있고 아래는 그중 apr, apr-util 에 관련된 내용이다.

apr-config.layout

<Layout Gentoo>
  prefix:          /usr
  exec_prefix:     /usr
  bindir:          /usr/bin
  sbindir:         /usr/sbin
  libdir:          /usr/lib
  libexecdir:      /usr/lib/apache2/modules
  mandir:          /usr/share/man
  sysconfdir:      /etc/apache2/conf
  datadir:         /data/www/localhost
  installbuilddir: /usr/lib/apache2/build
  includedir:      /usr/include/apache2
  localstatedir:   /var
  libsuffix:       -${APR_MAJOR_VERSION}
</Layout>

apr-util-config.layout

<Layout Gentoo>
  prefix:          /usr
  exec_prefix:     /usr
  bindir:          /usr/bin
  sbindir:         /usr/sbin
  libdir:          /usr/lib
  libexecdir:      /usr/lib/apache2/modules
  mandir:          /usr/share/man
  sysconfdir:      /etc/apache2/conf
  datadir:         /data/www/localhost
  installbuilddir: /usr/lib/apache2/build
  includedir:      /usr/include/apache2
  localstatedir:   /var
  libsuffix:       -${APRUTIL_MAJOR_VERSION}
</Layout>
      기본적으로 디렉터리 구성이 구비되어 있다. /var/www 만 /data/www 로 변경하고 나머진 그대로 쓰도록 하겠다.

    - apr 설치
        cd srclib/apr
        vi config.layout            * 위의  apr-config.layout 파일 내용을 추가한다.
        ./configure --enable-layout=Gentoo --datadir=/usr/share/apr-1 --enable-threads --enable-nonportable-atomics
            * --disable-ipv6 옵션은 사용하면 안된다. 현재 2.2.2 버전에서는 apache 컴파일시 에러가 발생한다.
              network_io/unix/multicast.c 파일을 수정 하던가 --disable-ipv6 옵션을 사용하지 않는다.
              필자는 --disable-ipv6 를 사용하지 않은 것으로 했다.
        make
        make install

    - apr-util 설치
            
        cd ../apr-util
        vi config.layout            * 위의  apr-util-config.layout 파일 내용을 추가한다.
        ./configure --enable-layout=Gentoo --datadir=/usr/share/apr-util-1 --with-apr=/usr --with-dbm-db43 --with-berkeley-db=/usr/include/db4.3:/usr/lib
            * --with-apr 은 prefix 를 입력하는 것이다. 설치된 경로를 다 쓰는 것이 아님을 주의한다.
            * --with-berkeley-db를 해주지 않으면 subversion 을 apache 와 연동하는 형태로 설치시 에러가난다.
            * berkeley 의 철자에 주의. berkeley 를 berkley 로 쓰고선 정확히 4일동안 DB4 가 링크가 안걸려 인터넷의 바다에서 표류했었다.
              (남들은 같은 옵션으로 다 되는데 나는 왜 안될까.. 이러면서... -_-a)
            * berkeley DB 의 헤더 파일과 라이브러리 파일이 /usr/include/db4.3 와 /usr/lib 에 설치되어있다. 따라서 명확히 해주기 위해 위와같이 지정하였다.
            * DBD 의 경우 apache 기동시

[crit] (70023)This function has not been implemented on this platform: DBD: driver for  not available
[crit] (70023)This function has not been implemented on this platform: DBD: failed to initialise

            이런 메시지가 출력된다. apache 작동은 잘 되는데.. 뭔가 문제가 있긴 할 것 같지만 svn 과의 연동 땜시 어쩔 수 없이 그냥 간다.

        make
        make install

======================= 추가 내용 ===========================

[crit] (70023)This function has not been implemented on this platform: DBD: driver for not available
[crit] (70023)This function has not been implemented on this platform: DBD: failed to initialise

는 httpd.conf 파일에서 LoadModule dbd_module modules/mod_dbd.so 를 주석 처리 하니깐 발생 안하네요. media wiki 설치할 때 이것땜에 고생했는데 이걸 빼니 그냥 되더군요. -_-a

덧글

덧글 입력 영역


구글애드센스