installing.rst 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. Installing
  2. ==========
  3. Installation instructions depend whether the system on which
  4. you're attempting to install Supervisor has internet access.
  5. Installing to A System With Internet Access
  6. -------------------------------------------
  7. If your system has internet access, you can get Supervisor
  8. installed in two ways:
  9. - Using ``easy_install``, which is a feature of `setuptools
  10. <http://peak.telecommunity.com/DevCenter/setuptools>`_. This is the
  11. preferred method of installation.
  12. - By downloading the Supervisor package and invoking
  13. a command.
  14. Internet-Installing With Setuptools
  15. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  16. If the Python interpreter you're using has Setuptools installed, and
  17. the system has internet access, you can download and install
  18. supervisor in one step using ``easy_install``.
  19. .. code-block:: bash
  20. easy_install supervisor
  21. Depending on the permissions of your system's Python, you might need
  22. to be the root user to install Supervisor successfully using
  23. ``easy_install``.
  24. Internet-Installing Without Setuptools
  25. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. If your system does not have setuptools installed, you will need to download
  27. the Supervisor distribution and install it by hand. Current and previous
  28. Supervisor releases may be downloaded from `PyPi
  29. <http://pypi.python.org/pypi/supervisor>`_. After unpacking the software
  30. archive, run ``python setup.py install``. This requires internet access. It
  31. will download and install all distributions depended upon by Supervisor and
  32. finally install Supervisor itself.
  33. .. note::
  34. Depending on the permissions of your system's Python, you might
  35. need to be the root user to sucessfully invoke ``python
  36. setup.py install``.
  37. Installing To A System Without Internet Access
  38. ----------------------------------------------
  39. If the system that you want to install Supervisor to does not have
  40. Internet access, you'll need to perform installation slightly
  41. differently. Since both ``easy_install`` and ``python setup.py
  42. install`` depend on internet access to perform downloads of dependent
  43. software, neither will work on machines without internet access until
  44. dependencies are installed. To install to a machine which is not
  45. internet-connected, obtain the following dependencies on a machine
  46. which is internet-connected:
  47. - setuptools (latest) from `http://pypi.python.org/pypi/setuptools
  48. <http://pypi.python.org/pypi/setuptools>`_.
  49. - meld3 (latest) from `http://www.plope.com/software/meld3/
  50. <http://www.plope.com/software/meld3/>`_.
  51. - elementtree (latest) from `http://effbot.org/downloads#elementtree
  52. <http://effbot.org/downloads#elementtree>`_.
  53. Copy these files to removable media and put them on the target
  54. machine. Install each onto the target machine as per its
  55. instructions. This typically just means unpacking each file and
  56. invoking ``python setup.py install`` in the unpacked directory.
  57. Finally, run supervisor's ``python setup.py install``.
  58. .. note::
  59. Depending on the permissions of your system's Python, you might
  60. need to be the root user to invoke ``python setup.py install``
  61. sucessfully for each package.
  62. Installing a Distribution Package
  63. ---------------------------------
  64. Some Linux distributions offer a version of Supervisor that is installable
  65. through the system package manager. These packages may include
  66. distribution-specific changes to Supervisor.
  67. .. note::
  68. Some of these packages can lag considerably behind the official
  69. release version. For example, Ubuntu 12.04 (released April 2012)
  70. offers a package based on Supervisor 3.0a8 (released January 2010).
  71. Use the package management tools of your distribution to check availability;
  72. e.g. on Ubuntu you can run ``apt-cache show supervisor``, and on CentOS
  73. you can run ``yum info supervisor``.
  74. Packaged Supervisor will normally already be integrated into the service
  75. management infrastructure of your distribution.
  76. Installing via pip
  77. ------------------
  78. With pip >= 1.4
  79. .. code-block:: bash
  80. pip install supervisor --pre
  81. With previous versions of pip:
  82. .. code-block:: bash
  83. pip install supervisor
  84. Creating a Configuration File
  85. -----------------------------
  86. Once the Supervisor installation has completed, run
  87. ``echo_supervisord_conf``. This will print a "sample" Supervisor
  88. configuration file to your terminal's stdout.
  89. Once you see the file echoed to your terminal, reinvoke the command as
  90. ``echo_supervisord_conf > /etc/supervisord.conf``. This won't work if
  91. you do not have root access.
  92. If you don't have root access, or you'd rather not put the
  93. :file:`supervisord.conf` file in :file:`/etc/supervisord.conf``, you
  94. can place it in the current directory (``echo_supervisord_conf >
  95. supervisord.conf``) and start :program:`supervisord` with the
  96. ``-c`` flag in order to specify the configuration file
  97. location.
  98. For example, ``supervisord -c supervisord.conf``. Using the ``-c``
  99. flag actually is redundant in this case, because
  100. :program:`supervisord` searches the current directory for a
  101. :file:`supervisord.conf` before it searches any other locations for
  102. the file, but it will work. See :ref:`running` for more information
  103. about the ``-c`` flag.
  104. Once you have a configuration file on your filesystem, you can
  105. begin modifying it to your liking.