installing.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. Creating a Configuration File
  63. -----------------------------
  64. Once the Supervisor installation has completed, run
  65. ``echo_supervisord_conf``. This will print a "sample" Supervisor
  66. configuration file to your terminal's stdout.
  67. Once you see the file echoed to your terminal, reinvoke the command as
  68. ``echo_supervisord_conf > /etc/supervisord.conf``. This won't work if
  69. you do not have root access.
  70. If you don't have root access, or you'd rather not put the
  71. :file:`supervisord.conf` file in :file:`/etc/supervisord.conf``, you
  72. can place it in the current directory (``echo_supervisord_conf >
  73. supervisord.conf``) and start :program:`supervisord` with the
  74. ``-c`` flag in order to specify the configuration file
  75. location.
  76. For example, ``supervisord -c supervisord.conf``. Using the ``-c``
  77. flag actually is redundant in this case, because
  78. :program:`supervisord` searches the current directory for a
  79. :file:`supervisord.conf` before it searches any other locations for
  80. the file, but it will work. See :ref:`running` for more information
  81. about the ``-c`` flag.
  82. Once you have a configuration file on your filesystem, you can
  83. begin modifying it to your liking.