标题:Python_mod安装文档 出处:运维进行时 时间:Tue, 14 Aug 2007 22:24:53 +0000 作者: 地址:https://blog.liuts.com/post/9/ 内容: 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 AddHandler mod_python .py PythonHandler index PythonDebug On #cd /usr/local/apache/htdocs/python vi index.py from mod_python import apache def handler(req): req.write("Hello World!") return apache.OK 安装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 SetHandler python-program PythonPath "['/usr/local/apache/htdocs/python'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE newtest.settings PythonDebug On Generated by Bo-blog 2.1.1 Release