安装完RHEL 6.3 首要做的就是添加centos 6.3的软件源
1. 先把RHEL自带的yum卸载
rpm -e --nodeps yum-metadata-parser-1.1.2-16.el6.i686 yum-3.2.29-30.el6.noarch yum-rhn-plugin-0.9.1-40.el6.noarch
2. 安装centos的yum版本
curl -O mirrors.163.com/centos/6.3/os/i386/Packages/yum-3.2.29-30.el6.centos.noarch.rpm curl -O http://mirrors.163.com/centos/6.3/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm curl -O http://mirrors.163.com/centos/6.3/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm curl -O http://mirrors.163.com/centos/6.3/os/i386/Packages/yum-utils-1.1.30-14.el6.noarch.rpm
3. 添加centos 163源
[base] name=CentOS-6.3 - Base - 163.com baseurl=http://mirrors.163.com/centos/6.3/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=os gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-6.3 - Updates - 163.com baseurl=http://mirrors.163.com/centos/6.3/updates/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=updates gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-6.3 - Extras - 163.com baseurl=http://mirrors.163.com/centos/6.3/extras/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=extras gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-6.3 - Plus - 163.com baseurl=http://mirrors.163.com/centos/6.3/centosplus/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=centosplus gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-6.3 - Contrib - 163.com baseurl=http://mirrors.163.com/centos/6.3/contrib/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6.3&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
4. 更新源
yum makecache
安装puppet,facter
环境说明:
puppet master :
yum install ruby ruby-libs ruby-shadow ruby-rdoc yum install puppet facter #如果是puppet master 还需要安装 yum install puppet-server #for redhat or centos apt-get install puppetmaster # for ubuntu
默认puppet的配置文件在 /etc/puppet
在配置puppet之前,要做很重要的一件事就是设置好master和agent的主机名,并把puppet master的主机ip解析写入到hosts文件
10.217.12.115 puppet puppet.example.com #ip地址换成你的puppet master主机的ip
修改puppet master 的配置文件 puppet.conf
[master] certname = puppet.example.com #添加这一行
修改puppet agent配置文件 puppet.conf
[main] server = puppet.example.com #添加这一行
master端启动puppet
puppet master --verbose --no-daemonize
agent端启动
agent发出证书等待master签名
puppet agent --verbose --no-daemonize
master端执行
puppet cert --list #查看等待前面的agent证书 puppet cent --sign --all #签名所有需要签名的证书
如果没有问题,大概2分钟agent端就有屏幕输出,表示已经收到master的签名证书
下一节具体学习puppet配置