Learn how to install Salt Minion on CentOS 8 with our detailed step-by-step guide. Simplify your configuration management and automate your infrastructure efficiently. #centlinux #linux #saltstack
Table of Contents
What is Salt Minion?
Salt Minion is a component of the SaltStack infrastructure management platform, which is used for remote execution and configuration management of servers and devices. SaltStack, often referred to simply as Salt, operates on a master-minion architecture, where the Salt Master issues commands and the Salt Minions execute them. Here’s an overview of Salt Minion:
Key Features
- Remote Execution: Allows the Salt Master to execute commands on Salt Minions, enabling administrators to perform tasks across multiple systems simultaneously.
- Configuration Management: Facilitates the automation of configuration management by ensuring that systems maintain a specified state defined by Salt States (SLS files).
- Real-Time Communication: Uses a high-speed, bi-directional communication channel (ZeroMQ or TCP) between the master and minions for real-time interaction.
- Scalability: Designed to manage thousands of nodes efficiently, making it suitable for large-scale infrastructure.
- Flexibility and Extensibility: Supports a wide range of modules for different tasks, such as package management, service management, and user management. Extensible with custom modules to suit specific needs.

How Salt Minion Works
Architecture
- Salt Master: Central controller that manages Salt Minions, sends commands, and receives data.
- Salt Minion: Agent installed on each managed system that receives and executes commands from the master.
Communication
- The Salt Minion establishes a connection with the Salt Master, allowing the master to push configurations and commands to the minion.
- Communication is secured using cryptographic keys to ensure data integrity and confidentiality.
State Management
- Salt Minions apply configurations defined in Salt State files, ensuring that each system matches the desired state.
- State files use YAML to define configuration states, making them easy to read and write.
Event-Driven Automation
- Minions can generate events based on specific conditions, triggering automated responses from the master.
Use Cases
- System Administration: Automates routine administrative tasks, such as software installation, updates, and system monitoring.
- Configuration Enforcement: Ensures that systems comply with specified configurations, automatically correcting deviations.
- Orchestration: Manages complex deployments and workflows by coordinating tasks across multiple systems.
- Monitoring and Reporting: Collects data from minions for monitoring purposes and generates reports on system states and compliance.
Benefits
- Efficiency: Streamlines system management, reducing the time and effort required to maintain large-scale infrastructures.
- Consistency: Ensures uniform configurations across all managed systems, reducing the risk of configuration drift.
- Scalability: Capable of managing thousands of systems, making it suitable for enterprise environments.
- Flexibility: Adaptable to various environments and use cases with support for custom modules and extensible features.
Summary
Salt Minion is a critical component of the SaltStack platform, enabling remote execution and configuration management for efficient and scalable infrastructure automation. By allowing centralized control over multiple systems, Salt Minion simplifies complex administrative tasks and ensures consistent system states across an organization’s IT infrastructure.
Recommended Training: Dive Into Ansible – Beginner to Expert in Ansible – DevOps

Environment Specification
We are setting up Salt Minion on a minimal CentOS 8 virtual machine that is optimized for efficiency and lightweight performance. This virtual machine is configured with the following specifications to ensure a stable and responsive environment for installation and operation. A minimal installation helps reduce resource consumption and improves security by including only the essential components required for running Salt Minion.
- CPU – 3.4 Ghz (2 cores)
- Memory – 2 GB
- Storage – 20 GB
- Operating System – CentOS Linux 8.2
- Hostname – saltstack-minion-01.centlinux.com
- IP Address – 192.168.116.228 /24
140W Charger for MacBook Pro 16 14 inch, Mac Air 15 13 inch 2024 2023 2022 2021 M3 M2 M1【Original Quality】 USB-C Fast Charger Power Adapter & 6.6FT USB C to Magnetic 3 Cable LED (UL Safety Certified)
$39.99 (as of March 7, 2025 18:48 GMT +00:00 – More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Update Linux Software Packages
Connect with saltstack-minion-01.centlinux.com as root user by using a ssh tool.
It is a best practice to update software packages on Linux operating system before installing anything new. Therefore, execute following dnf command to update all CentOS 8 software packages.
# dnf update -y
Install Python on CentOS 8
SaltStack is a Python-based automation and configuration management tool, which means it relies on Python to compile and execute its commands effectively. Since SaltStack is written in Python, having the correct Python version installed is essential for ensuring compatibility and proper functionality.
CentOS 8 and RHEL 8 include Python 3.6 in their default AppStream repository, making the installation process straightforward. We can easily install Python 3.6 and its dependencies using the dnf package manager with the following command:
# dnf install -y python3
This ensures that the required Python environment is set up before proceeding with the installation and configuration of SaltStack Minion.
Install SaltStack Yum Repository
Although SaltStack software packages are available via EPEL (Extra Packages for Enterprise Linux) yum repository.
But if you want to install the latest version of the software, then you have to install SaltStack official yum repository as follows.
# dnf install -y https://repo.saltstack.com/py3/redhat/salt-py3-repo-latest.el8.noarch.rpm
Build cache for newly installed yum repositories.
# dnf makecache
CentOS-8 - AppStream 5.1 kB/s | 4.3 kB 00:00
CentOS-8 - Base 8.8 kB/s | 3.9 kB 00:00
CentOS-8 - Extras 2.2 kB/s | 1.5 kB 00:00
SaltStack Latest Release Channel Python 3 for R 132 kB/s | 224 kB 00:01
Metadata cache created.
Install Salt Minion on CentOS 8
We have added SaltStack official yum repository, now we can install SaltStack Minion by using the dnf command.
# dnf install -y salt-minion
Configure SaltStack Minion
Default configurations of SaltStack minion works fine, except that you need to tell the Minion about the Master server.
Therefore, edit SaltStack minion configuration file by using vim text editor.
# vi /etc/salt/minion
Locate following directive therein.
#master: salt
and replace the above directive with the following directive.
master: saltstack-master-01.centlinux.com
Where saltstack-master-01.centlinux.com is the SaltStack Master server that we have configured in our previous article. Please refer to How to install Salt Master on CentOS 8.
Enable and start salt-minion service.
# systemctl enable --now salt-minion
Created symlink /etc/systemd/system/multi-user.target.wants/salt-minion.service â /usr/lib/systemd/system/salt-minion.service.
Add SaltStack Minion to Master Server
Connect with saltstack-master-01.centlinux.com as root user by using PuTTY.
Display list of all public keys known to SaltStack master server.
# salt-key -L
Accepted Keys:
saltstack-master-01.centlinux.com
Denied Keys:
Unaccepted Keys:
saltstack-minion-01.centlinux.com
Rejected Keys:
You can see that, there is one unaccepted key i.e. saltstack-minion-01.centlinux.com. It is the public key of our SaltStack minion.
Accept this key by using following command.
# salt-key -A
The following keys are going to be accepted:
Unaccepted Keys:
saltstack-minion-01.centlinux.com
Proceed? [n/Y] Y
Key for minion saltstack-minion-01.centlinux.com accepted.
Remote Execution of commands on SaltStack Minion
Your Minion has been added in SaltStack Master inventory. You can now execute commands on this minion.
For demonstration, we are remotely installing Apache web server on saltstack-minion-01.centlinux.com.
# salt 'saltstack-minion-01.centlinux.com' cmd.run 'dnf install -y httpd'

Enable and start Apache service on saltstack-minion-01.
# salt 'saltstack-minion-01.centlinux.com' cmd.run 'systemctl enable --now httpd.service'
saltstack-minion-01.centlinux.com:
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service -> /usr/lib/systemd/system/httpd.service.
Allow http service in Linux firewall on saltstack-minion-01.
# salt 'saltstack-minion-01.centlinux.com' cmd.run 'firewall-cmd --add-service=http'
saltstack-minion-01.centlinux.com:
success
Now, access the newly configured web server by using curl command.
# curl -I http://saltstack-minion-01.centlinux.com
HTTP/1.1 403 Forbidden
Date: Tue, 11 Aug 2020 19:25:57 GMT
Server: Apache/2.4.37 (centos)
Content-Location: index.html.zh-CN
Vary: negotiate,accept-language
TCN: choice
Last-Modified: Fri, 14 Jun 2019 03:37:43 GMT
ETag: "fa6-58b405e7d6fc0;5ac9f026acb21"
Accept-Ranges: bytes
Content-Length: 4006
Content-Type: text/html; charset=UTF-8
Content-Language: zh-cn
Apache web server has been installed and configured on your SaltStack minion.
The Wireless Cookbook
$41.99 (as of March 7, 2025 18:51 GMT +00:00 – More infoProduct prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on [relevant Amazon Site(s), as applicable] at the time of purchase will apply to the purchase of this product.)Final Thoughts
Installing SaltStack Minion on CentOS 8 is a straightforward process that involves adding the SaltStack repository, installing the Minion package, and configuring it to communicate with the Salt Master. By following the steps outlined, you can successfully set up the Minion and integrate it into your SaltStack environment for centralized automation and configuration management.
After installation, ensure the Minion is properly configured by verifying its connection with the Salt Master and accepting its key. Once connected, you can start executing remote commands and managing your infrastructure efficiently using SaltStack’s powerful automation capabilities.
Need a dependable Linux system administrator? I specialize in managing, optimizing, and securing Linux servers to keep your operations running flawlessly. Check out my services on Fiverr!
FAQs
What is Salt Minion in SaltStack?
Salt Minion is an agent that runs on managed nodes and receives commands from the Salt Master for automation and configuration management.
How do I install Salt Minion on CentOS 8?
Add the SaltStack repository, install the salt-minion
package using dnf
, and start the service with systemctl enable --now salt-minion
.
How do I configure Salt Minion to connect to the Salt Master?
Edit the Minion configuration file (/etc/salt/minion
) and set the master
parameter to the Salt Master’s hostname or IP address.
How do I verify that Salt Minion is connected to the Master?
On the Salt Master, run salt-key -L
to check if the Minion’s key appears. Accept it using salt-key -A
, then test with salt '*' test.ping
.
What should I do if Salt Minion fails to connect to the Master?
Ensure network connectivity, verify firewall rules, check the Minion’s configuration, and restart the service using systemctl restart salt-minion
.
Leave a Reply
You must be logged in to post a comment.