搭建salt管理主机+git代码版本管理+Jenkins脚本管理---统一管理环境 第一篇 salt相关安装安装配置

本文介绍了如何在多台主机上使用salt-ssh快速安装和配置salt-master和salt-minion,包括设置yum源、安装salt软件、修改配置文件,并通过salt-key管理minion节点,为后续的git和Jenkins集成打下基础。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前提条件:    安装对应的虚拟机、或者主机服务器,进行ip配置,主机名修改(这里就不做介绍了)

一、安装salt-master 和salt-minion

主机比较少的话,可以手动配置,这里不做介绍,只介绍salt-ssh 多台操作情形:

    主机多,不方便手动一台一台安装salt-minion,因为太费时费事,,这里通过salt-ssh安装salt-minion

前置条件:

        虚拟机的防火墙都处于关闭状态,没关闭可以使用命令:chkconfig iptables off  和  chkconfig ip6tables off  关闭

操作环境:

        以下所有命令都是在主机zk_vm_1上执行

作用:

        实现一台机器批量操作其余多台机器,方便,省去繁琐的执行重复工作,

我这里使用演示主机为:

    master    192.168.40.131

    zk_vm_2     192.168.40.132

    zk_vm_3     192.168.80.128

    zk_vm_4     192.168.40.130

1、在打算安装salt-master的主机(zk_vm_1)上安装salt-ssh

在虚拟机或者主机原有的yum源中是没有salt安装包的,想要yum安装,必须安装其对应 的yum源

[root@root yum.repos.d]# rpm -ivh http://mirrors.zju.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://mirrors.zju.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.UkMjZh: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
[root@root yum.repos.d]# yum list |grep salt
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
python-salttesting.noarch                   2015.7.10-1.el6              epel   
salt.noarch                                 2015.5.10-2.el6              epel   
salt-api.noarch                             2015.5.10-2.el6              epel   
salt-cloud.noarch                           2015.5.10-2.el6              epel   
salt-master.noarch                          2015.5.10-2.el6              epel   
salt-minion.noarch                          2015.5.10-2.el6              epel   
salt-ssh.noarch                             2015.5.10-2.el6              epel   
salt-syndic.noarch                          2015.5.10-2.el6              epel   
[root@root yum.repos.d]# 

现在可以进行安装了,先安装salt-ssh

[root@root yum.repos.d]# yum install salt-ssh
已加载插件:fastestmirror
设置安装进程
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the c
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值