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. uva437 DAG

    直接套用DAG的思路就行. AC代码: #include<cstdio> #include<cstring> #include<algorithm> using n ...

  2. uva1343 IDA*

    这题需要用数组记录每个block的位置.启发函数:d+wa(8-当前最多相同个数)>maxd直接退出 AC代码: #include<cstdio> #include<cstri ...

  3. codeforce-748A

    简单判断一下就行. AC代码: #include<cstdio> int main(){ int n,m,k; while(scanf("%d%d%d",&n, ...

  4. 使用org.apache.commons.logging打日志注意事项

    使用方法:例如,protected final Log logger = LogFactory.getLog(getClass());if (logger.isDebugEnabled()) { lo ...

  5. URAL - 1153 Supercomputer 大数开方

    题意:给定m,m = n * (n+1) / 2,计算n值. 思路:n = SQRT(m*2) 注意m很大,需要自己实现大数开方.我用的是自己写的大数模板:大数模板 AC代码 #include < ...

  6. 【推荐】开源项目minapp-重新定义微信小程序的开发

    minapp 重新定义微信小程序的开发 官网:https://qiu8310.github.io/minapp/ 作者:Mora minapp 重新定义微信小程序的开发 使用 用 npm 安装命令行工 ...

  7. openstack-ocata-身份验证2

    Identity service 一.身份服务概述 OpenStack身份管理服务提供一个单点集成身份验证.授权和目录服务. 身份服务通常是第一个服务用户与之交互.一旦身份验证,最终用户可以使用自己的 ...

  8. 关于vue-axios的post方式,后台无法解析传参问题

    启用jq方法更改数字格式 var params = {'addid':item.addid}; var str = $.param(params);

  9. Dynamics CRM中一个查找字段引发的【血案】

    摘要: 本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复267或者20180311可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyon ...

  10. php+sqlServer 2008R2 PHPstudy下数据库环境搭建

    简要:小主从事PHP二年,期间一直做后台;在过程中遇到一个奇葩的组合就是PHP+sqlServer应用场景,希望能够跟各位PHP大神分享和学习探索,如果有不对或者好的建议告知下:*~*! 一.下载sq ...