本文适用于rhel5.4, 6.4, 7. 仅以el5.4为例。
# wget --no-check-certificate -O install_salt.sh https://bootstrap.saltstack.com # sh install_salt.sh -I
epel.repo epel-testing.repo saltstack-salt-el5-epel-5.repo
这里主要是服务器无法上外网,所以要采用rpm包安装。离线安装rpm包。
首先是安装downloadonly插件:
# yum install yum-downloadonly
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
[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
[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
[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