Blog entries

  • HOWTO quickly get lax running on linux

    2008/05/19 by Arthur Lutz

    This is how easy it is to get lax to run on your linux machine :

    hg clone http://www.logilab.org/hg/lax/
    wget http://googleappengine.googlecode.com/files/google_appengine_1.0.2.zip
    unzip google_appengine_1.0.2.zip
    ./google_appengine/dev_appserver.py lax/skel/
    

    Point your favorite browser to http://localhost:8080/

    UPDATE: LAX is now included in the CubicWeb semantic web framework.


  • Install Python Cartographic Library

    2006/12/07 by Nicolas Chauvat

    This is how we setup PCL <http://trac.gispython.org/projects/PCL> under debian. Of course having a package would be better...

    Install dependencies

    apt-get install mapserver-bin python-mapscript mapserver-cgi
    gdal-bin python-gdal python-dev libgeos-dev libgdal-dev
    libgd2-xpm-dev python-setuptools zope-interface
    python-elementtree
    

    Now link libgdal.a to libgdal1.3.2.a

    Install PCL from sources

    svn co  http://svn.gispython.org/svn/gispy/PCL/trunk
    
    cd PCL/
    
    cd externals/OWSLib
    python setup.py install --prefix=my_python_library
    
    cd externals/QuadTree
    python setup.py install --prefix=my_python_library
    
    cd PCL-Core
    python setup.py install --prefix=my_python_library
    
    cd PCL-GDAL
    python setup.py install --prefix=my_python_library
    
    cd PCL-MapServer
    

    Put in a directory the source code of mapserver corresponding to the package version installed above. Get it from http://mapserver.gis.umn.edu/download or with dpkg-src.

    Edit setup.py to set ms_home to the path of the above mapserver sources.

    python setup.py install --prefix=my_python_library
    

    my_python_library now contains Python eggs and directories with Python and C libraries.


  • Profiter pleinement des CPUs avec Zope/Zeo/Debian

    2008/05/27 by Arthur Lutz

    Voici vite fait comment on profite du quad-core bi-proc multicoeurs avec zope/zeo/pound ... le tout en commandes debian.

    Inspiré de : http://plone.org/documentation/how-to/simple-zope-clustering-with-squid-and-pound

    http://plone.org/documentation/tutorial/introduction-to-the-zodb/zeo%20diagram.png
    • apt-get -uVf install plone-site pound

    • dzhandle -z 2.10 make-zeoinstance sgel_zeo

    • dzhandle -z 2.10 make-instance sgel2 --zeo-server=localhost:8100 -m all

    • dzhandle -z 2.10 make-instance sgel3 --zeo-server=localhost:8100 -m all

    • dzhandle -z 2.10 make-instance sgel1 --zeo-server=localhost:8100 -m all

    • dzhandle -z 2.10 make-instance sgel4 --zeo-server=localhost:8100 -m all

    • modifiez les ports de chaque instance (par exemple 9673, 9674, 9675, 9676)

    • vim ~/zope/instances/sgel*/etc/zope.conf

    • dzhandle add-product sgel1 CMFPlone

    • dzhandle add-product sgel2 CMFPlone

    • dzhandle add-product sgel3 CMFPlone

    • dzhandle add-product sgel4 CMFPlone

    • dzhandle zeoctl sgel_zeo start

    • dzhandle zopectl sgel1 start

    • dzhandle zopectl sgel2 start

    • dzhandle zopectl sgel3 start

    • dzhandle zopectl sgel4 start

    • vim /etc/pound/pound.cfg pour remplacer

      BackEnd
              Address 127.0.0.1
              Port    8080
      End
      

      par

      Service
              BackEnd
                      Address 127.0.0.1
                      Port    9673
              End
              BackEnd
                      Address 127.0.0.1
                      Port    9674
              End
              BackEnd
                      Address 127.0.0.1
                      Port    9675
              End
              BackEnd
                      Address 127.0.0.1
                      Port    9676
              End
      End
      
    • /etc/init.d/pound restart

    • tapez sur http://localhost:8080

    • ajoutez un site plone

    pour tester, lancez htop pour voir l'activité et regardez la différence entre :

    • apt-get -uVf install apache2-utils
    • /usr/sbin/ab -n 100 -c 100 localhost:8080/plone

    et

    • /usr/sbin/ab -n 100 -c 100 localhost:9673/plone

    nice!