installing.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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
  27. download the Supervisor distribution and install it by hand. Current
  28. and previous Supervisor releases may be downloaded from
  29. `http://supervisord.org/dist/ <http://supervisord.org/dist/>`_. After
  30. unpacking the software archive, run ``python setup.py install``. This
  31. requires internet access. It will download and install all
  32. distributions depended upon by Supervisor and finally install
  33. Supervisor itself.
  34. .. note::
  35. Depending on the permissions of your system's Python, you might
  36. need to be the root user to sucessfully invoke ``python
  37. setup.py install``.
  38. Installing To A System Without Internet Access
  39. ----------------------------------------------
  40. If the system that you want to install Supervisor to does not have
  41. Internet access, you'll need to perform installation slightly
  42. differently. Since both ``easy_install`` and ``python setup.py
  43. install`` depend on internet access to perform downloads of dependent
  44. software, neither will work on machines without internet access until
  45. dependencies are installed. To install to a machine which is not
  46. internet-connected, obtain the following dependencies on a machine
  47. which is internet-connected:
  48. - setuptools (latest) from `http://pypi.python.org/pypi/setuptools
  49. <http://pypi.python.org/pypi/setuptools>`_.
  50. - meld3 (latest) from `http://www.plope.com/software/meld3/
  51. <http://www.plope.com/software/meld3/>`_.
  52. - elementtree (latest) from `http://effbot.org/downloads#elementtree
  53. <http://effbot.org/downloads#elementtree>`_.
  54. Copy these files to removable media and put them on the target
  55. machine. Install each onto the target machine as per its
  56. instructions. This typically just means unpacking each file and
  57. invoking ``python setup.py install`` in the unpacked directory.
  58. Finally, run supervisor's ``python setup.py install``.
  59. .. note::
  60. Depending on the permissions of your system's Python, you might
  61. need to be the root user to invoke ``python setup.py install``
  62. sucessfully for each package.
  63. Creating a Configuration File
  64. -----------------------------
  65. Once the Supervisor installation has completed, run
  66. ``echo_supervisord_conf``. This will print a "sample" Supervisor
  67. configuration file to your terminal's stdout.
  68. Once you see the file echoed to your terminal, reinvoke the command as
  69. ``echo_supervisord_conf > /etc/supervisord.conf``. This won't work if
  70. you do not have root access.
  71. If you don't have root access, or you'd rather not put the
  72. :file:`supervisord.conf` file in :file:`/etc/supervisord.conf``, you
  73. can place it in the current directory (``echo_supervisord_conf >
  74. supervisord.conf``) and start :program:`supervisord` with the
  75. ``-c`` flag in order to specify the configuration file
  76. location.
  77. For example, ``supervisord -c supervisord.conf``. Using the ``-c``
  78. flag actually is redundant in this case, because
  79. :program:`supervisord` searches the current directory for a
  80. :file:`supervisord.conf` before it searches any other locations for
  81. the file, but it will work. See :ref:`running` for more information
  82. about the ``-c`` flag.
  83. Once you have a configuration file on your filesystem, you can
  84. begin modifying it to your liking.