mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
162 lines
7.5 KiB
HTML
162 lines
7.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Green Unicorn - Install</title>
|
|
<link rel="alternate" type="application/rss+xml" href="/feed.xml" />
|
|
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
|
|
</head>
|
|
<body>
|
|
<div id="container" class="twocolumn">
|
|
<div id="menu">
|
|
<div class="logo">
|
|
<a href="./">
|
|
<img src="images/gunicorn.png" alt="Gunicorn - Green Unicorn" />
|
|
</a>
|
|
</div>
|
|
<ul id="actions">
|
|
<li><a href="install.html">Install</a></li>
|
|
<li><a href="run.html">Run</a></li>
|
|
<li><a href="configure.html">Configure</a></li>
|
|
<li><a href="deploy.html">Deploy</a></li>
|
|
<li><a href="design.html">Design</a></li>
|
|
<li><a href="faq.html">FAQ</a></li>
|
|
<li><a href="news.html">News</a></li>
|
|
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
|
|
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<div class="document">
|
|
<div class="section" id="requirements">
|
|
<h2><a class="toc-backref" href="#contents">Requirements</a></h2>
|
|
<ul class="simple">
|
|
<li><strong>Python 2.x >= 2.5</strong> (Python 3.x will be supported soon)</li>
|
|
<li>setuptools >= 0.6c6</li>
|
|
<li>nosetests (for the test suite only)</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section" id="with-easy-install">
|
|
<h2><a class="toc-backref" href="#contents">With easy_install</a></h2>
|
|
<p>If you don't already have <tt class="docutils literal">easy_install</tt> available you'll want to download
|
|
and run the <tt class="docutils literal">ez_setup.py</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 class="note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p>There is a limited support version of Gunicorn that is compatible
|
|
with Python 2.4. This fork is managed by Randall Leeds and can be
|
|
found <a class="reference external" href="http://github.com/tilgovi/gunicorn">here on github</a>. To install this version you must specify
|
|
the full url to something like <tt class="docutils literal">pip</tt>. This hasn't been tested
|
|
wtih <tt class="docutils literal">easy_install</tt> just yet:</p>
|
|
<pre class="last literal-block">
|
|
$ pip install -f http://github.com/tilgovi/gunicorn/tarball/py24 gunicorn
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="from-source">
|
|
<h2><a class="toc-backref" href="#contents">From Source</a></h2>
|
|
<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>
|
|
<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">
|
|
# Using git:
|
|
$ git clone git://github.com/benoitc/gunicorn.git
|
|
$ cd gunicorn
|
|
|
|
# Or using a tarball:
|
|
$ wget http://github.com/benoitc/gunicorn/tarball/master -o gunicorn.tar.gz
|
|
$ tar -xvzf gunicorn.tar.gz
|
|
$ cd gunicorn-$HASH/
|
|
|
|
# Install
|
|
$ sudo python setup.py install
|
|
</pre>
|
|
<p>If you've cloned the git repository, its highly recommended that you use the
|
|
<tt class="docutils literal">develop</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 class="section" id="async-workers">
|
|
<h2><a class="toc-backref" href="#contents">Async Workers</a></h2>
|
|
<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="design.html">design docs</a> for more information on when you'll
|
|
want to consider one of the alternate worker types.</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">greenlet</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">libevent</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 <a class="reference external" href="http://monkey.org/~provos/libevent">libevent</a>
|
|
installed, this is the most likely reason.</p>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ubuntu-debian">
|
|
<h2><a class="toc-backref" href="#contents">Ubuntu/Debian</a></h2>
|
|
<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">ppa:bchesneau/gunicorn</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>
|
|
<div class="section" id="signing-key">
|
|
<h3><a class="toc-backref" href="#contents">Signing key</a></h3>
|
|
<pre class="literal-block">
|
|
1024R/15E5EB06
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="fingerprint">
|
|
<h3><a class="toc-backref" href="#contents">Fingerprint</a></h3>
|
|
<pre class="literal-block">
|
|
49AEEDFF5CDCD82CEA8AB4DABC981A8115E5EB06
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="toc">
|
|
<div class="contents topic" id="contents">
|
|
<p class="topic-title first">Contents</p>
|
|
<ul class="simple">
|
|
<li><a class="reference internal" href="#requirements" id="id1">Requirements</a></li>
|
|
<li><a class="reference internal" href="#with-easy-install" id="id2">With easy_install</a></li>
|
|
<li><a class="reference internal" href="#from-source" id="id3">From Source</a></li>
|
|
<li><a class="reference internal" href="#async-workers" id="id4">Async Workers</a></li>
|
|
<li><a class="reference internal" href="#ubuntu-debian" id="id5">Ubuntu/Debian</a><ul>
|
|
<li><a class="reference internal" href="#signing-key" id="id6">Signing key</a></li>
|
|
<li><a class="reference internal" href="#fingerprint" id="id7">Fingerprint</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div id="footer">
|
|
<p>Site Content License <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> |