91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

RHEL6.3 源碼安裝Puppet

發布時間:2020-07-24 13:01:44 來源:網絡 閱讀:1020 作者:暗黑魔君 欄目:編程語言

操作系統RHEL6.3 x64
facter: https://downloads.puppetlabs.com/facter/
puppet: https://downloads.puppetlabs.com/puppet/
一.安裝puppet Server
1.配置yum源
[root@master ~]# cat  /etc/yum.repos.d/yum.repo
[core]
name=rhel
baseurl=ftp://dhcp.clovem.com/pub/
enabled=1
gpgcheck=0
2.安裝ruby
[root@master ~]# yum  install ruby ruby-libs ruby-shadow -y
3.安裝facter
[root@master ~]# tar zxvf facter-1.6.8.tgz ; cd facter-1.6.8
[root@master ~]# ruby install.rb
4.安裝puppet master
[root@master ~]# tar zxvf   puppet-3.2.0-rc1.tar.gz ; cd  puppet-3.2.0-rc1
[root@master ~]# ruby install.rb
5.復制配置文件
[root@master puppet-3.2.0-rc1]# cp ext/redhat/puppet.conf  /etc/puppet/puppet.conf
[root@master puppet-3.2.0-rc1]# cp  ext/redhat/server.init   /etc/init.d/puppetmaster
[root@master puppet-3.2.0-rc1]# useradd  puppet
[root@master puppet-3.2.0-rc1]#chmod a+x    /etc/init.d/puppetmaster
[root@master puppet-3.2.0-rc1]#chkconfig --add puppetmaster
[root@master puppet-3.2.0-rc1]#chkconfig puppetmaster on
[root@master puppet-3.2.0-rc1]#service puppetmaster start
二.安裝puppet Agent
1.配置yum源
[root@rs1 ~]# cat  /etc/yum.repos.d/yum.repo
[core]
name=rhel
baseurl=ftp://dhcp.clovem.com/pub/
enabled=1
gpgcheck=0
2.安裝ruby
[root@rs1 ~]# yum  install ruby ruby-libs ruby-shadow -y
3.安裝facter
[root@rs1 ~]# tar zxvf facter-1.6.8.tgz ; cd facter-1.6.8
[root@rs1 ~]# ruby install.rb
4.安裝puppet agent
[root@rs1 ~]# tar zxvf   puppet-3.2.0-rc1.tar.gz ; cd  puppet-3.2.0-rc1
[root@rs1 ~]# ruby install.rb
5.復制配置文件
[root@rs1 puppet-3.2.0-rc1]# cp ext/redhat/puppet.conf  /etc/puppet/puppet.conf
[root@rs1 puppet-3.2.0-rc1]# cp  ext/redhat/client.init   /etc/init.d/puppet
[root@rs1 puppet-3.2.0-rc1]#chkconfig --add puppet
[root@rs1 puppet-3.2.0-rc1]#chkconfig puppet on
[root@rs1 puppet-3.2.0-rc1]#service puppet start
三. 配置認證
1.Agent端
(1)添加解析記錄
[root@rs1 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.24.40.23    master.clovem.com
172.24.40.25    rs1.clovem.com
在/etc/puppet/puppet.conf 的[main]中加入server=master.clovem.com
[root@rs1 ~]# cat /etc/puppet/puppet.conf  |grep server
   server=master.clovem.com
(2) 發送驗證請求
[root@rs1 ~]# puppet  agent --server=master.clovem.com --test
Info: Creating a new SSL key for rs1.clovem.com
Info: Caching certificate for ca
Info: Creating a new SSL certificate request for rs1.clovem.com
Info: Certificate Request fingerprint (SHA256): 51:95:52:65:05:BF:3D:C7:23:AA:2F:48:E7:42:B7:A5:83:58:25:E3:F2:7F:47:78:D6:30:F7:F9:6B:0C:F6:4E
Exiting; no certificate found and waitforcert is disabled
[root@rs1 ~]# ll /var/lib/puppet/ssl/certs/
total 4
-rw-r--r-- 1 root root 1887 May  7 23:14 ca.pem
2.服務端
(1) 添加解析記錄
[root@master ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.24.40.10    dhcp.clovem.com
172.24.40.23    master.clovem.com
172.24.40.25    rs1.clovem.com
(2) 列出驗證請求
[root@master ~]# puppet cert list
 "rs1.clovem.com" (SHA256) 51:95:52:65:05:BF:3D:C7:23:AA:2F:48:E7:42:B7:A5:83:58:25:E3:F2:7F:47:78:D6:30:F7:F9:6B:0C:F6:4E
(3) 進行證書簽名
[root@master ~]# puppet cert --sign rs1.clovem.com //如果需要簽名所有,使用--sign --all
Notice: Signed certificate request for rs1.clovem.com
Notice: Removing file Puppet::SSL::CertificateRequest rs1.clovem.com at '/var/lib/puppet/ssl/ca/requests/rs1.clovem.com.pem'
3.客戶端驗證
[root@rs1 ~]# puppet  agent --server=master.clovem.com --test
Info: Caching certificate for rs1.clovem.com
Info: Caching certificate_revocation_list for ca
Info: Retrieving plugin
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://master.clovem.com/plugins
Info: Caching catalog for rs1.clovem.com
Info: Applying configuration version '1367939978'
Info: Creating state file /var/lib/puppet/state/state.yaml
Notice: Finished catalog run in 0.03 seconds
[root@rs1 ~]# ls /var/lib/puppet/ssl/certs/     //發現此時多出rs1.clovem.com.pem
ca.pem  rs1.clovem.com.pem
三.簡單測試
1.服務端配置:
[root@master ~]# cat /etc/puppet/manifests/site.pp  //修改之后立即生效,無需重啟puppetmaster服務
node default{
  file { "/tmp/test.txt":
          content=> "hello, this is firt puppet test\n";
}
}
2.客戶端查看是否成功創建文件
由于puppet Agent端默認30分鐘跟Master端進行同步配置文件,所以此處進行手動重啟,查看是否成功
如果需要修改同步時間,在/etc/puppet/puppet.conf 的[agent]下加入runinterval = n  ,表示n秒同步
[root@ts1 ~]# service puppet restart  
[root@ts1 ~]# cat /tmp/test.txt
hello, this is firt puppet test


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

和平县| 若羌县| 定襄县| 车险| 仁布县| 蒙自县| 德安县| 山东| 湘乡市| 尚志市| 炉霍县| 卢湾区| 日喀则市| 天台县| 砚山县| 阿合奇县| 鹤岗市| 绿春县| 大理市| 襄汾县| 苏尼特左旗| 乡城县| 绵阳市| 六盘水市| 额尔古纳市| 延安市| 海口市| 禹城市| 黄山市| 麻阳| 白朗县| 聊城市| 呼伦贝尔市| 安丘市| 商丘市| 尉氏县| 思茅市| 新密市| 当雄县| 鄂托克前旗| 凤冈县|