设为首页 收藏本站
查看: 817|回复: 0

[经验分享] Installation saltstack on RHEL CentOS-12213582

[复制链接]

尚未签到

发表于 2018-7-31 11:45:25 | 显示全部楼层 |阅读模式
  Salt should work properly with all mainstream derivatives of Red Hat Enterprise Linux, including CentOS, Scientific Linux, Oracle Linux, and Amazon Linux. Report any bugs or issues on the issue tracker.
INSTALLATION FROM THE SALTSTACK REPOSITORY
  2015.5 and later packages for RHEL 5, 6, and 7 are available in the SaltStack repository.
  重要

  The repository folder structure changed in the 2015.8.3>  To install using the SaltStack repository:

  •   Run one of the following commands based on your version to import the SaltStack repository key:
      Version 7:
    rpm --import https://repo.saltstack.com/yum/redhat/7/x86_64/latest/SALTSTACK-GPG-KEY.pub  Version 6:
    rpm --import https://repo.saltstack.com/yum/redhat/6/x86_64/latest/SALTSTACK-GPG-KEY.pub  Version 5:
    wget https://repo.saltstack.com/yum/redhat/5/x86_64/latest/SALTSTACK-EL5-GPG-KEY.pub  
    rpm --import SALTSTACK-EL5-GPG-KEY.pub
      
    rm -f SALTSTACK-EL5-GPG-KEY.pub
  •   Save the following file to /etc/yum.repos.d/saltstack.repo:
      Version 7 and 6:
    [saltstack-repo]name=SaltStack repo for RHEL/CentOS $releaseverbaseurl=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latestenabled=1gpgcheck=1gpgkey=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/SALTSTACK-GPG-KEY.pub  Version 5:
    [saltstack-repo]name=SaltStack repo for RHEL/CentOS $releaseverbaseurl=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latestenabled=1gpgcheck=1gpgkey=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/SALTSTACK-EL5-GPG-KEY.pub
  •   Run sudo yum clean expire-cache.
  •   Run sudo yum update.
  •   Install the salt-minion, salt-master, or other Salt components:


  •   yum install salt-master
  •   yum install salt-minion
  •   yum install salt-ssh
  •   yum install salt-syndic
  •   yum install salt-cloud
  注解
  As of 2015.8.0, EPEL repository is no longer required for installing on RHEL systems. SaltStack repository provides all needed dependencies.
  警告

  If installing on Red Hat Enterprise Linux 7 with disabled (not subscribed on) 'RHEL Server>[saltstack-repo]name=SaltStack repo for Red Hat Enterprise Linux $releaseverbaseurl=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latestenabled=1gpgcheck=1gpgkey=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/SALTSTACK-GPG-KEY.pub       https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/base/RPM-GPG-KEY-CentOS-7  注解
  systemd and python-systemd are required by Salt, but are not installed by the Red Hat 7 @base installation or by the Salt installation. These dependencies might need to be installed before Salt.
INSTALLATION FROM THE COMMUNITY REPOSITORY
  Beginning with version 0.9.4, Salt has been available in EPEL. For RHEL/CentOS 5, Fedora COPR is a single community repository that provides Salt packages due to the removal from EPEL5.
  注解

  Packages in these repositories are built by community, and it can take a little while until the latest stable SaltStack>RHEL/CENTOS 6 AND 7, SCIENTIFIC LINUX, ETC.
  警告
  Salt 2015.8 is currently not available in EPEL due to unsatisfied dependencies: python-crypto 2.6.1 or higher, andpython-tornado version 4.2.1 or higher. These packages are not currently available in EPEL for Red Hat Enterprise Linux 6 and 7.
ENABLING EPEL
  If the EPEL repository is not installed on your system, you can download the RPM for RHEL/CentOS 6 or forRHEL/CentOS 7 and install it using the following command:
rpm -Uvh epel-release-X-Y.rpm  Replace epel-release-X-Y.rpm with the appropriate filename.
安装稳定版
  Salt is packaged separately for the minion and the master. It is necessary to install only the appropriate package for the role the machine will play. Typically, there will be one master and multiple minions.


  •   yum install salt-master
  •   yum install salt-minion
  •   yum install salt-ssh
  •   yum install salt-syndic
  •   yum install salt-cloud
从 EPEL-TESTING 安装
  When a new Salt>epel-testing repository, before being moved to the stable EPEL repository.
  To install from epel-testing, use the enablerepo argument for yum:
yum --enablerepo=epel-testing install salt-minion使用PIP安装
  Since Salt is on PyPI, it can be installed using pip, though most users prefer to install using RPM packages (which can be installed from EPEL).
  Installing from pip has a few additional requirements:

  •   Install the group 'Development Tools', yum groupinstall 'Development Tools'
  •   Install the 'zeromq-devel' package if it fails on linking against that afterwards as well.
  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  警告
  如果从pip安装(或者使用 setup.py install 从源码安装),需要注意 yum-utils 被Salt依赖,用于管理软件包。同样的,如果Python依赖没有安装,你需要额外安装库/工具来构建一些依赖。更多信息点 这里。
ZEROMQ 4
  We recommend using ZeroMQ 4 where available. SaltStack provides ZeroMQ 4.0.5 and pyzmq 14.5.0 in theSaltStack Repository as well as a separate zeromq4 COPR repository.
  If this repository is added before Salt is installed, then installing either salt-master or salt-minion will automatically pull in ZeroMQ 4.0.5, and additional steps to upgrade ZeroMQ and pyzmq are unnecessary.
  警告
  RHEL/CentOS 5 Users Using COPR repos on RHEL/CentOS 5 requires that the python-hashlib package be installed. Not having it present will result in checksum errors because YUM will not be able to process the SHA256 checksums used by COPR.
  注解
  For RHEL/CentOS 5 installations, if using the SaltStack repo or Fedora COPR to install Salt (as described above), then it is not necessary to enable the zeromq4 COPR, because those repositories already include ZeroMQ 4.
包管理
  Salt's interface to yum makes heavy use of the repoquery utility, from the yum-utils package. This package will be installed as a dependency if salt is installed via EPEL. However, if salt has been installed using pip, or a host is being managed using salt-ssh, then as of version 2014.7.0 yum-utils will be installed automatically to satisfy this dependency.
安装后的工作
MASTER
  配置master开机自动启动:
  RHEL/CentOS 5 and 6
chkconfig salt-master on  RHEL/CentOS 7
systemctl enable salt-master.service  启动Master:
  RHEL/CentOS 5 and 6
service salt-master start  RHEL/CentOS 7
systemctl start salt-master.serviceMINION
  配置Minion开机自动启动:
  RHEL/CentOS 5 and 6
chkconfig salt-minion on  RHEL/CentOS 7
systemctl enable salt-minion.service  启动Minion:
  RHEL/CentOS 5 and 6
service salt-minion start  RHEL/CentOS 7
systemctl start salt-minion.service  现在前往 :doc: 配置Salt </ref/configuration/index> 页面.
  转载自:http://docs.saltstack.cn/topics/installation/rhel.html#minion

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-544114-1-1.html 上篇帖子: 安装saltstack遇到的问题锦集 下篇帖子: Saltstack 安装应用笔记一
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表