<Binary Versions>
Apache : 2.4.4
mod_wsgi : 3.4
Python : 2.7.3

<Binary Install>
1. Python 2.7.3
<의존 라이브러리 설치>
yum install gcc gdbm-devel readline-devel ncurses-devel zlib-devel bzip2-develsqlite-devel db4-devel openssl-devel tk-devel bluez-libs-devel

<Python 설치>
./configure --prefix=$HOME/python --with-threads --enable-shared
make && make install

<Profile에 환경변수 추가>
vi .bash_profile

PATH=$PATH:$HOME/python/bin:$HOME/python/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/python/lib:$HOME/python/bin
alias python='$HOME/python/bin/python2.7'

2. Apache 2.4.4
<Pre-requirement>
   - apr-1.4.6, apr-util-1.5.2 필요함
   - 위 2개의 파일을 httpd-2.4.4/srclib 폴더 아래에 압축 해제

<Apache Install>
./configure --prefix=$HOME/apache2 --with-included-apr
make && make install


3. mod_wsgi 3.4
<mod_wsgi 설치>
LD_LIBRARY_PATH=$HOME/python/lib  ./configure --with-apxs=$HOME/apache2/bin/apxs --with-python=$HOME/python/bin/python
make && make install

<mod_wsgi 설치 확인>
$HOME/apache2/modules/mod_wsgi.so가 있는지 확인
4. Apache 설정 변경
   vi httpd.conf
LoadModule wsgi_module modules/mod_wsgi.so

WSGIDaemonProcess daemon processes=2 threads=15
WSGIScriptAlias / /wsgi/file/path/test.py

<Directory />
     AddHandler wsgi-script .py
</Directory>
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://www.yongbi.net/rss/response/553

트랙백 주소 :: http://www.yongbi.net/trackback/553

트랙백 RSS :: http://www.yongbi.net/rss/trackback/553

댓글을 달아 주세요

댓글 RSS 주소 : http://www.yongbi.net/rss/comment/553
[로그인][오픈아이디란?]
오픈아이디로만 댓글을 남길 수 있습니다