在0.9.4版本后,Salt已经可以在主要的Fedora源和 EPEL 中找到。使用yum安装即可。 相比红帽系列其他成员,Fedora有更新版本的Salt。这是一个伟大的地方,以帮助改善Salt!
WARNING: Fedora 19 comes with systemd 204. Systemd has known bugs fixed in later revisions that prevent the salt-master from starting reliably or opening the network connections that it needs to. It's not likely that a salt-master will start or run reliably on any distribution that uses systemd version 204 or earlier. Running salt-minions should be OK.
Salt可以通过 yum
和标准的Fedora仓库来安装。
Salt的master和minion包是分开的。机器只需要安装相应的包即可运行。通常情况下,会有一个master和多个minions。
yum install salt-master
yum install salt-minion
When a new Salt release is packaged, it is first admitted into the
updates-testing
repository, before being moved to the stable repo.
想要从 updates-testing
安装,使用yum带上 enablerepo
参数:
yum --enablerepo=updates-testing install salt-master
yum --enablerepo=updates-testing install salt-minion
Since Salt is on PyPI, it can be installed using pip, though most users prefer to install using a package manager.
Installing from pip has a few additional requirements:
dnf groupinstall 'Development Tools'
A pip install does not make the init scripts or the /etc/salt directory, and you will need to provide your own systemd service unit.
Installation from pip:
pip install salt
警告
If installing from pip (or from source using setup.py install
), be
advised that the yum-utils
package is needed for Salt to manage
packages. Also, if the Python dependencies are not already installed, then
you will need additional libraries/tools installed to build some of them.
More information on this can be found here.
Master
配置master开机自动启动:
systemctl enable salt-master.service
启动Master:
systemctl start salt-master.service
Minion
配置Minion开机自动启动:
systemctl enable salt-minion.service
启动Minion:
systemctl start salt-minion.service
现在前往 :doc: 配置Salt </ref/configuration/index> 页.