DenkzeitWiki

Suchen:

Aktuelle Änderungen Printable View Änderungen Bearbeiten

Maven > McCarthy > Memex > MemoryLeaks > MercurialHosting > Merging > MetaOCaml > OCaml > MichaelFeathers > MicroFormats > MicrosoftSQLServer > MindHacks > MixIns > MixIn > MockObjects > ModPythonHosts > ModPythonOnHrConceptsClear Trail
Main /

Mod Python On Hr Concepts

Python
ModPython
Django

Set up latest version of python in an own installation

 
 wget http://www.python.org/ftp/python/2.4.2/Python-2.4.2.tgz

 tar -zxvf Python-2.4.2.tgz
 cd Python-2.4.2

 ./configure --prefix=$HOME/lib --enable-unicode=ucs4
 make
 make install

 mkdir $HOME/bin
 mkdir $HOME/bin/python
 mkdir $HOME/bin/python/bin

 ln -s $HOME/lib/bin/python $HOME/bin/python/bin/python

 cd ~
 emacs .bash_profile

 export PATH=$HOME/bin/python/bin:$HOME/lib/bin:$PATH

 source ~/.bash_profile
 

Check installation

 
 login@server:~$ python
 Python 2.4.2 (#1, Mar 13 2006, 07:53:35)
 [GCC 2.95.4 20011002 (Debian prerelease)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>>

Install ModPython

 
 wget http://apache.imsam.info/httpd/modpython/mod_python-2.7.11.tgz

 tar -zxvf mod_python-2.7.11.tgz
 cd mod_python-2.7.11

 ./configure or, if this does not do the trick, be more specific:
 ./configure --with-apxs=/usr/bin/apxs --with-python=$HOME/bin/python/bin/
 ./configure --with-apxs=/usr/bin/apxs --with-python=$HOME/Python-2.4.2
 make dso   # this will create the .so-file
 make install_py_lib   #('make install' will not work without being 'root')
 
 >>> import mod_python.psp
 python -c "import mod_python.psp"

 LoadModule python_module $HOME/mod_python-2.7.11/src/mod_python.so

 rc httpd reload [2]

Django


 
 mkdir local
 cd local

 wget http://www.djangoproject.com/download/0.91/tarball/
 tar xzvf Django-0.91.tar.gz
 mv Django-0.91 django_src
 rm Django-0.91.tar.gz

 mkdir django-projects

 edit .bash_profile...
 export PATH=$PATH:$HOME/local/django_src/django/bin
 export PYTHONPATH=$PYTHONPATH:$HOME/local/:$HOME/local/django_src/:$HOME/doms/YOUR_PATH_HERE/django-projects
 

 python -c "import django.core"

Edit - BackLinks - Tags - Page Hist - Print - Changes - Home - Orphans - Help

Zuletzt geändert am 13.03.2006 13:30 Uhr und seit 7. April 2005 673 aufgerufen.