本文适用于rhel5.4, 6.4, 7. 仅以el5.4为例。
1 在线安装方式极为简单:
# wget –no-check-certificate -O install_salt.sh https://bootstrap.saltstack.com
# sh install_salt.sh -I
以上适用于el5, el6, el7等版本。可以在/etc/yum.repos.d/下面发现一堆repo,保存好下面几个:
epel.repo
epel-testing.repo
saltstack-salt-el5-epel-5.repo
2 下面主要说明离线安装方式:
这里主要是服务器无法上外网,所以要采用rpm包安装。离线安装rpm包。
首先是安装downloadonly插件:
# yum install yum-downloadonly
然后将1中的repo文件复制到/etc/yum.repos.d/下面:
epel.repo
epel-testing.repo
saltstack-salt-el5-epel-5.repo
下载安装包:
# yum install -y –downloadonly –downloaddir=/root/salt salt-minion
就在/root/salt下面获得了全部的离线安装包。将这些安装包复制到其他rhel5.4的机器,即可使用rpm安装。
# rpm -ivh *.rpm
# service salt-minion status|restart|stop
附录1:epel.repo
[root@el5-test salt]# cat /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 5 – $basearch
mirrorlist=http://mirrors.Fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 – $basearch – Debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=0
[epel-source]
name=Extra Packages for Enterprise Linux 5 – $basearch – Source
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=0
附录2:epel-testing.repo
[root@el5-test salt]# cat /etc/yum.repos.d/epel-testing.repo
[epel-testing]
name=Extra Packages for Enterprise Linux 5 – Testing – $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/testing/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel5&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
[epel-testing-debuginfo]
name=Extra Packages for Enterprise Linux 5 – Testing – $basearch – Debug
#baseurl=http://download.fedoraproject.org/pub/epel/testing/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-debug-epel5&arch=$basearch
failovermethod=priority
enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=0
[epel-testing-source]
name=Extra Packages for Enterprise Linux 5 – Testing – $basearch – Source
#baseurl=http://download.fedoraproject.org/pub/epel/testing/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel5&arch=$basearch
failovermethod=priority
enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=0
附录3:saltstack-salt-el5-epel-5.repo
[root@el5-test salt]# cat /etc/yum.repos.d/saltstack-salt-el5-epel-5.repo
[saltstack-salt-el5]
name=Copr repo for salt-el5 owned by saltstack
baseurl=https://copr-be.cloud.fedoraproject.org/results/saltstack/salt-el5/epel-5-$basearch/
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/saltstack/salt-el5/pubkey.gpg
enabled=1
更多RedHat相关信息见RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10
本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-05/117036.htm