Merge pull request #753 from berkerpeksag/improve-installation-docs

Update installation docs to mention about pip.
This commit is contained in:
Benoit Chesneau 2014-05-18 00:06:08 +02:00
commit a14a73a452

View File

@ -2,65 +2,34 @@
Installation Installation
============ ============
Follow the following steps to install Gunicorn. .. highlight:: bash
Requirements :Requirements: **Python 2.x >= 2.6** or **Python 3.x >= 3.1**
============
- **Python 2.x >= 2.6** or **Python 3.x >= 3.1** To install the latest released version of Gunicorn::
- setuptools >= 0.6c6
- nosetests (for the test suite only)
With easy_install $ pip install gunicorn
=================
If you don't already have ``easy_install`` available you'll want to download
and run the ``ez_setup.py`` script::
$ curl -O http://peak.telecommunity.com/dist/ez_setup.py
$ sudo python ez_setup.py -U setuptools
To install or upgrade to the latest released version of Gunicorn::
$ sudo easy_install -U gunicorn
.. note:: .. note::
There is a limited support version of Gunicorn that is compatible 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 with Python 2.4. This fork is managed by Randall Leeds and can be
found `here on github`_. To install this version you must specify found `here on GitHub`_. To install this version via ``pip``, you
the full url to something like ``pip``. This hasn't been tested must specify the *py24* branch::
wtih ``easy_install`` just yet::
$ pip install -f http://github.com/tilgovi/gunicorn/tarball/py24 gunicorn $ pip install git+https://github.com/tilgovi/gunicorn.git@py24
From Source From Source
=========== ===========
You can install Gunicorn from source just as you would install any other You can install Gunicorn from source just as you would install any other
Python package. Gunicorn uses setuptools which will automatically fetch all Python package::
dependencies (including setuptools itself).
You can download a tarball of the latest sources from `GitHub Downloads`_ or $ pip install git+https://github.com/benoitc/gunicorn.git
fetch them with git_::
# Using git: This will allow you To keep up to date with development on GitHub::
$ git clone git://github.com/benoitc/gunicorn.git
$ cd gunicorn
# Or using a tarball: $ pip install -U git+https://github.com/benoitc/gunicorn.git
$ 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
If you've cloned the git repository, its highly recommended that you use the
``develop`` 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::
$ python setup.py develop
Async Workers Async Workers
============= =============
@ -72,9 +41,9 @@ want to consider one of the alternate worker types.
:: ::
$ easy_install -U greenlet # Required for both $ pip install greenlet # Required for both
$ easy_install -U eventlet # For eventlet workers $ pip install eventlet # For eventlet workers
$ easy_install -U gevent # For gevent workers $ pip install gevent # For gevent workers
.. note:: .. note::
If installing ``greenlet`` fails you probably need to install If installing ``greenlet`` fails you probably need to install
@ -87,6 +56,7 @@ want to consider one of the alternate worker types.
package manager. If Gevent_ fails to build even with libevent_ package manager. If Gevent_ fails to build even with libevent_
installed, this is the most likely reason. installed, this is the most likely reason.
Debian GNU/Linux Debian GNU/Linux
================ ================
@ -95,22 +65,22 @@ system packages to install Gunicorn except maybe when you want to use
different versions of gunicorn with virtualenv. This has a number of different versions of gunicorn with virtualenv. This has a number of
advantages: advantages:
* Zero-effort installation: Automatically starts multiple Gunicorn instances * Zero-effort installation: Automatically starts multiple Gunicorn instances
based on configurations defined in ``/etc/gunicorn.d``. based on configurations defined in ``/etc/gunicorn.d``.
* Sensible default locations for logs (``/var/log/gunicorn``). Logs * Sensible default locations for logs (``/var/log/gunicorn``). Logs
can be automatically rotated and compressed using ``logrotate``. can be automatically rotated and compressed using ``logrotate``.
* Improved security: Can easily run each Gunicorn instance with a dedicated * Improved security: Can easily run each Gunicorn instance with a dedicated
UNIX user/group. UNIX user/group.
* Sensible upgrade path: Upgrades to newer versions result in less downtime, * Sensible upgrade path: Upgrades to newer versions result in less downtime,
handle conflicting changes in configuration options, and can be quickly handle conflicting changes in configuration options, and can be quickly
rolled back in case of incompatibility. The package can also be purged rolled back in case of incompatibility. The package can also be purged
entirely from the system in seconds. entirely from the system in seconds.
Stable ("wheezy") Stable ("wheezy")
------------------ -----------------
The version of Gunicorn in the Debian_ "stable" distribution is 0.14.5 (June The version of Gunicorn in the Debian_ "stable" distribution is 0.14.5 (June
2012). You can install it using:: 2012). You can install it using::
@ -166,6 +136,8 @@ our PPA_ by adding ``ppa:gunicorn/ppa`` to your system's Software
Sources. Use the ``apt-add-repository`` command from the Sources. Use the ``apt-add-repository`` command from the
``python-software-properties`` package to add the Gunicorn software source. ``python-software-properties`` package to add the Gunicorn software source.
::
$ sudo apt-add-repository ppa:gunicorn/ppa $ sudo apt-add-repository ppa:gunicorn/ppa
Or this PPA can be added to your system manually by copying the lines below Or this PPA can be added to your system manually by copying the lines below
@ -174,27 +146,15 @@ and adding them to your system's software sources::
deb http://ppa.launchpad.net/gunicorn/ppa/ubuntu lucid main deb http://ppa.launchpad.net/gunicorn/ppa/ubuntu lucid main
deb-src http://ppa.launchpad.net/gunicorn/ppa/ubuntu lucid main deb-src http://ppa.launchpad.net/gunicorn/ppa/ubuntu lucid main
Replace 'lucid' with your Ubuntu distribution series. Replace *lucid* with your Ubuntu distribution series.
Signing key :Signing key: ``1024R/5370FF2A``
----------- :Fingerprint: ``FC7B41B54C9B8476D9EC22A2C6773E575370FF2A``
::
1024R/5370FF2A
Fingerprint
-----------
::
FC7B41B54C9B8476D9EC22A2C6773E575370FF2A
.. _`GitHub Downloads`: http://github.com/benoitc/gunicorn/downloads
.. _`design docs`: design.html .. _`design docs`: design.html
.. _git: http://git-scm.com/
.. _Eventlet: http://eventlet.net .. _Eventlet: http://eventlet.net
.. _`here on github`: http://github.com/tilgovi/gunicorn .. _`here on GitHub`: http://github.com/tilgovi/gunicorn
.. _Gevent: http://gevent.org .. _Gevent: http://gevent.org
.. _libevent: http://monkey.org/~provos/libevent .. _libevent: http://monkey.org/~provos/libevent
.. _Debian: http://www.debian.org/ .. _Debian: http://www.debian.org/