How to Install Salt on Debian Latest

Salt, also known as SaltStack, is a powerful automation tool that can help manage a variety of tasks across multiple systems. This guide will walk you through the steps required to install Salt on a Debian latest version.

Prerequisites

Before you begin, you will need:

Step 1: Update

It's always a good idea to update your server before installing any new software to ensure you have the latest software package information.

To update the package list, type the following command:

sudo apt-get update

Step 2: Install Salt Master

The Salt Master is the central control server that manages all the Salt Minions. You will need to install Salt Master on your Debian latest in order to start managing your servers.

To install Salt Master, type the following command:

sudo apt-get install salt-master

Once the installation is complete, Salt Master is automatically started as a service.

Step 3: Install Salt Minion

The Salt Minion is a client-side tool that runs on every server and talks to the Salt Master to receive commands or send data. It needs to be installed on each server that you want to manage with Salt.

To install Salt Minion, type the following command:

sudo apt-get install salt-minion

Once the installation is complete, you need to configure Salt Minion.

Step 4: Configure Salt Minion

To configure Salt Minion, you need to edit the configuration file at /etc/salt/minion.

To open the file, type the following command:

sudo nano /etc/salt/minion

In the file, you need to specify the IP address or host name of the Salt Master.

# Set the location of the Salt Master server
master: <ip_address_or_hostname>

Save the file and exit.

Step 5: Start Salt Minion Service

Once you have configured Salt Minion, you can start the Salt Minion service.

To start the Salt Minion service, type the following command:

sudo systemctl start salt-minion

Make sure to enable the Salt Minion service so it starts automatically on system boot.

sudo systemctl enable salt-minion

Step 6: Accept Salt Minion Key

By default, all new Salt Minions are rejected until they are accepted by the Salt Master. You need to log into the Salt Master server to accept the Salt Minion key.

To accept the Salt Minion key, type the following command:

sudo salt-key -A

The Salt Master will prompt you to accept the key for the new Salt Minion.

Conclusion

You have successfully installed and configured Salt on your Debian latest server. You can now begin managing your servers with Salt.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!