Linux (RPM)¶
These instructions explain how to install Salt rpms on operating systems that
are RHEL-like (using dnf
install methods).
For a list of supported and tested operating systems, for running Salt, see Salt supported operating systems.
What is onedir?
Onedir is the Salt Project’s new packaging system. Onedir packages of Salt include the version of Python needed to run Salt and Salt’s required dependencies.
Beginning with the release of Salt 3006 LTS (Sulfur), the Salt Project has phased out classic package builds for supported operating systems. Update your Salt infrastructure to the onedir packages as soon as possible. See Upgrade to onedir for more information.
Before you start¶
Before installing Salt on your operating system, ensure that you first:
Install Salt RPMs¶
Run the following command to install the Salt Project repository:
curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo | sudo tee /etc/yum.repos.d/salt.repo
Note
Because of the presence of classic packages of Salt in EPEL, it’s possible that when you download the package from EPEL, it instead downloads classic packages of older versions of Salt instead of the onedir packages.
During depsolving, when choosing the best provider among several,
dnf
respects the priority of each provider’s repository. The value is an integer from 1 to 99, with 1 being the most preferred repository and 99 the least preferred. By default all repositories have the priority of 80.EPEL was treating the Salt repository as 99. To resolve this issue, Salt has changed its priority level to 10 for RHEL 8 and 9.
Run
sudo dnf clean expire-cache
to clear the repository metadata.Install the salt-minion, salt-master, or other Salt components:
Available installs:
sudo dnf install salt-master sudo dnf install salt-minion sudo dnf install salt-ssh sudo dnf install salt-syndic sudo dnf install salt-cloud sudo dnf install salt-api
If wanting to install by a target point release, append the specific Salt full release version. For example:
sudo dnf install salt-master-3006.9 sudo dnf install salt-minion-3006.9 sudo dnf install salt-ssh-3006.9 sudo dnf install salt-syndic-3006.9 sudo dnf install salt-cloud-3006.9 sudo dnf install salt-api-3006.9
dnf versionlock
can be used to pin to minor versions, if wanting to be excluded duringdnf upgrade
runs on a system.sudo dnf install 'dnf-command(versionlock)'
sudo dnf versionlock add salt sudo dnf versionlock add salt-master sudo dnf versionlock add salt-minion sudo dnf versionlock add salt-ssh sudo dnf versionlock add salt-syndic sudo dnf versionlock add salt-cloud sudo dnf versionlock add salt-api
Warning
STS not recommended for Production
Salt Project recommends deploying LTS releases for Production environments.
If users would like to restrict their installs to the Salt 3007 STS point releases, these install steps include enabling Salt 3007 STS release downloads.
# Enable the Salt 3007 STS repo sudo dnf config-manager --set-disable salt-repo-* sudo dnf config-manager --set-enabled salt-repo-3007-sts
Available installs:
sudo dnf install salt-master sudo dnf install salt-minion sudo dnf install salt-ssh sudo dnf install salt-syndic sudo dnf install salt-cloud sudo dnf install salt-api
If wanting to install by a target point release, append the specific Salt full release version. For example:
sudo dnf install salt-master-3007.1 sudo dnf install salt-minion-3007.1 sudo dnf install salt-ssh-3007.1 sudo dnf install salt-syndic-3007.1 sudo dnf install salt-cloud-3007.1 sudo dnf install salt-api-3007.1
dnf versionlock
can be used to pin to minor versions, if wanting to be excluded duringdnf upgrade
runs on a system.sudo dnf install 'dnf-command(versionlock)'
sudo dnf versionlock add salt sudo dnf versionlock add salt-master sudo dnf versionlock add salt-minion sudo dnf versionlock add salt-ssh sudo dnf versionlock add salt-syndic sudo dnf versionlock add salt-cloud sudo dnf versionlock add salt-api
Warning
STS not recommended for Production
Salt Project recommends deploying LTS releases for Production environments.
If users would like to leave installs to come from either LTS or STS, whichever major version is latest.
# Enable the Salt LATEST repo sudo dnf config-manager --set-disable salt-repo-* sudo dnf config-manager --set-enabled salt-repo-latest
Available installs:
sudo dnf install salt-master sudo dnf install salt-minion sudo dnf install salt-ssh sudo dnf install salt-syndic sudo dnf install salt-cloud sudo dnf install salt-api
If wanting to install by a target point release, append the specific Salt full release version. For example:
sudo dnf install salt-master-3007.1 sudo dnf install salt-minion-3007.1 sudo dnf install salt-ssh-3007.1 sudo dnf install salt-syndic-3007.1 sudo dnf install salt-cloud-3007.1 sudo dnf install salt-api-3007.1
dnf versionlock
can be used to pin to minor versions, if wanting to be excluded duringdnf upgrade
runs on a system.sudo dnf install 'dnf-command(versionlock)'
sudo dnf versionlock add salt sudo dnf versionlock add salt-master sudo dnf versionlock add salt-minion sudo dnf versionlock add salt-ssh sudo dnf versionlock add salt-syndic sudo dnf versionlock add salt-cloud sudo dnf versionlock add salt-api
Enable and start the Salt services:
Available services:
sudo systemctl enable salt-master && sudo systemctl start salt-master sudo systemctl enable salt-minion && sudo systemctl start salt-minion sudo systemctl enable salt-syndic && sudo systemctl start salt-syndic sudo systemctl enable salt-api && sudo systemctl start salt-api
Note
When you install a onedir version of Salt (3006 and later), Salt installs its own local version of Python and the dependencies needed for the core functionality of Salt.
After installing a onedir verison of Salt, your system has both a global version of Python at the system level and a local version of Python used by Salt. This architecture change means that the Salt onedir paths for Python are different and you need to change how you install third-party Python dependencies that you use with Salt, including your state files. See Install dependencies for more information.
After installing Salt on your operating system, you need to complete the following post-installation steps:
Browse the repo¶
rpm 3006.9