diff options
Diffstat (limited to 'docs/_build/html/install.html')
-rw-r--r-- | docs/_build/html/install.html | 403 |
1 files changed, 0 insertions, 403 deletions
diff --git a/docs/_build/html/install.html b/docs/_build/html/install.html deleted file mode 100644 index 571efe7..0000000 --- a/docs/_build/html/install.html +++ /dev/null @@ -1,403 +0,0 @@ - - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - - <title>Installation — Chimère 2.0 documentation</title> - - <link rel="stylesheet" href="_static/default.css" type="text/css" /> - <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> - - <script type="text/javascript"> - var DOCUMENTATION_OPTIONS = { - URL_ROOT: '', - VERSION: '2.0', - COLLAPSE_INDEX: false, - FILE_SUFFIX: '.html', - HAS_SOURCE: true - }; - </script> - <script type="text/javascript" src="_static/jquery.js"></script> - <script type="text/javascript" src="_static/underscore.js"></script> - <script type="text/javascript" src="_static/doctools.js"></script> - <link rel="top" title="Chimère 2.0 documentation" href="index.html" /> - <link rel="next" title="Upgrade" href="upgrade.html" /> - <link rel="prev" title="Welcome to Chimère’s documentation!" href="index.html" /> - </head> - <body> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - accesskey="I">index</a></li> - <li class="right" > - <a href="upgrade.html" title="Upgrade" - accesskey="N">next</a> |</li> - <li class="right" > - <a href="index.html" title="Welcome to Chimère’s documentation!" - accesskey="P">previous</a> |</li> - <li><a href="index.html">Chimère 2.0 documentation</a> »</li> - </ul> - </div> - - <div class="document"> - <div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body"> - - <div class="section" id="installation"> -<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Author:</th><td class="field-body">Étienne Loks</td> -</tr> -<tr class="field-even field"><th class="field-name">date:</th><td class="field-body">2012-10-08</td> -</tr> -<tr class="field-odd field"><th class="field-name">Copyright:</th><td class="field-body">CC-BY 3.0</td> -</tr> -</tbody> -</table> -<p>This document presents the installation of Chimère. -It has been updated for version 2.0.0.</p> -<div class="section" id="prerequisites"> -<h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2> -<blockquote> -<div><ul class="simple"> -<li><a class="reference external" href="http://www.apache.org/">apache</a> version 2.x</li> -<li><a class="reference external" href="http://www.python.org/">python</a> versions 2.6 or 2.7</li> -<li><a class="reference external" href="http://www.djangoproject.com/">django</a> >= version 1.4</li> -<li><a class="reference external" href="http://south.aeracode.org/">south</a></li> -<li><a class="reference external" href="http://www.postgresql.org/">postgres</a> >= version 8.x</li> -<li><a class="reference external" href="http://www.gnu.org/software/gettext/">gettext</a></li> -<li><a class="reference external" href="http://freshmeat.net/projects/psycopg/">psycopg2</a></li> -<li><a class="reference external" href="http://www.pythonware.com/products/pil/">Python Imaging Library</a></li> -<li><a class="reference external" href="http://tilloy.net/dev/pyexiv2/">pyexiv2</a></li> -<li><a class="reference external" href="http://www.crummy.com/software/BeautifulSoup/">Beautiful Soup</a></li> -<li>python-simplejson</li> -<li>python-gdal</li> -<li><a class="reference external" href="http://lxml.de/">lxml</a></li> -<li><a class="reference external" href="http://jquery.com/">jquery</a> version 1.7.1 or better</li> -<li><a class="reference external" href="http://jqueryui.com/">jquery-ui</a></li> -<li><a class="reference external" href="https://code.google.com/p/feedparser/">Universal Feed Parser</a></li> -</ul> -</div></blockquote> -<p>geodjango is a part of django since version 1.0 but it has some specific -(geographically related) additional dependencies:</p> -<blockquote> -<div><ul class="simple"> -<li><a class="reference external" href="http://trac.osgeo.org/geos/">geos</a> 3.0.x</li> -<li><a class="reference external" href="http://trac.osgeo.org/proj/">proj.4</a> 4.4 to 4.6</li> -<li><a class="reference external" href="http://postgis.refractions.net/">postgis</a> versions 1.2.1 or 1.3.x</li> -<li><a class="reference external" href="http://www.gdal.org/">gdal</a></li> -</ul> -</div></blockquote> -<p>Optionaly (but recommanded):</p> -<blockquote> -<div><ul class="simple"> -<li><a class="reference external" href="http://tinymce.moxiecode.com/">tinymce</a></li> -<li><a class="reference external" href="http://www.gpsbabel.org/">gpsbabel</a></li> -<li>django-celery if you want to manage large imports</li> -</ul> -</div></blockquote> -<p>The simpliest way to obtain these packages is to get them from your favorite -Linux distribution repositories. For instance on Debian Wheezy:</p> -<div class="highlight-python"><pre>apt-get install apache2 python python-django python-django-south \ - postgresql-9.1 gettext python-psycopg2 python-imaging \ - python-pyexiv2 python-beautifulsoup python-simplejson python-gdal \ - javascript-common python-lxml libjs-jquery libjs-jquery-ui \ - python-feedparser libgeos-3.3.3 proj-bin postgresql-9.1-postgis \ - gdal-bin tinymce gpsbabel python-django-celery</pre> -</div> -<p>On Debian Squeeze (you need to activate backports):</p> -<div class="highlight-python"><pre>apt-get install -t squeeze-backports python-django libjs-jquery - -apt-get install apache2 python python-django python-django-south \ - postgresql-8.4 gettext python-psycopg2 python-imaging \ - python-pyexiv2 python-beautifulsoup python-simplejson python-gdal \ - javascript-common python-lxml libjs-jquery libjs-jquery-ui \ - python-feedparser libgeos-3.2.0 proj-bin postgresql-8.4-postgis \ - gdal-bin tinymce gpsbabel</pre> -</div> -<p>The package <em>python-django-celery</em> doesn’t exist for Debian Squeeze.</p> -<p>If these packages do not exist in your distribution’s repository, please refer -to the applications’ websites.</p> -</div> -<div class="section" id="database-configuration"> -<h2>Database configuration<a class="headerlink" href="#database-configuration" title="Permalink to this headline">¶</a></h2> -<p>Now that postgres and postgis are installed, you need to create a new user for -Chimère:</p> -<div class="highlight-python"><pre>su postgres -createuser --echo --adduser --createdb --encrypted --pwprompt chimere-user</pre> -</div> -<p>Then, you have to create the database and initialize the geographic types (adapt -the paths accordingly to your needs):</p> -<div class="highlight-python"><pre>PG_VERSION=9.1 # 8.4 for debian Squeeze -createdb --echo --owner chimere-user --encoding UNICODE chimere "My Chimère database" -createlang plpgsql chimere # only necessary on Debian Squeeze -psql -d chimere -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-1.5/postgis.sql -psql -d chimere -f /usr/share/postgresql/$PG_VERSION/contrib/postgis-1.5/spatial_ref_sys.sql</pre> -</div> -</div> -<div class="section" id="installing-the-sources"> -<h2>Installing the sources<a class="headerlink" href="#installing-the-sources" title="Permalink to this headline">¶</a></h2> -<div class="admonition note"> -<p class="first admonition-title">Note</p> -<p class="last">If you are considering to contribute on Chimère get the Git master.</p> -</div> -<p>Choose a path to install your Chimère:</p> -<div class="highlight-python"><pre>INSTALL_PATH=/var/local/django -mkdir $INSTALL_PATH</pre> -</div> -<div class="section" id="from-an-archive"> -<h3>From an archive<a class="headerlink" href="#from-an-archive" title="Permalink to this headline">¶</a></h3> -<p>The last “stable” version is available in this <a class="reference external" href="http://www.peacefrogs.net/download/chimere/">directory</a>. -Take care of getting the last version in the desired X.Y branch (for instance -the last version for the 1.0 branch is version 1.0.2).:</p> -<div class="highlight-python"><pre>wget http://www.peacefrogs.net/download/chimere -q -O -| html2text -(...) -[[ ]] 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 -(...) - -wget http://www.peacefrogs.net/download/chimere/chimere-1.0.2.tar.bz2</pre> -</div> -<p>Download, unpack and move the files in an apache user (www-data for Debian) -readable directory:</p> -<div class="highlight-python"><pre>cd $INSTALL_PATH -tar xvjf chimere-last.tar.bz2 -chown -R myusername:www-data chimere</pre> -</div> -</div> -<div class="section" id="from-the-git-repository"> -<h3>From the Git repository<a class="headerlink" href="#from-the-git-repository" title="Permalink to this headline">¶</a></h3> -<p>Another solution is to get it from the Git repository:</p> -<div class="highlight-python"><pre>cd $INSTALL_PATH -git clone git://www.peacefrogs.net/git/chimere -cd chimere -git tag -l # list tagged versions -git checkout v2.0 # checkout the desired version</pre> -</div> -</div> -</div> -<div class="section" id="creating-a-custom-project-template"> -<h2>Creating a custom project template<a class="headerlink" href="#creating-a-custom-project-template" title="Permalink to this headline">¶</a></h2> -<p>There, a default project is provided (<em>example_project</em>). Copy and modify -it (or get another project based on Chimère):</p> -<div class="highlight-python"><pre>cd $INSTALL_PATH/chimere -cp -ra example_project mychimere_project</pre> -</div> -<p>Your project name is used for the name of the Python package of your template. -As a Python package it should follow the rule of Python variable name: -it must contain at least one letter and can have a string of numbers, letters and -underscores (“_”) to any length. Don’t use accentuated letters. Don’t begin the -name by “_” because it has special significance in Python.</p> -<p>In your Chimère application directory create <em>local_settings.py</em> to fit to your -configuration. -A base template is provided (<em>local_settings.py.example</em>) and short descriptions -of the more relevant fields are given below (at least check them). Most of -these settings are initialized in <em>settings.py</em>.</p> -<div class="highlight-python"><pre>cd $INSTALL_PATH/chimere/mychimere_project -cp local_settings.py.sample local_settings.py -vim local_settings.py</pre> -</div> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field-odd field"><th class="field-name">Fields:</th><td class="field-body"><ul class="first last simple"> -<li>DATABASES: parameters for the database</li> -<li>PROJECT_NAME: name of the project</li> -<li>SECRET_KEY: a secret key for a particular Django installation. This is -used to provide cryptographic signing, and should be set to a unique, -unpredictable value. <strong>Change it!</strong></li> -<li>ROOT_URLCONF: url configuration for your project something like: -‘mychimere_project.urls’</li> -<li>EMAIL_HOST: smtp of an email server to send emails</li> -<li>TINYMCE_URL: url to tinymce path (default is appropriate for a Debian -installation with tinymce package installed)</li> -<li>JQUERY_JS_URLS: list of jquery and jquery-ui javascript urls (default is -appropriate for a Debian installation with libjs-jquery libjs-jquery-ui -packages installed)</li> -<li>JQUERY_CSS_URLS: list of jquery and jquery-ui CSS urls (default is -appropriate for a Debian installation with libjs-jquery libjs-jquery-ui -packages installed)</li> -<li>GPSBABEL: path to gpsbabel (default is appropriate for a Debian -installation with gpsbabel package installed)</li> -<li>TIME_ZONE: local time zone for this installation</li> -<li>LANGUAGE_CODE: language code for this installation</li> -</ul> -</td> -</tr> -</tbody> -</table> -<p>Manage media path permission:</p> -<div class="highlight-python"><pre>cd $INSTALL_PATH/chimere/mychimere_project -chown -R user:www-data media -chmod -R g+w media</pre> -</div> -<p>Create log file:</p> -<div class="highlight-python"><pre>mkdir /var/log/django -touch /var/log/django/chimere.log -chown -R root:www-data /var/log/django/ -chmod -R g+w /var/log/django/</pre> -</div> -<p>Regroup static files in one path:</p> -<div class="highlight-python"><pre>cd $INSTALL_PATH/chimere/mychimere_project -./manage.py collectstatic</pre> -</div> -</div> -<div class="section" id="compiling-languages"> -<h2>Compiling languages<a class="headerlink" href="#compiling-languages" title="Permalink to this headline">¶</a></h2> -<p>If your language is available in the directory <em>chimere/locale/</em>, you will just -need to get it compiled. This can be done with the following command (here, -<strong>fr</strong> stands for French, replace it with the appropriate language code):</p> -<div class="highlight-python"><pre>cd $INSTALL_PATH/chimere/chimere/ -django-admin compilemessages -l fr</pre> -</div> -<p>If your language is not available, feel free to create the default po file and -to submit it, contributions are well appreciated. Procedure is as follows:</p> -<p>You first need to create the default po file (of course, replace <strong>fr</strong> -according to the language you choose to create):</p> -<div class="highlight-python"><pre>django-admin makemessages -l fr</pre> -</div> -<p>There should now be a <em>django.po</em> file in <em>locale/fr/LC_MESSAGES</em>. Complete it -with your translation.</p> -<p>Now that the translation file is completed, just compile it the same way you -would have if the language file was already available.</p> -</div> -<div class="section" id="database-initialisation"> -<h2>Database initialisation<a class="headerlink" href="#database-initialisation" title="Permalink to this headline">¶</a></h2> -<p>Create the appropriate tables (still being in your Chimère project directory):</p> -<div class="highlight-python"><pre>cd $INSTALL_PATH/chimere/mychimere_project -./manage.py syncdb</pre> -</div> -<p>You will be prompted for the creation of an administrator account -(administration can be found at: <a class="reference external" href="http://where_is_chimere/admin/">http://where_is_chimere/admin/</a>). Then you have -to create tables managed with Django-South:</p> -<div class="highlight-python"><pre>./manage.py migrate</pre> -</div> -<p>The database is set, congratulations!</p> -<p>If you want to populate your installation with default data (don’t do this on -an already populated instance!):</p> -<div class="highlight-python"><pre>./manage.py loaddata ../chimere/fixtures/default_data.json</pre> -</div> -</div> -<div class="section" id="webserver-configuration"> -<h2>Webserver configuration<a class="headerlink" href="#webserver-configuration" title="Permalink to this headline">¶</a></h2> -<div class="section" id="apache-configuration-with-mod-wsgi"> -<h3>Apache configuration with mod_wsgi<a class="headerlink" href="#apache-configuration-with-mod-wsgi" title="Permalink to this headline">¶</a></h3> -<p>Install <em>mod_wsgi</em> for Apache:</p> -<div class="highlight-python"><pre>apt-get install libapache2-mod-wsgi</pre> -</div> -<p>Create and edit a configuration for Chimère:</p> -<div class="highlight-python"><pre>cp $INSTALL_PATH/chimere/apache/django.wsgi \ - $INSTALL_PATH/chimere/apache/mydjango.wsgi -vim $INSTALL_PATH/chimere/apache/mydjango.wsgi -cp $INSTALL_PATH/chimere/apache/apache-wsgi.conf \ - /etc/apache2/sites-available/chimere -vim /etc/apache2/sites-available/chimere -# create log dir -mkdir /var/log/apache2/chimere/ -chown www-data /var/log/apache2/chimere/</pre> -</div> -<p>Adapt the files <em>mydjango.wsgi</em> (with the correct sys path and the correct -module) and Apache <em>chimere</em> (with the correct servername and correct paths).</p> -<p>To activate the website, reload apache:</p> -<div class="highlight-python"><pre>a2ensite chimere -/etc/init.d/apache2 reload</pre> -</div> -<p>If you encounter problem with the upload of files with Unicode chars in their -names, activate the appropriate locale in Apache. On a Debian server with UTF-8 -as default encoding, in the file <em>/etc/apache2/envvars</em> uncomment the following -line:</p> -<div class="highlight-python"><pre>. /etc/default/locale</pre> -</div> -</div> -</div> -</div> - - - </div> - </div> - </div> - <div class="sphinxsidebar"> - <div class="sphinxsidebarwrapper"> - <h3><a href="index.html">Table Of Contents</a></h3> - <ul> -<li><a class="reference internal" href="#">Installation</a><ul> -<li><a class="reference internal" href="#prerequisites">Prerequisites</a></li> -<li><a class="reference internal" href="#database-configuration">Database configuration</a></li> -<li><a class="reference internal" href="#installing-the-sources">Installing the sources</a><ul> -<li><a class="reference internal" href="#from-an-archive">From an archive</a></li> -<li><a class="reference internal" href="#from-the-git-repository">From the Git repository</a></li> -</ul> -</li> -<li><a class="reference internal" href="#creating-a-custom-project-template">Creating a custom project template</a></li> -<li><a class="reference internal" href="#compiling-languages">Compiling languages</a></li> -<li><a class="reference internal" href="#database-initialisation">Database initialisation</a></li> -<li><a class="reference internal" href="#webserver-configuration">Webserver configuration</a><ul> -<li><a class="reference internal" href="#apache-configuration-with-mod-wsgi">Apache configuration with mod_wsgi</a></li> -</ul> -</li> -</ul> -</li> -</ul> - - <h4>Previous topic</h4> - <p class="topless"><a href="index.html" - title="previous chapter">Welcome to Chimère’s documentation!</a></p> - <h4>Next topic</h4> - <p class="topless"><a href="upgrade.html" - title="next chapter">Upgrade</a></p> - <h3>This Page</h3> - <ul class="this-page-menu"> - <li><a href="_sources/install.txt" - rel="nofollow">Show Source</a></li> - </ul> -<div id="searchbox" style="display: none"> - <h3>Quick search</h3> - <form class="search" action="search.html" method="get"> - <input type="text" name="q" /> - <input type="submit" value="Go" /> - <input type="hidden" name="check_keywords" value="yes" /> - <input type="hidden" name="area" value="default" /> - </form> - <p class="searchtip" style="font-size: 90%"> - Enter search terms or a module, class or function name. - </p> -</div> -<script type="text/javascript">$('#searchbox').show(0);</script> - </div> - </div> - <div class="clearer"></div> - </div> - <div class="related"> - <h3>Navigation</h3> - <ul> - <li class="right" style="margin-right: 10px"> - <a href="genindex.html" title="General Index" - >index</a></li> - <li class="right" > - <a href="upgrade.html" title="Upgrade" - >next</a> |</li> - <li class="right" > - <a href="index.html" title="Welcome to Chimère’s documentation!" - >previous</a> |</li> - <li><a href="index.html">Chimère 2.0 documentation</a> »</li> - </ul> - </div> - <div class="footer"> - © Copyright 2012, Étienne Loks. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. - </div> - </body> -</html>
\ No newline at end of file |