OS X

安装依赖

It should be noted that Homebrew explicitly discourages the use of sudo:

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

So when using Homebrew, if you want support from the Homebrew community, install this way:

brew install saltstack

When using MacPorts, install this way:

sudo port install salt

When only using the OS X system's pip, install this way:

sudo pip install salt

定制 Salt-Master

要在 OS X 上运行 salt-master,root 用户的 maxfiles limit 必须要增加:

注解

On OS X 10.10 (Yosemite) and higher, maxfiles should not be adjusted. The default limits are sufficient in all but the most extreme scenarios. Overriding these values with the setting below will cause system instability!

sudo launchctl limit maxfiles 4096 8192

使用sudo将此配置选项添加到 /etc/salt/master 文件:

max_open_files: 8192

现在运行 salt-master 应该不会出现错误:

sudo salt-master --log-level=all

安装后的工作

现在前往 :doc: 配置Salt </ref/configuration/index> 页.