installing.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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 such as Ubuntu have started to include Supervisor.
  65. However the packaged version will not be the very latest, and may include
  66. distribution-specific configuration.
  67. Use the package management tools of your distribution to check availability;
  68. e.g. on Ubuntu you can run ``apt-cache show supervisor``, and on CentOS
  69. you can run ``yum info supervisor``.
  70. Packaged Supervisor will normally already be integrated into the service
  71. management infrastructure of your distribution.
  72. Creating a Configuration File
  73. -----------------------------
  74. Once the Supervisor installation has completed, run
  75. ``echo_supervisord_conf``. This will print a "sample" Supervisor
  76. configuration file to your terminal's stdout.
  77. Once you see the file echoed to your terminal, reinvoke the command as
  78. ``echo_supervisord_conf > /etc/supervisord.conf``. This won't work if
  79. you do not have root access.
  80. If you don't have root access, or you'd rather not put the
  81. :file:`supervisord.conf` file in :file:`/etc/supervisord.conf``, you
  82. can place it in the current directory (``echo_supervisord_conf >
  83. supervisord.conf``) and start :program:`supervisord` with the
  84. ``-c`` flag in order to specify the configuration file
  85. location.
  86. For example, ``supervisord -c supervisord.conf``. Using the ``-c``
  87. flag actually is redundant in this case, because
  88. :program:`supervisord` searches the current directory for a
  89. :file:`supervisord.conf` before it searches any other locations for
  90. the file, but it will work. See :ref:`running` for more information
  91. about the ``-c`` flag.
  92. Once you have a configuration file on your filesystem, you can
  93. begin modifying it to your liking.