yum安装puppet

author:headsen chen     2017-10-31  17:09:35

个人原创,转载请注明作者和出处,否则依法追究法律责任:

环境:centos 6.5

[root@server ~]# uname -a
Linux server.com 2.6.32-696.13.2.el6.x86_64 #1 SMP Thu Oct 5 21:22:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

安装puppet的yum源,默认的yum仓库和epel的扩展库里都没有puppet的安装包

wget http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-1.noarch.rpm

yum install puppetlabs-release-6-1.noarch.rpm

yum update

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

主机端:

[root@server ~]# yum -y install ruby facter puppet-server

主机端启动

service puppet start
service puppetmaster start
设置开机自启动
chkconfig puppet on
chkconfig puppetmaster on
 
以上过程全部的操作代码:

[root@smb ~]# wget http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-1.noarch.rpm
...

[root@smb ~]# ls
anaconda-ks.cfg Downloads kaifa Public ulian
Desktop install.log Music puppetlabs-release-6-1.noarch.rpm Videos
Documents install.log.syslog Pictures Templates
[root@smb ~]# rpm -ivh puppetlabs-release-6-1.noarch.rpm
warning: puppetlabs-release-6-1.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 4bd6ec30: NOKEY
Preparing... ########################################### [100%]
1:puppetlabs-release ########################################### [100%]
[root@smb ~]# ls
anaconda-ks.cfg Downloads kaifa Public ulian
Desktop install.log Music puppetlabs-release-6-1.noarch.rpm Videos
Documents install.log.syslog Pictures Templates
[root@smb ~]# yum update
...

[root@smb ~]# yum repolist
...
base CentOS-6 - Base - mirrors.aliyun.com                                                6,706
extras CentOS-6 - Extras - mirrors.aliyun.com                                                 45
puppetlabs-deps Puppet Labs Dependencies El 6 - x86_64                          77
puppetlabs-products Puppet Labs Products El 6 - x86_64                             564
updates CentOS-6 - Updates - mirrors.aliyun.com                                         642
repolist:     8,034
[root@smb ~]# yum install puppet-server facter ruby

[root@smb ~]# service puppet start        ------------------------------------------------------------------------- 这一步不能报错。若报错则要重新安装!!!!!!!
Starting puppet agent: [ OK ]
[root@smb ~]# service puppetmaster start
Starting puppetmaster: [ OK ]
[root@smb ~]# chkconfig puppet on
[root@smb ~]# chkconfig puppetmaster on
[root@smb ~]#

 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

客户端:

[root@localhost ~]# echo "192.168.115.81 server.com" >>/etc/hosts
[root@localhost ~]# echo "192.168.115.87 client.com" >>/etc/hosts
[root@localhost ~]# vim /etc/sysconfig/network
[root@localhost ~]# hostname client.com
[root@localhost ~]# hostname
client.com

[root@localhost ~]# ping client.com
PING client.com (192.168.115.87) 56(84) bytes of data.
64 bytes from client.com (192.168.115.87): icmp_seq=1 ttl=64 time=0.040 ms
64 bytes from client.com (192.168.115.87): icmp_seq=2 ttl=64 time=0.024 ms
^C
--- client.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1734ms
rtt min/avg/max/mdev = 0.024/0.032/0.040/0.008 ms
[root@localhost ~]# ping server.com

[root@localhost ~]# yum -y install ntpdate
...
[root@localhost ~]# ntpdate ntp.api.bz
31 Oct 16:37:48 ntpdate[3577]: step time server 115.28.122.198 offset 5941581.400510 sec
[root@localhost ~]# date
Tue Oct 31 16:37:50 HKT 2017
[root@localhost ~]# mv /etc/localtime /etc/localtime.bak
[root@localhost ~]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[root@localhost ~]# date
Tue Oct 31 16:38:23 CST 2017
[root@localhost ~]# date
Tue Oct 31 16:38:28 CST 2017
[root@localhost ~]# hwclock -w
[root@localhost ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.115.81 server.com
192.168.115.87 client.com

[root@localhost ~]# wget http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-1.noarch.rpm
...

[root@localhost ~]# yum install puppetlabs-release-6-1.noarch.rpm

[root@localhost ~]# yum update

Complete!

[root@localhost ~]# yum install -y ruby facter puppet

[root@localhost ~]# service puppet start

Starting puppet agent: [ OK ]     ------------------------------------------------------------------- 此处不能报错,若报错则应重新安装!!!
[root@localhost ~]# chkconfig puppet on
[root@localhost ~]# vim /etc/puppet/puppet.conf

末行添加:server=master.com
[root@localhost ~]# service puppet restart
Stopping puppet agent: [ OK ]
Starting puppet agent: [ OK ]
[root@localhost ~]#

 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

配置主机端自动分发验证:

设置master自动签发所有的证书,创建 autosign.conf文件。

yum安装puppet的更多相关文章

  1. Puppet部署:安装puppet server、client

    Puppet部署:安装puppet server.client   puppet与其他手工操作工具有一个最大的区别就是 puppet的配置具有稳定性,因此你可以多次执行puppet,一旦你更新了你的配 ...

  2. puppet yum安装配置,简单证书维护

    Puppet学习之puppet的安装和配置 一.Puppet简介 Puppet基于ruby语言开发的自动化系统配置工具,可以C/S模式或独立运行,支持对所有UNIX及类UNIX系统的配置管理,最新版本 ...

  3. CentOS7:安装Puppet

    环境说明: 192.168.154.137 master.localdomain #Puppet Server 192.168.154.138 agent1.localdomain #Puppet A ...

  4. CentOS7安装Puppet+GitLab+Bind

    添加Puppet官方源 rpm -Uvh https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm 安装Puppet yum -y i ...

  5. 安装puppet

    安装puppet服务 先安装ruby语言包.ruby标准库.ruby shadow库 yum install -y ruby ruby-libs ruby-shadow 2.需要添加EPRL库,来支持 ...

  6. CentOS 6.4安装Puppet

    CentOS安装Puppet   环境介绍:centos6.4x64 採用CentOS-6.4-x86_64-minimal.iso最小化安装   puppet版本号3.6.2.ruby1.8.7,f ...

  7. Centos 安装Puppet

    环境说明: OS:CentOS 5.4 i386puppetmaster    192.168.0.12    hostname: puppetmaster.info.comclient       ...

  8. 在CentOS 6.4上安装Puppet配置管理工具

    在CentOS 6.4上安装Puppet配置管理工具 linux, puppetAdd comments 五052013 上篇说了下在ubuntu12.04上安装puppet,安装的版本为puppet ...

  9. yum安装php,php-fpm

    1.检查当前安装的PHP包 yum list installed | grep php 如果有安装的PHP包,先删除他们 yum remove php.x86_64 php-cli.x86_64 ph ...

随机推荐

  1. HDU - 3567 IDA* + 曼哈顿距离 + 康托 [kuangbin带你飞]专题二

    这题难度颇大啊,TLE一天了,测试数据组数太多了.双向广度优先搜索不能得到字典序最小的,一直WA. 思路:利用IDA*算法,当前状态到达目标状态的可能最小步数就是曼哈顿距离,用于搜索中的剪枝.下次搜索 ...

  2. openresty+lua劫持请求,有点意思

    0x01 起因 几天前学弟给我介绍他用nginx搭建的反代,代理了谷歌和维基百科. 由此我想到了一些邪恶的东西:反代既然是所有流量走我的服务器,那我是不是能够在中途做些手脚,达到一些有趣的目的. op ...

  3. Kubernetes 使用私服镜像

    非常感谢这些无私知识分享的同僚 重要参考:http://blog.csdn.net/u013812710/article/details/52766227 1.首先你得有个私库,这里我用的是阿里云私库 ...

  4. eclipse调试hadoop2.2.0源码笔记

    在hadoop1.x版本时使用的是在Windows下编译Eclipse插件,远程调试集群.换成2.2.0,没有eclipse-plugin文件. hadoop2.2.0"远程调试集群&quo ...

  5. H3C无线路由器安装与设置

    一.电脑与路由器的连接利用一根cat5e网线一头连接到电脑上笔记本或台式机都可以,另一头连接到无线路由器的LAN口任意LAN口都可以二.设置无线路由器完成路由器安装与电脑连接后,接下首次使用就需要设置 ...

  6. for、for in和while以及do while

    for循环:一般用在已知判断条件的循环; for(变量初始化;循环条件判断;循环后的执行){ 代码块 } //变量初始化可以省略,但是分号不能省.有多个的话用逗号隔开 //循环条件判断是true还是f ...

  7. 修改android 开机画面

    对于使用安卓手机的人来说,能够自由定制手机的各种界面是每个用户之所以喜欢安卓系统的最根本的缘由,比如手机的开机界面中的bootanimation.zip文件.本文就如何修改开机界面,做一个简单的流程介 ...

  8. 个性化WinPE封装方法 ----最后实战“制作WinPE3.0图文教程”

    经过前几讲,主要目的就是准备一些"原材料",熟悉一些"命令",实际上是"战前演练准备".下面要进入"实战状态",成败在此 ...

  9. Caused by: java.sql.SQLException: Incorrect integer value: '' for column 'clientId' at row 41

    1.错误描述 [ERROR:]2015-06-10 13:48:26,253 [异常拦截] oa.exception.ExceptionHandler org.hibernate.exception. ...

  10. freemarker自定义标签(一)

    freemarker自定义标签 1.自定义标签说明 宏变量存储模板片段可以被用作自定义指令macro 2.示例说明 <html> <head> <meta http-eq ...