본문 바로가기
Language&FrameWorks/CI

apache2 설치 해보기(vm 설포함)

by 감마 2015. 9. 14.

Apache2.4 compile

centos 기준

  1. Download

  2. 포트 확인

    service iptables status
    iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT 
    iptables -I OUTPUT 1 -p tcp --dport 80 -j ACCEPT 
    service iptables start
    service iptables stop
    
  3. 의존 라이브러리 설치

    cd /usr/local/apache/httpd-2.4.2/srclib
    sudo apt-get install libapache2-mod-proxy-html
    wget https://centos.googlecode.com/files/apr-util-1.4.1.tar.gz
    wget https://centos.googlecode.com/files/apr-1.4.6.tar.gz
    mv apr-1.4.6 apr
    mv apr-util-1.4.1 apr-util
    yum install apr-devel apr-util-devel gcc pcre-devel.x86_64 zlib-devel openssl-devel
    
  4. install

    ./configure --prefix=/usr/local/apache --enable-mods-shared=most --enable-ssl --with-ssl=/usr/local/openssl --enable-modules=ssl --enable-rewrite --with-included-apr --with-included-apr-util --enable-deflate --enable-expires --enable-headers --enable-proxy --enable-mpms-shared=all
    make;make install
    
  5. 트러블 슈팅

    1. shm 에러

      AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
      AH01177: Failed to lookup provider 'shm' for 'slotmem': is 
      mod_slotmem_shm loaded??
      

      빌드 후 기동 시에 이런 메세지가 발생할 수 있습니다.

      httpd.conf 에서 아래 라인의 comment 를 제거하시면 됩니다.
      LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
      
    2. (98)Address already in use: AH00072: make_sock: could not bind to address

    • 기존 기동 중에 올라왔던 http 포트 프로세스 kill
      [root@stg bin]# ./apachectl start
      (98)Address already in use: AH00072: make_sock: could not bind to address 218.38.3.13:80
      no listening sockets available, shutting down
      AH00015: Unable to open logs
      [root@stg bin]# netstat -tunap | grep 80
      tcp        0      0 :::80                       :::*                        LISTEN      32000/httpd         
      [root@stg bin]# kill -9 32000
      [root@stg bin]# netstat -tunap | grep 80
      tcp        0      0 :::80                       :::*                        LISTEN      32001/httpd         
      [root@stg bin]# kill -9 32001
      [root@stg bin]# netstat -tunap | grep 80
      
  6. VM 설정

    • 아래처럼 계속 해서 추가 (/usr/local/apache/conf/http.conf)
      <VirtualHost 118.138.32.13:80>
      ServerName demo.innoquartz.com
                 ProxyPass / http://118.138.32.13:9090/
                 ProxyPassReverse / http://118.138.32.13:9090/
      </VirtualHost>
      
  7. 참고 출처


'Language&FrameWorks > CI' 카테고리의 다른 글

jenkins build periodically vs poll scm  (0) 2015.09.14
Oracle VM 설치시 32bit (centos)  (0) 2015.09.14
[Jetty] start & stop  (0) 2015.09.08
jekins 홈 변경  (0) 2015.09.08
[SVN] Visual SVN 소개  (0) 2014.08.21

댓글