Python_mod安装文档 不指定

, 2007/08/14 22:24 , Python , 评论(0) , 阅读(5759) , Via 本站原创 | |
Python2.4安装文档
#rpm -e python --nodeps
#tar -zxvf Python-2.4.2.tgz
#./configure
#make
#make install
#vi /etc/profile
引用
export PYTHONHOME=/usr/local
export PYTHONPATH=/usr/local/lib/python2.4
export PATH=$PATH:$PYTHONHOME

Python_mod安装文档
#gzip mod_python-3.1.4.tar
#tar -zxvf mod_python-3.1.4.tar.gz
#cd mod_python-3.1.4
#./configure --with-apxs=/usr/local/apache/bin/apxs
#make
#su
#make install
#vi /usr/local/apache/conf/httpd.conf
添加:LoadModule python_module modules/mod_python.so

<Directory /usr/local/apache/htdocs/python>
   AddHandler mod_python .py
   PythonHandler index
   PythonDebug On
</Directory>

#cd /usr/local/apache/htdocs/python
vi index.py

安装Django文档
Install Mysql-pythong
#tar -zxvf MySQL-python-1.2.0.tar.gz
#cd MySQL-python-1.2.0
#python setup.py build
#su
#python setup.py install
Install Django
#tar xzvf Django-0.91.tar.gz
#cd Django-0.91
#sudo python setup.py install
#vi httpd.conf

<Directory /usr/local/apache/htdocs/python>
   SetHandler python-program
   PythonPath "['/usr/local/apache/htdocs/python'] + sys.path"
   PythonHandler django.core.handlers.modpython
   SetEnv DJANGO_SETTINGS_MODULE newtest.settings
   PythonDebug On
</Directory>
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]