CentOS 5.4 Apache + Python + Mod Python 설치 :: 2013/03/27 13:59

1. Apache 2.2.24 설치
   ./configure --prefix=$HOME/apache2 --with-include-apr
   make && make install

2. Python 2.7.3 설치
   ./configure --prefix=$HOME/python --with-threads --enable-shared
   make && make install
   ==> 설치 완료 후 profile에 LB_LIBRARY_PATH, PATH 추가
         LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/python/lib:$HOME/python/bin
         PATH=$PATH:$HOME/python/bin

3. mod_python 3.3.1 설치
  ./configure --prefix=$HOME/mod_python --with-apxs=$HOME/apache2/bin/apxs --with-python=$HOME/python/bin/python2.7
  make && make install

4. Apache httpd.conf 파일 수정
         (파일 내용 수정)
         Listen 80 => Listen 8080
         <IfModule dir_module>
             DirectoryIndex index.html => DirectoryIndex gateway.py
         </IfModule>

         (맨 아래에 추가)

LoadModule python_module modules/mod_python.so


<Directory /home/yongbi/apache2/htdocs>

    AddHandler mod_python .py

    PythonHandler gateway

    PythonDebug On

</Directory>

<Location />

    SetHandler mod_python

</Location>



2013/03/27 13:59 2013/03/27 13:59
Trackback Address :: http://www.yongbi.net/trackback/543
[로그인][오픈아이디란?]
오픈아이디로만 댓글을 남길 수 있습니다
Name
Password
Homepage

Secret
< PREV |  1  |  ...  245  |  246  |  247  |  248  |  249  |  250  |  251  |  252  |  253  |  ...  566  |  NEXT >