osx.rst 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. .. _macos-installation:
  2. =====
  3. macOS
  4. =====
  5. Installation from the Official SaltStack Repository
  6. ===================================================
  7. **Latest stable build from the selected branch**:
  8. |osxdownloadpy3|
  9. The output of ``md5 <salt pkg>`` should match the contents of the
  10. corresponding md5 file.
  11. .. note::
  12. - `Earlier builds from supported branches
  13. <https://repo.saltstack.com/osx/>`__
  14. - `Archived builds from unsupported branches
  15. <https://archive.repo.saltstack.com/osx/>`__
  16. Installation from Homebrew
  17. ==========================
  18. .. code-block:: bash
  19. brew install saltstack
  20. It should be noted that Homebrew explicitly discourages the `use of sudo`_:
  21. Homebrew is designed to work without using sudo. You can decide to use it but we strongly recommend not to do so. If you have used sudo and run into a bug then it is likely to be the cause. Please don’t file a bug report unless you can reproduce it after reinstalling Homebrew from scratch without using sudo
  22. .. _use of sudo: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#sudo
  23. Installation from MacPorts
  24. ==========================
  25. Macports isolates its dependencies from the OS, and installs salt in /opt/local by default, with config files under /opt/local/etc/salt. For best results, add /opt/local/bin to your PATH.
  26. .. code-block:: bash
  27. sudo port install salt
  28. Variants allow selection of python version used to run salt, defaulting to python27, but also supporting python34, python35, and python36. To install salt with Python 3.6, use the python36 variant, for example:
  29. .. code-block:: bash
  30. sudo port install salt @python36
  31. Startup items (for master, minion, and rest-cherrypy API gateway, respectively) are installed by subport targets. These will register launchd LaunchDaemons as org.macports.salt-minion, for example, to trigger automatic startup of the salt-minion through launchd. LaunchDaemons for salt can be started and stopped without reboot using the macprots load and unload commands.
  32. .. code-block:: bash
  33. sudo port install salt-master salt-minion salt-api
  34. sudo port load salt-master salt-minion salt-api
  35. Installation from Pip
  36. =====================
  37. When only using the macOS system's pip, install this way:
  38. .. code-block:: bash
  39. sudo pip install salt
  40. Salt-Master Customizations
  41. ==========================
  42. .. note::
  43. Salt master on macOS is not tested or supported by SaltStack. See `SaltStack Platform Support <https://saltstack.com/product-support-lifecycle/>`_ for more information.
  44. To run salt-master on macOS, sudo add this configuration option to the /etc/salt/master file:
  45. .. code-block:: bash
  46. max_open_files: 8192
  47. On versions previous to macOS 10.10 (Yosemite), increase the root user maxfiles limit:
  48. .. code-block:: bash
  49. sudo launchctl limit maxfiles 4096 8192
  50. .. note::
  51. On macOS 10.10 (Yosemite) and higher, maxfiles should not be adjusted. The
  52. default limits are sufficient in all but the most extreme scenarios.
  53. Overriding these values with the setting below will cause system
  54. instability!
  55. Now the salt-master should run without errors:
  56. .. code-block:: bash
  57. sudo salt-master --log-level=all
  58. Post-installation tasks
  59. =======================
  60. Now go to the :ref:`Configuring Salt<configuring-salt>` page.