gunicorn/doc/htdocs/installation.html
Paul J. Davis d2561ae681 Fixed a snafu in the installation instructions.
libev != libevent.
Also added a note about getting the most recent greenlets module.
2010-05-11 17:31:43 -04:00

154 lines
6.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Green Unicorn - Installing Gunicorn</title>
<link rel="alternate" type="application/rss+xml" href="/feed.xml" />
<!--[if IE]>
<script>
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
document.createElement('header');
document.createElement('nav');
document.createElement('time');
</script>
<![endif]-->
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
</head>
<body>
<div class="container">
<div id="header">
<h1 class="logo"><a href="http://gunicorn.org">gunicorn</a></h1>
<div id="links">
Get the source via
<a href="http://github.com/benoitc/gunicorn">git</a>, then
<a href="http://github.com/benoitc/gunicorn/issues">send feedback</a>
</div>
</div>
<div id="menu">
<ul id="actions">
<li><a href="installation.html">Installation</a></li>
<li><a href="usage.html">Usage</a></li>
<li><a href="deployment.html">Deployment</a></li>
<li><a href="configuration.html">Configuration</a></li>
<li><a href="tuning.html">Tuning</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
</ul>
</div>
<div class="document" id="installation">
<h1 class="title">Installation</h1>
<div class="section" id="requirements">
<h1>Requirements</h1>
<ul class="simple">
<li><strong>Python 2.x &gt;= 2.5</strong> (Python 3.x will be supported soon)</li>
<li>setuptools &gt;= 0.6c6</li>
<li>nosetests (for the test suite only)</li>
</ul>
</div>
<div class="section" id="installing-with-easy-install">
<h1>Installing with easy_install</h1>
<p>If you don't already have <tt class="docutils literal"><span class="pre">easy_install</span></tt> available you'll want to download
and run the <tt class="docutils literal"><span class="pre">ez_setup.py</span></tt> script:</p>
<pre class="literal-block">
$ curl -O http://peak.telecommunity.com/dist/ez_setup.py
$ sudo python ez_setup.py -U setuptools
</pre>
<p>To install or upgrade to the latest released version of Gunicorn:</p>
<pre class="literal-block">
$ sudo easy_install -U gunicorn
</pre>
</div>
<div class="section" id="installing-from-source">
<h1>Installing from source</h1>
<p>You can install Gunicorn from source just as you would install any other
Python package. Gunicorn uses setuptools which will automatically fetch all
dependencies (including setuptools itself).</p>
<div class="section" id="get-a-copy">
<h2>Get a Copy</h2>
<p>You can download a tarball of the latest sources from <a class="reference external" href="http://github.com/benoitc/gunicorn/downloads">GitHub Downloads</a> or
fetch them with <a class="reference external" href="http://git-scm.com/">git</a>:</p>
<pre class="literal-block">
$ git clone git://github.com/benoitc/gunicorn.git
</pre>
</div>
<div class="section" id="id1">
<h2>Installation</h2>
<pre class="literal-block">
$ python setup.py install
</pre>
<p>If you've cloned the git repository, its highly recommended that you use the
<tt class="docutils literal"><span class="pre">develop</span></tt> command which will allow you to use Gunicorn from the source
directory. This will allow you to keep up to date with development on GitHub as
well as make changes to the source:</p>
<pre class="literal-block">
$ python setup.py develop
</pre>
</div>
</div>
<div class="section" id="enabling-async-workers">
<h1>Enabling async workers</h1>
<p>You may also want to install <a class="reference external" href="http://eventlet.net">Eventlet</a> or <a class="reference external" href="http://gevent.org">Gevent</a> if you expect that your
application code may need to pause for extended periods of time during
request processing. Check out the <a class="reference external" href="faq.html">FAQ</a> for more information on when you'll
want to consider one of the alternate worker types.</p>
<p>To install eventlet:</p>
<pre class="literal-block">
$ easy_install -U greenlet # Required for both
$ easy_install -U eventlet # For eventlet workers
$ easy_install -U gevent # For gevent workers
</pre>
<div class="note">
<p class="first admonition-title">Note</p>
<p>If installing <tt class="docutils literal"><span class="pre">greenlet</span></tt> fails you probably need to install
the Python headers. These headers are available in most package
managers. On Ubuntu the package name for <tt class="docutils literal"><span class="pre">apt-get</span></tt> is
<tt class="docutils literal"><span class="pre">python-dev</span></tt>.</p>
<p class="last"><a class="reference external" href="http://gevent.org">Gevent</a> also requires that <tt class="docutils literal"><span class="pre">libevent</span></tt> 1.4.x or 2.0.4 is installed.
This could be a more recent version than what is available in your
package manager. If <a class="reference external" href="http://gevent.org">Gevent</a> fails to build even with <tt class="docutils literal"><span class="pre">libevent</span></tt>
installed, this is the most likely reason.</p>
</div>
</div>
<div class="section" id="installing-on-ubuntu-debian-systems">
<h1>Installing on Ubuntu/Debian systems</h1>
<p>If you use <a class="reference external" href="http://www.ubuntu.com/">Ubuntu</a> karmic, you can update your system with packages from
our <a class="reference external" href="https://launchpad.net/~bchesneau/+archive/gunicorn">PPA</a> by adding <tt class="docutils literal"><span class="pre">ppa:bchesneau/gunicorn</span></tt> to your system's Software
Sources.</p>
<p>Or this PPA can be added to your system manually by copying the lines below
and adding them to your system's software sources:</p>
<pre class="literal-block">
deb http://ppa.launchpad.net/bchesneau/gunicorn/ubuntu karmic main
deb-src http://ppa.launchpad.net/bchesneau/gunicorn/ubuntu karmic main
</pre>
<p>Signing key:</p>
<pre class="literal-block">
1024R/15E5EB06
</pre>
<p>Fingerprint:</p>
<pre class="literal-block">
49AEEDFF5CDCD82CEA8AB4DABC981A8115E5EB06
</pre>
</div>
</div>
<div id="footer">
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
<p>Hosted on <a href="http://github.com/">Github</a></p>
</div>
</div>
</body>
</html>