1
0

freebsd.rst 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. =======
  2. FreeBSD
  3. =======
  4. Installation
  5. ============
  6. Salt is available in the FreeBSD ports tree at `sysutils/py-salt
  7. <https://www.freshports.org/sysutils/py-salt/>`_.
  8. FreeBSD binary repo
  9. ===================
  10. .. code-block:: bash
  11. pkg install py27-salt
  12. FreeBSD ports
  13. =============
  14. By default salt is packaged using python 2.7, but if you build your own packages from FreeBSD ports either by hand or with poudriere you can instead package it with your choice of python. Add a line to /etc/make.conf to choose your python flavour:
  15. .. code-block:: text
  16. echo "DEFAULT_VERSIONS+= python=3.6" >> /etc/make.conf
  17. Then build the port and install:
  18. .. code-block:: bash
  19. cd /usr/ports/sysutils/py-salt
  20. make install
  21. Post-installation tasks
  22. =======================
  23. **Master**
  24. Copy the sample configuration file:
  25. .. code-block:: bash
  26. cp /usr/local/etc/salt/master.sample /usr/local/etc/salt/master
  27. **rc.conf**
  28. Activate the Salt Master in ``/etc/rc.conf``:
  29. .. code-block:: bash
  30. sysrc salt_master_enable="YES"
  31. **Start the Master**
  32. Start the Salt Master as follows:
  33. .. code-block:: bash
  34. service salt_master start
  35. **Minion**
  36. Copy the sample configuration file:
  37. .. code-block:: bash
  38. cp /usr/local/etc/salt/minion.sample /usr/local/etc/salt/minion
  39. **rc.conf**
  40. Activate the Salt Minion in ``/etc/rc.conf``:
  41. .. code-block:: bash
  42. sysrc salt_minion_enable="YES"
  43. **Start the Minion**
  44. Start the Salt Minion as follows:
  45. .. code-block:: bash
  46. service salt_minion start
  47. Now go to the :ref:`Configuring Salt<configuring-salt>` page.