./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>
댓글을 달아 주세요
댓글 RSS 주소 : http://www.yongbi.net/rss/comment/543