Outils pour utilisateurs

Outils du site


server:chimere

Installation du service Chimère

Nous devons monter un serveur LAMP, pour cela je vous renvoie à l'article suivant: installer un serveur LAMP (Linux Apache Mysql PHP)

On poursuit avec l'installation des librairies nécessaires en commençant par python:

$ apt-get install python python-django python-psycopg2 python-imaging python-beautifulsoup libapache2-mod-python

Ensuite on s'occupe de l'installation du client postgresql

$ apt-get install postgresql-client

Pour finir, nous installons également les paquets suivants:

$ apt-get install tinymce proj gdal-bin libgeos-3.2.0 gettext

Installation du serveur PostgreSQL

Ensuite on s'occupe de l'installation de postgresql

$ apt-get install postgresql postgresql-8.4-postgis libgeos-3.2.0

Pour autoriser une connexion distante au serveur:

$ nano /etc/postgresql/8.4/main/pg_hba.conf
host    all         all         10.10.10.0/24        trust

Puis:

$ nano /etc/postgresql/8.4/main/postgresql.conf 
listen_addresses = '*'          # what IP address(es) to listen on;

/etc/init.d/postgresql restart

Tester la connexion distante au service:

$ psql -h 192.168.10.152 -U fleon -W chimere-fleon

Préparation du serveur Apache

Le répertoire d'install du service sera placé dans le répertoire /var/www/chimere/login/chimere-1.0.0

$ nano /etc/apache2/sites-enabled/vhost.conf
[...]
### ADDED FOR CHIMERE ###
        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        <Location "/chimere/">
                PythonPath "['/var/www/chimere/'+req.hostname.rsplit('.',3)[2]+'/chimere-1.1.0'] + sys.path"
                SetHandler python-program
                PythonHandler django.core.handlers.modpython
                SetEnv DJANGO_SETTINGS_MODULE chimere.settings
                PythonDebug On
                PythonInterpreter chimere
        </Location>
### END ADDED FOR CHIMERE ###

$ /etc/init.d/apache2 restart

Configurer la base de donnée

su postgres
createuser --echo --adduser --createdb --encrypted --pwprompt DBUSERNAME
createdb --echo --owner DBUSERNAME --encoding UNICODE chimere-DBUSERNAME Username Chimère database
createlang plpgsql chimere-DBUSERNAME
psql -d chimere-DBUSERNAME -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql
psql -d chimere-DBUSERNAME -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql

Récupérer les sources

wget http://www.peacefrogs.net/download/chimere -q -O -| html2text
****** Index of /download/chimere ******
[[ICO]] Name                      Last_modified     Size Description
===========================================================================
[[DIR]] Parent_Directory                              -
[[   ]] chimere-0.1-rev65.tar.bz2 17-Nov-2010 16:33  44K
[[   ]] chimere-1.0.0.tar.bz2     17-Nov-2010 16:51  53K
[[   ]] chimere-1.0.1.tar.bz2     17-Nov-2010 16:51  53K
[[   ]] chimere-1.0.2.tar.bz2     17-Nov-2010 16:51  53K
[[   ]] chimere-1.1.0.tar.bz2     04-Feb-2011 02:58 301K
===========================================================================
wget http://www.peacefrogs.net/download/chimere/chimere-1.1.0.tar.bz2
mkdir -p /var/www/chimere/USERNAME
tar xvjpf chimere-1.1.0.tar.bz2 -C /var/www/chimere/USERNAME
cd /var/www/chimere/USERNAME/
chown -R www-data:www-data chimere
cd chimere/chimere/

To be finished

Configuration

Changement de la carte d'accueil : par défaut, la ville de Brest est présentée. Modifier settings.py

DEFAULT_CENTER = (-4.4, 48.3)

Modifier le zoom en récupérant le dossier static dans :

 /var/www/chimere/frederic.leon/chimere_last/chimere/static

puis en modifiant le fichier static/main_map.js

zoom = 13
server/chimere.txt · Dernière modification : 2022/09/04 21:02 de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki