puppet的安装

1安装

说明:建议使用rpm包来安装,也就是yum来安装,不建议编译安装,编译安装会造成后来的升级,维护,卸载,管理上等十分困难,如果你非得那么做,我也没办法。

首先配置yum源(master和agent都需要)

1按照我配置好的直接复制就行

在/etc/yum.repos.d/目录下创建文件puppetlabs.repo 

cat puppetlabs.repo 

[puppetlabs-products]
name=Puppet Labs Products El 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/6/products/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=1

[puppetlabs-deps]
name=Puppet Labs Dependencies El 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/6/dependencies/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=1

[puppetlabs-devel]
name=Puppet Labs Devel El 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/6/devel/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=0
gpgcheck=1

[puppetlabs-products-source]
name=Puppet Labs Products El 6 - $basearch - Source
baseurl=http://yum.puppetlabs.com/el/6/products/SRPMS
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
failovermethod=priority
enabled=0
gpgcheck=1

[puppetlabs-deps-source]
name=Puppet Labs Source Dependencies El 6 - $basearch - Source
baseurl=http://yum.puppetlabs.com/el/6/dependencies/SRPMS
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=0
gpgcheck=1

[puppetlabs-devel-source]
name=Puppet Labs Devel El 6 - $basearch - Source
baseurl=http://yum.puppetlabs.com/el/6/devel/SRPMS
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=0
gpgcheck=1

这样就可以安装了,但是会遇到一个问题

1 warning: rpmts_HdrFromFdno: Header V4 RSA/SHA1 Signature, key ID 4bd6ec30: NOKEY
2 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
3 
4 
5 GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs

就是一个签名认证的问题

参考:这里

解决办法:

这里

这里可以直接拷贝我的文件:在/etc/pki/rpm-gpg目录下

 1 touch RPM-GPG-KEY-nightly-puppetlabs
 2 cat RPM-GPG-KEY-nightly-puppetlabs
 3 -----BEGIN PGP PUBLIC KEY BLOCK-----
 4 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 5 
 6 mQINBFERnnkBEAC6FNq5aPrrLxiqpgSmhJfAm8dFGWOLUGtTkEgwo+kHggXN+q6t
 7 jQgBaY2INJ68TDfOntGh2FVXrU++a0l+9NY0SQ/00Qj869N0FcBLZBqRiKQV7Xcd
 8 PetiNFnua0mS9k1irj7RkSq27OgklZTcpy6ayBJzftrCWHf9chLK0fcAbVH1TpKu
 9 qOIQVjo+KBKoakL9TD79UT6hhICZdfbOC0vdu+3DCMK4+ed5xs7MtV8DugUCD/CI
10 SUGfvDpMN1GiYyx5CRMYKN1BzBXWYQDjmG65ccKt5RDZpHYI8QlAWYlTYhF/TS5v
11 MdR1mlv55wSB7uoO6/tRX+ajEiNoQVWp+qJuICh3SPcE4RvPVdejat2M7biuS+jY
12 fWuwVUCaLNK+NfTRxlz6l6jffY1kS/owKsCqM74lGIow8fJOMS56UNXSGx38BNDD
13 7iJIB3kCKATJMQ9bYkAu6LqlUalNYIPVSoTmX9KKQ576kPnAzMn1AoYK444pEqAg
14 SFQg769a+0/4FDAxF352jHwHRMtc/ap1M00UczG5eATd2Z/uB7X/gc6QJZ+h/Ie7
15 AW+gjtU19kIdyT061fc0km2zlv5LsklPq5BwUD82uZfqZ1g+3l2lY+/lhMfk7GCD
16 /RqXvxTladobfdzYIzRQKHT1vouY5uzEZPr5c44nRyevaRFKEELbpE3fCwARAQAB
17 tFdQdXBwZXQgTGFicyBOaWdodGx5IEJ1aWxkIEtleSAoUHVwcGV0IExhYnM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27 Sh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUfREsFmNOBUbi8xlKNS5CZ
28 ypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5yDHmg7unCk4JyVopQ2KHM
29 oqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAkugVIB2pi+8u84f+an4Hm
30 l4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU=
31 =qHKbwo
32 -----END PGP PUBLIC KEY BLOCK-----
View Code

如下:

 1 [root@master-elk rpm-gpg]# yum list|grep puppet
 2 facter.x86_64                              1:2.4.6-1.el6                @puppetlabs-products
 3 hiera.noarch                               1.3.4-1.el6                  @puppetlabs-products
 4 puppet.noarch                              3.8.7-1.el6                  @puppetlabs-products
 5 puppet-server.noarch                       3.8.7-1.el6                  @puppetlabs-products
 6 ruby-augeas.x86_64                         0.4.1-3.el6                  @puppetlabs-deps
 7 ruby-shadow.x86_64                         1:2.2.0-2.el6                @puppetlabs-deps
 8 rubygem-json.x86_64                        1.5.5-3.el6                  @puppetlabs-deps
 9 activemq.noarch                            5.9.1-2.el6                  puppetlabs-deps
10 activemq-info-provider.noarch              5.9.1-2.el6                  puppetlabs-deps
11 cfacter.x86_64                             0.3.0-1.el6                  puppetlabs-products
12 facter.noarch                              1.6.7-1.el6                  puppetlabs-products
13 hiera-puppet.noarch                        1.0.0-1.el6                  puppetlabs-products
14 leiningen.noarch                           2.0.0-0.2preview10.el6       puppetlabs-deps
15 mcollective.noarch                         2.9.0-1.el6                  puppetlabs-products
16 mcollective-actionpolicy-auth.noarch       2.1.0-1.el6                  puppetlabs-products
17 mcollective-client.noarch                  2.9.0-1.el6                  puppetlabs-products
18 mcollective-common.noarch                  2.9.0-1.el6                  puppetlabs-products
19 mcollective-filemgr-agent.noarch           1.1.0-1.el6                  puppetlabs-products
20 mcollective-filemgr-client.noarch          1.1.0-1.el6                  puppetlabs-products
21 mcollective-filemgr-common.noarch          1.1.0-1.el6                  puppetlabs-products
22 mcollective-iptables-agent.noarch          3.0.2-1.el6                  puppetlabs-products
23 mcollective-iptables-client.noarch         3.0.2-1.el6                  puppetlabs-products
24 mcollective-iptables-common.noarch         3.0.2-1.el6                  puppetlabs-products
25 mcollective-logstash-audit.noarch          2.0.0-1                      puppetlabs-products
26 mcollective-nettest-agent.noarch           3.0.4-1.el6                  puppetlabs-products
27 mcollective-nettest-client.noarch          3.0.4-1.el6                  puppetlabs-products
28 mcollective-nettest-common.noarch          3.0.4-1.el6                  puppetlabs-products
29 mcollective-nrpe-agent.noarch              3.1.0-1.el6                  puppetlabs-products
30 mcollective-nrpe-client.noarch             3.1.0-1.el6                  puppetlabs-products
31 mcollective-nrpe-common.noarch             3.1.0-1.el6                  puppetlabs-products
32 mcollective-package-agent.noarch           4.4.0-1.el6                  puppetlabs-products
33 mcollective-package-client.noarch          4.4.0-1.el6                  puppetlabs-products
34 mcollective-package-common.noarch          4.4.0-1.el6                  puppetlabs-products
35 mcollective-puppet-agent.noarch            1.11.1-1.el6                 puppetlabs-products
36 mcollective-puppet-client.noarch           1.11.1-1.el6                 puppetlabs-products
37 mcollective-puppet-common.noarch           1.11.1-1.el6                 puppetlabs-products
38 mcollective-service-agent.noarch           3.1.3-1.el6                  puppetlabs-products
39 mcollective-service-client.noarch          3.1.3-1.el6                  puppetlabs-products
40 mcollective-service-common.noarch          3.1.3-1.el6                  puppetlabs-products
41 mcollective-sshkey-security.noarch         0.5.0-1.el6                  puppetlabs-products
42 mcollective-sysctl-data.noarch             2.0.1-1.el6                  puppetlabs-products
43 puppet-dashboard.noarch                    1.2.23-1.el6                 puppetlabs-products
44 puppetdb.noarch                            2.3.8-1.el6                  puppetlabs-products
45 puppetdb-terminus.noarch                   2.3.8-1.el6                  puppetlabs-products
46 puppetlabs-release.noarch                  22.0-2                       puppetlabs-products
47 puppetserver.noarch                        1.2.0-1.el6                  puppetlabs-products
48 razor-server.noarch                        1.3.0-1.el6                  puppetlabs-products
View Code

第二种方法

http://yum.puppetlabs.com/el/6.4/products/x86_64/  该地址下载puppet安装包

参考这里也可:点击

这样接下来皆可以安装了

在puppetmaster上安装:

1  yum install puppet puppet-server facter -y
2 会安装3.x的版本

在agent上面安装

1 yum install puppet facter

 查看帮助

puppet  help  

 1 Usage: puppet <subcommand> [options] <action> [options]
 2 
 3 Available subcommands:
 4     
 5   agent             The puppet agent daemon
 6   apply             Apply Puppet manifests locally
 7   ca                Local Puppet Certificate Authority management.
 8   catalog           Compile, save, view, and convert catalogs.
 9   cert              Manage certificates and requests
10   certificate       Provide access to the CA for certificate management.
11   certificate_request  Manage certificate requests.
12   certificate_revocation_list  Manage the list of revoked certificates.
13   config            Interact with Puppet's settings.
14   describe          Display help about resource types
15   device            Manage remote network devices
16   doc               Generate Puppet documentation and references
17   facts             Retrieve and store facts.
18   file              Retrieve and store files in a filebucket
19   filebucket        Store and retrieve files in a filebucket
20   help              Display Puppet help.
21   inspect           Send an inspection report
22   instrumentation_data  Manage instrumentation listener accumulated data. DEPRECATED.
23   instrumentation_listener  Manage instrumentation listeners. DEPRECATED.
24   instrumentation_probe  Manage instrumentation probes. Deprecated
25   key               Create, save, and remove certificate keys.
26   kick              Remotely control puppet agent
27   man               Display Puppet manual pages.
28   master            The puppet master daemon
29   module            Creates, installs and searches for modules on the Puppet Forge.
30   node              View and manage node definitions.
31   parser            Interact directly with the parser.
32   plugin            Interact with the Puppet plugin system.
33   queue             Deprecated queuing daemon for asynchronous storeconfigs
34   report            Create, display, and submit reports.
35   resource          The resource abstraction layer shell
36   resource_type     View classes, defined resource types, and nodes from all manifests.
37   secret_agent      Mimics puppet agent.
38   status            View puppet server status.
39 
40 See 'puppet help <subcommand> <action>' for help on a specific subcommand action.
41 See 'puppet help <subcommand>' for help on a specific subcommand
View Code

例如我去查看所有支持的类型

puppet describe

 1 These are the types known to puppet:
 2 augeas          - Apply a change or an array of changes to the  ...
 3 computer        - Computer object management using DirectorySer ...
 4 cron            - Installs and manages cron jobs
 5 exec            - Executes external commands
 6 file            - Manages files, including their content, owner ...
 7 filebucket      - A repository for storing and retrieving file  ...
 8 group           - Manage groups
 9 host            - Installs and manages host entries
10 interface       - This represents a router or switch interface
11 k5login         - Manage the `.k5login` file for a user
12 macauthorization - Manage the Mac OS X authorization database
13 mailalias       - .. no documentation ..
14 maillist        - Manage email lists
15 mcx             - MCX object management using DirectoryService  ...
16 mount           - Manages mounted filesystems, including puttin ...
17 nagios_command  - The Nagios type command
18 nagios_contact  - The Nagios type contact
19 nagios_contactgroup - The Nagios type contactgroup
20 nagios_host     - The Nagios type host
21 nagios_hostdependency - The Nagios type hostdependency
22 nagios_hostescalation - The Nagios type hostescalation
23 nagios_hostextinfo - The Nagios type hostextinfo
24 nagios_hostgroup - The Nagios type hostgroup
25 nagios_service  - The Nagios type service
26 nagios_servicedependency - The Nagios type servicedependency
27 nagios_serviceescalation - The Nagios type serviceescalation
28 nagios_serviceextinfo - The Nagios type serviceextinfo
29 nagios_servicegroup - The Nagios type servicegroup
30 nagios_timeperiod - The Nagios type timeperiod
31 notify          - .. no documentation ..
32 package         - Manage packages
33 resources       - This is a metatype that can manage other reso ...
34 router          - .. no documentation ..
35 schedule        - Define schedules for Puppet
36 scheduled_task  - Installs and manages Windows Scheduled Tasks
37 selboolean      - Manages SELinux booleans on systems with SELi ...
38 selmodule       - Manages loading and unloading of SELinux poli ...
39 service         - Manage running services
40 ssh_authorized_key - Manages SSH authorized keys
41 sshkey          - Installs and manages ssh host keys
42 stage           - A resource type for creating new run stages
43 tidy            - Remove unwanted files based on specific crite ...
44 user            - Manage users
45 vlan            - .. no documentation ..
46 whit            - Whits are internal artifacts of Puppet's curr ...
47 yumrepo         - The client-side description of a yum reposito ...
48 zfs             - Manage zfs
49 zone            - Manages Solaris zones
50 zpool           - Manage zpools
View Code

查看某个资源类型的帮助例如查看包资源的帮助

puppet describe  package

语法,如何使用,都有。很详细

  1 package
  2 =======
  3 Manage packages.  There is a basic dichotomy in package
  4 support right now:  Some package types (e.g., yum and apt) can
  5 retrieve their own package files, while others (e.g., rpm and sun)
  6 cannot.  For those package formats that cannot retrieve their own files,
  7 you can use the `source` parameter to point to the correct file.
  8 Puppet will automatically guess the packaging format that you are
  9 using based on the platform you are on, but you can override it
 10 using the `provider` parameter; each provider defines what it
 11 requires in order to function, and you must meet those requirements
 12 to use a given provider.
 13 **Autorequires:** If Puppet is managing the files specified as a
 14 package's `adminfile`, `responsefile`, or `source`, the package
 15 resource will autorequire those files.
 16 
 17 
 18 Parameters
 19 ----------
 20 
 21 - **adminfile**
 22     A file containing package defaults for installing packages.
 23     This attribute is only used on Solaris. Its value should be a path to a
 24     local file stored on the target system. Solaris's package tools expect
 25     either an absolute file path or a relative path to a file in
 26     `/var/sadm/install/admin`.
 27     The value of `adminfile` will be passed directly to the `pkgadd` or
 28     `pkgrm` command with the `-a <ADMINFILE>` option.
 29 
 30 - **allow_virtual**
 31     Specifies if virtual package names are allowed for install and
 32     uninstall.
 33     Valid values are `true`, `false`, `yes`, `no`. 
 34     Requires features virtual_packages.
 35 
 36 - **allowcdrom**
 37     Tells apt to allow cdrom sources in the sources.list file.
 38     Normally apt will bail if you try this.
 39     Valid values are `true`, `false`. 
 40 
 41 - **category**
 42     A read-only parameter set by the package.
 43 
 44 - **configfiles**
 45     Whether configfiles should be kept or replaced.  Most packages
 46     types do not support this parameter. Defaults to `keep`.
 47     Valid values are `keep`, `replace`. 
 48 
 49 - **description**
 50     A read-only parameter set by the package.
 51 
 52 - **ensure**
 53     What state the package should be in. On packaging systems that can
 54     retrieve new packages on their own, you can choose which package to
 55     retrieve by specifying a version number or `latest` as the ensure
 56     value. On packaging systems that manage configuration files separately
 57     from "normal" system files, you can uninstall config files by
 58     specifying `purged` as the ensure value. This defaults to `installed`.
 59     Valid values are `present` (also called `installed`), `absent`,
 60     `purged`, `held`, `latest`. Values can match `/./`.
 61 
 62 - **flavor**
 63     OpenBSD supports 'flavors', which are further specifications for
 64     which type of package you want.
 65 
 66 - **install_options**
 67     An array of additional options to pass when installing a package. These
 68     options are package-specific, and should be documented by the software
 69     vendor.  One commonly implemented option is `INSTALLDIR`:
 70     package { 'mysql':
 71           ensure          => installed,
 72           source          => 'N:/packages/mysql-5.5.16-winx64.msi',
 73           install_options => [ '/S', { 'INSTALLDIR' => 'C:\mysql-5.5' } ],
 74         }
 75     
 76     Each option in the array can either be a string or a hash, where each
 77     key and value pair are interpreted in a provider specific way.  Each
 78     option will automatically be quoted when passed to the install command.
 79     
 80     On Windows, this is the **only** place in Puppet where backslash
 81     separators should be used.  Note that backslashes in double-quoted
 82     strings _must_ be double-escaped and backslashes in single-quoted
 83     strings _may_ be double-escaped.
 84 
 85 
 86 
 87 Requires features install_options.
 88 
 89 - **instance**
 90     A read-only parameter set by the package.
 91 
 92 - **name**
 93     The package name.  This is the name that the packaging
 94     system uses internally, which is sometimes (especially on Solaris)
 95     a name that is basically useless to humans.  If you want to
 96     abstract package installation, then you can use aliases to provide
 97     a common name to packages:
 98     # In the 'openssl' class
 99         $ssl = $operatingsystem ? {
100           solaris => SMCossl,
101           default => openssl
102         }
103     # It is not an error to set an alias to the same value as the
104         # object name.
105         package { $ssl:
106           ensure => installed,
107           alias  => openssl
108         }
109     . etc. .
110     $ssh = $operatingsystem ? {
111           solaris => SMCossh,
112           default => openssh
113         }
114     # Use the alias to specify a dependency, rather than
115         # having another selector to figure it out again.
116         package { $ssh:
117           ensure  => installed,
118           alias   => openssh,
119       require => Package[openssl]
120     }
121 
122 
123 - **package_settings**
124     Settings that can change the contents or configuration of a package.
125     The formatting and effects of package_settings are provider-specific;
126     any
127     provider that implements them must explain how to use them in its
128     documentation. (Our general expectation is that if a package is
129     installed but its settings are out of sync, the provider should
130     re-install that package with the desired settings.)
131     An example of how package_settings could be used is FreeBSD's port build
132     options --- a future version of the provider could accept a hash of
133     options,
134     and would reinstall the port if the installed version lacked the correct
135     settings.
136         package { 'www/apache22':
137           package_settings => { 'SUEXEC' => false }
138         }
139     Again, check the documentation of your platform's package provider to
140     see
141 the actual usage.
142 Requires features package_settings.
143 
144 - **platform**
145     A read-only parameter set by the package.
146 
147 - **responsefile**
148     A file containing any necessary answers to questions asked by
149     the package.  This is currently used on Solaris and Debian.  The
150     value will be validated according to system rules, but it should
151     generally be a fully qualified path.
152 
153 - **root**
154     A read-only parameter set by the package.
155 
156 - **source**
157     Where to find the package file. This is only used by providers that
158     don't
159     automatically download packages from a central repository. (For example:
160     the `yum` and `apt` providers ignore this attribute, but the `rpm` and
161     `dpkg` providers require it.)
162     Different providers accept different values for `source`. Most providers
163     accept paths to local files stored on the target system. Some providers
164     may also accept URLs or network drive paths. Puppet will not
165     automatically retrieve source files for you, and usually just passes the
166     value of `source` to the package installation command.
167     You can use a `file` resource if you need to manually copy package files
168     to the target system.
169 
170 - **status**
171     A read-only parameter set by the package.
172 
173 - **uninstall_options**
174     An array of additional options to pass when uninstalling a package.
175     These
176     options are package-specific, and should be documented by the software
177     vendor.  For example:
178     package { 'VMware Tools':
179           ensure            => absent,
180           uninstall_options => [ { 'REMOVE' => 'Sync,VSS' } ],
181         }
182     
183     Each option in the array can either be a string or a hash, where each
184     key and value pair are interpreted in a provider specific way.  Each
185     option will automatically be quoted when passed to the uninstall
186     command.
187     
188     On Windows, this is the **only** place in Puppet where backslash
189     separators should be used.  Note that backslashes in double-quoted
190     strings _must_ be double-escaped and backslashes in single-quoted
191     strings _may_ be double-escaped.
192 
193 
194 
195 Requires features uninstall_options.
196 
197 - **vendor**
198     A read-only parameter set by the package.
199 
200 Providers
201 ---------
202     aix, appdmg, apple, apt, aptitude, aptrpm, blastwave, dpkg, fink,
203     freebsd, gem, hpux, macports, msi, nim, openbsd, opkg, pacman, pip, pkg,
204     pkgdmg, pkgin, pkgutil, portage, ports, portupgrade, rpm, rug, sun,
205     sunfreeware, up2date, urpmi, windows, yum, zypper
View Code

 

posted @ 2017-01-07 15:20  Dicky_Zhang  阅读(1428)  评论(0)    收藏  举报