Newer
Older
postorius / src / postorius / doc / _build / html / setup.html


<!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 &mdash; Postorius 1.0a2 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:     '1.0a2',
        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="Postorius 1.0a2 documentation" href="index.html" />
    <link rel="next" title="Development" href="development.html" />
    <link rel="prev" title="News / Changelog" href="news.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="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="development.html" title="Development"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="news.html" title="News / Changelog"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Postorius 1.0a2 documentation</a> &raquo;</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>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This installation guide covers Postorius, the web user interface for
GNU Mailman 3. To install GNU Mailman follow the instructions in the documentation:
<a class="reference external" href="http://packages.python.org/mailman/">http://packages.python.org/mailman/</a></p>
</div>
<div class="section" id="install-dependencies">
<h2>Install Dependencies<a class="headerlink" href="#install-dependencies" title="Permalink to this headline">¶</a></h2>
<p>Django:</p>
<div class="highlight-python"><pre>$ sudo pip install django</pre>
</div>
<p>mailman.client:</p>
<div class="highlight-python"><pre>$ bzr branch lp:mailman.client
$ cd mailman.client
$ sudo python setup.py install</pre>
</div>
</div>
<div class="section" id="install-postorius">
<h2>Install Postorius<a class="headerlink" href="#install-postorius" title="Permalink to this headline">¶</a></h2>
<div class="section" id="latest-release">
<h3>Latest release<a class="headerlink" href="#latest-release" title="Permalink to this headline">¶</a></h3>
<p>If you just want to install the latest release of Postorius, install it from
PyPi:</p>
<div class="highlight-python"><pre>$ sudo pip install postorius</pre>
</div>
<p>or:</p>
<div class="highlight-python"><pre>$ sudo easy_install postorius</pre>
</div>
</div>
<div class="section" id="latest-dev-version">
<h3>Latest dev version<a class="headerlink" href="#latest-dev-version" title="Permalink to this headline">¶</a></h3>
<p>If you want to always be up to date with the latest development version, you
should install Postorius using bazaar:</p>
<div class="highlight-python"><pre>$ bzr branch lp:postorius
$ cd postorius
$ sudo python setup.py develop
$ cd ..</pre>
</div>
<p>You can always pull in the latest changes from the development branch:</p>
<div class="highlight-python"><pre>$ cd postorius
$ bzr pull
$ cd ..</pre>
</div>
<p>Make sure to keep mailman.client up to date as well:</p>
<div class="highlight-python"><pre>$ cd mailman.client
$ bzr pull lp:mailman.client
$ cd ..</pre>
</div>
</div>
</div>
<div class="section" id="setup-your-django-project">
<h2>Setup your django project<a class="headerlink" href="#setup-your-django-project" title="Permalink to this headline">¶</a></h2>
<p>Since you have now installed the necessary packages to run Postorius, it&#8217;s
time to setup your Django site.</p>
<p>First, get the project directory from launchpad:</p>
<div class="highlight-python"><pre>$ bzr branch lp:~mailman-coders/postorius/postorius_standalone</pre>
</div>
<p>Second, change the database setting in <tt class="docutils literal"><span class="pre">postorius_standalone/settings.py</span></tt> to
your preferred database. If you&#8217;re OK with using sqlite, just change the path
in line 48 to the correct location.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Detailed information on how to use different database engines can be found
in the <a class="reference external" href="https://docs.djangoproject.com/en/1.4/ref/settings/#databases">Django documentation</a>.</p>
</div>
<p>Third, prepare the database:</p>
<div class="highlight-python"><pre>$ cd postorius_standalone
$ python manage.py syncdb
$ cd ..</pre>
</div>
<p>This will create the <tt class="docutils literal"><span class="pre">.db</span> <span class="pre">file</span></tt> (if you ar using SQLite) and will setup all the
necessary db tables. You will also be prompted to create a superuser which
will act as an admin account for Postorius.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">Robert Niederreiter has provided a <a class="reference external" href="https://github.com/bluedynamics/mailman.buildout">buildout for GNU Mailman 3 and
Postorius</a>.</p>
</div>
</div>
<div class="section" id="running-the-development-server">
<h2>Running the development server<a class="headerlink" href="#running-the-development-server" title="Permalink to this headline">¶</a></h2>
<p>The quickest way to run Postorius is to just start the development server:</p>
<div class="highlight-python"><pre>$ cd postorius_standalone
$ python manage.py runserver</pre>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">You should use the development server only locally. While it&#8217;s possible to
make your site publicly available using the dev server, you should never
do that in a production environment.</p>
</div>
</div>
<div class="section" id="running-postorius-on-apache-with-mod-wsgi">
<h2>Running Postorius on Apache with mod_wsgi<a class="headerlink" href="#running-postorius-on-apache-with-mod-wsgi" title="Permalink to this headline">¶</a></h2>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This guide assumes that you know how to setup a VirtualHost with Apache.
If you are using SQLite, the <tt class="docutils literal"><span class="pre">.db</span></tt> file as well as its folder need to be
writable by the web server.</p>
</div>
<p>These settings need to be added to your Apache VirtualHost:</p>
<div class="highlight-python"><pre>Alias /static /path/to/postorius_standalone/static
&lt;Directory "/path/to/postorius_standalone/static"&gt;
    Order deny,allow
    Allow from all
&lt;/Directory&gt;

WSGIScriptAlias / /path/to/postorius_standalone/srv/postorius.wsgi
&lt;Directory "/path/to/postorius_standalone/srv"&gt;
    Order deny,allow
    Allow from all
&lt;/Directory&gt;</pre>
</div>
<p>The first Alias serves the static files (CSS, JS, Images, etc.). The
WSGIScriptAlias serves the Django application. The paths need to be changed
depending on which location you downloaded <tt class="docutils literal"><span class="pre">postorius_standalone</span></tt> to.</p>
<p>We&#8217;re almost ready. But you need to collect the static files from Postorius
(which resides somewhere on your pythonpath) to be able to serve them from the
site directory. All you have to do is to change into the
<tt class="docutils literal"><span class="pre">postorius_standalone</span></tt> directory and run:</p>
<div class="highlight-python"><pre>$ python manage.py collectstatic</pre>
</div>
<p>After reloading the webserver Postorius should be running!</p>
</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="#install-dependencies">Install Dependencies</a></li>
<li><a class="reference internal" href="#install-postorius">Install Postorius</a><ul>
<li><a class="reference internal" href="#latest-release">Latest release</a></li>
<li><a class="reference internal" href="#latest-dev-version">Latest dev version</a></li>
</ul>
</li>
<li><a class="reference internal" href="#setup-your-django-project">Setup your django project</a></li>
<li><a class="reference internal" href="#running-the-development-server">Running the development server</a></li>
<li><a class="reference internal" href="#running-postorius-on-apache-with-mod-wsgi">Running Postorius on Apache with mod_wsgi</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="news.html"
                        title="previous chapter">News / Changelog</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="development.html"
                        title="next chapter">Development</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/setup.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="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="development.html" title="Development"
             >next</a> |</li>
        <li class="right" >
          <a href="news.html" title="News / Changelog"
             >previous</a> |</li>
        <li><a href="index.html">Postorius 1.0a2 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, The Free Software Foundation.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>