1
0

rhel.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. .. _installation-rhel:
  2. ==============================================================
  3. RHEL / CentOS / Scientific Linux / Amazon Linux / Oracle Linux
  4. ==============================================================
  5. .. _installation-rhel-repo:
  6. Salt should work properly with all mainstream derivatives of Red Hat Enterprise
  7. Linux, including CentOS, Scientific Linux, Oracle Linux, and Amazon Linux.
  8. Report any bugs or issues on the `issue tracker`__.
  9. .. __: https://github.com/saltstack/salt/issues
  10. Installation from the Official SaltStack Repository
  11. ===================================================
  12. Packages for Redhat, CentOS, and Amazon Linux are available in
  13. the SaltStack Repository.
  14. - `Red Hat / CentOS <https://repo.saltstack.com/#rhel>`_
  15. - `Amazon Linux <https://repo.saltstack.com/#amzn>`_
  16. .. note::
  17. As of 2015.8.0, EPEL repository is no longer required for installing on
  18. RHEL systems. SaltStack repository provides all needed dependencies.
  19. .. warning::
  20. If installing on Red Hat Enterprise Linux 7 with disabled (not subscribed on)
  21. 'RHEL Server Releases' or 'RHEL Server Optional Channel' repositories,
  22. append CentOS 7 GPG key URL to SaltStack yum repository configuration to
  23. install required base packages:
  24. .. code-block:: cfg
  25. [saltstack-repo]
  26. name=SaltStack repo for Red Hat Enterprise Linux $releasever
  27. baseurl=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest
  28. enabled=1
  29. gpgcheck=1
  30. gpgkey=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/SALTSTACK-GPG-KEY.pub
  31. https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/base/RPM-GPG-KEY-CentOS-7
  32. .. note::
  33. ``systemd`` and ``systemd-python`` are required by Salt, but are not
  34. installed by the Red Hat 7 ``@base`` installation or by the Salt
  35. installation. These dependencies might need to be installed before Salt.
  36. Installation from the Community-Maintained Repository
  37. =====================================================
  38. Beginning with version 0.9.4, Salt has been available in `EPEL`_.
  39. .. note::
  40. Packages in this repository are built by community, and it can take a little
  41. while until the latest stable SaltStack release become available.
  42. .. _`EPEL`: https://fedoraproject.org/wiki/EPEL
  43. RHEL/CentOS 6 and 7, Scientific Linux, etc.
  44. -------------------------------------------
  45. .. warning::
  46. Salt 2015.8 is currently not available in EPEL due to unsatisfied
  47. dependencies: ``python-crypto`` 2.6.1 or higher, and ``python-tornado``
  48. version 4.2.1 or higher. These packages are not currently available in EPEL
  49. for Red Hat Enterprise Linux 6 and 7.
  50. Enabling EPEL
  51. *************
  52. If the EPEL repository is not installed on your system, you can download the
  53. RPM for `RHEL/CentOS 6`_ or for `RHEL/CentOS 7`_ and install it
  54. using the following command:
  55. .. code-block:: bash
  56. rpm -Uvh epel-release-X-Y.rpm
  57. Replace ``epel-release-X-Y.rpm`` with the appropriate filename.
  58. .. _RHEL/CentOS 6: http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html
  59. .. _RHEL/CentOS 7: http://download.fedoraproject.org/pub/epel/7/x86_64/repoview/epel-release.html
  60. Installing Stable Release
  61. *************************
  62. Salt is packaged separately for the minion and the master. It is necessary
  63. to install only the appropriate package for the role the machine will play.
  64. Typically, there will be one master and multiple minions.
  65. - ``yum install salt-master``
  66. - ``yum install salt-minion``
  67. - ``yum install salt-ssh``
  68. - ``yum install salt-syndic``
  69. - ``yum install salt-cloud``
  70. Installing from ``epel-testing``
  71. ********************************
  72. When a new Salt release is packaged, it is first admitted into the
  73. ``epel-testing`` repository, before being moved to the stable EPEL repository.
  74. To install from ``epel-testing``, use the ``enablerepo`` argument for ``yum``:
  75. .. code-block:: bash
  76. yum --enablerepo=epel-testing install salt-minion
  77. Installation Using pip
  78. ======================
  79. Since Salt is on `PyPI`_, it can be installed using pip, though most users
  80. prefer to install using RPM packages (which can be installed from `EPEL`_).
  81. Installing from pip has a few additional requirements:
  82. * Install the group 'Development Tools', ``yum groupinstall 'Development Tools'``
  83. * Install the 'zeromq-devel' package if it fails on linking against that
  84. afterwards as well.
  85. A pip install does not make the init scripts or the /etc/salt directory, and you
  86. will need to provide your own systemd service unit.
  87. Installation from pip:
  88. .. _`PyPI`: https://pypi.org/project/salt/
  89. .. code-block:: bash
  90. pip install salt
  91. .. warning::
  92. If installing from pip (or from source using ``setup.py install``), be
  93. advised that the ``yum-utils`` package is needed for Salt to manage
  94. packages. Also, if the Python dependencies are not already installed, then
  95. you will need additional libraries/tools installed to build some of them.
  96. More information on this can be found :ref:`here
  97. <installing-for-development>`.
  98. ZeroMQ 4
  99. ========
  100. We recommend using ZeroMQ 4 where available. SaltStack provides ZeroMQ 4.0.5
  101. and ``pyzmq`` 14.5.0 in the :ref:`SaltStack Repository
  102. <installation-rhel-repo>`.
  103. If this repository is added *before* Salt is installed, then installing either
  104. ``salt-master`` or ``salt-minion`` will automatically pull in ZeroMQ 4.0.5, and
  105. additional steps to upgrade ZeroMQ and pyzmq are unnecessary.
  106. Package Management
  107. ==================
  108. Salt's interface to :mod:`yum <salt.modules.yumpkg>` makes heavy use of the
  109. **repoquery** utility, from the yum-utils_ package. This package will be
  110. installed as a dependency if salt is installed via EPEL. However, if salt has
  111. been installed using pip, or a host is being managed using salt-ssh, then as of
  112. version 2014.7.0 yum-utils_ will be installed automatically to satisfy this
  113. dependency.
  114. .. _yum-utils: http://yum.baseurl.org/wiki/YumUtils
  115. Post-installation tasks
  116. =======================
  117. Master
  118. ------
  119. To have the Master start automatically at boot time:
  120. **RHEL/CentOS 5 and 6**
  121. .. code-block:: bash
  122. chkconfig salt-master on
  123. **RHEL/CentOS 7**
  124. .. code-block:: bash
  125. systemctl enable salt-master.service
  126. To start the Master:
  127. **RHEL/CentOS 5 and 6**
  128. .. code-block:: bash
  129. service salt-master start
  130. **RHEL/CentOS 7**
  131. .. code-block:: bash
  132. systemctl start salt-master.service
  133. Minion
  134. ------
  135. To have the Minion start automatically at boot time:
  136. **RHEL/CentOS 5 and 6**
  137. .. code-block:: bash
  138. chkconfig salt-minion on
  139. **RHEL/CentOS 7**
  140. .. code-block:: bash
  141. systemctl enable salt-minion.service
  142. To start the Minion:
  143. **RHEL/CentOS 5 and 6**
  144. .. code-block:: bash
  145. service salt-minion start
  146. **RHEL/CentOS 7**
  147. .. code-block:: bash
  148. systemctl start salt-minion.service
  149. Now go to the :ref:`Configuring Salt<configuring-salt>` page.