#!/bin/bash cd /usr/local/src/ wget http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm yum install python-jinja2 yum -y install salt-minion --enablerepo=epel-testing IP=`ifconfig eth1 | grep -i bcast | awk '{print $2}'| awk -F : '{print $2}'` HOSTNAME=yqk_app ID=$IP MASTER=123.56.193.121 echo "master: $MASTER" >>/etc/salt/minion echo "id: $HOSTNAME_$ID" >> /etc/salt/minion service salt-minion restart chkconfig salt-minion on exit 0