1 准备
- 2台centos7(master:192.168.1.103 client:192.168.1.106)
- 分别执行
rpm -i http://yum.puppetlabs.com/el/7/products/x86_64/puppetlabs-release-7-11.noarch.rpm
2 Master
设置hostname
nmtui
->set system hostname
->puppet.example.net
设置hosts
vi /etc/hosts
增加
192.168.1.103 puppet.example.net
安装puppet server
yum -y install puppet puppet-server
配置puppet master
/etc/puppet/puppet.conf
添加
[master]
certname = puppet.example.net
启动puppetmaster
systemctl start puppetmaster
systemctl enable puppetmaster
3 Client
设置hostname
nmtui
->set system hostname
->agent1.example.net
设置hosts
vi /etc/hosts
增加
192.168.1.106 agent1.example.net
192.168.1.103 puppet.example.net
安装puppet agent
yum -y install puppet puppet-server
4 测试
client执行:puppet agent --test
输出
Info: Creating a new SSL key for agent1.example.net
Info: Caching certificate for ca
Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for agent1.example.net
Info: Certificate Request fingerprint (SHA256): DB:21:15:C8:90:E4:2D:54:53:4C:A5:9A:4A:00:50:E7:99:5B:73:EE:0C:23:F9:7B:36:99:34:CD:FE:E6:DF:DA
Info: Caching certificate for ca
Exiting; no certificate found and waitforcert is disabled
最后一行不是错误
master执行:
-
puppet cert list
输出:
"agent1.example.net" (SHA256) 14:7D:AA:34:C8:F1:70:28:B9:51:A6:7D:94:3F:69:92:8F:61:94:17:7D:4A:EF:F2:44:CC:4A:BC:6B:D5:C3:EC
-
puppet cert sign agent1.example.net
或者puppet cert sign --all
输出:
Notice: Signed certificate request for agent1.example.net
Notice: Removing file Puppet::SSL::CertificateRequest agent1.example.net at '/var/lib/puppet/ssl/ca/requests/agent1.example.net.pem'
client再次执行
puppet agent --test
输出:
Info: Caching certificate for agent1.example.net
Info: Caching certificate_revocation_list for ca
Info: Caching certificate for agent1.example.net
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for agent1.example.net
Info: Applying configuration version '1428474782'
Info: Creating state file /var/lib/puppet/state/state.yaml
Notice: Finished catalog run in 0.05 seconds
若网页格式有问题请访问:https://github.com/wiselyman/study/blob/master/puppet/puppet-installation.md
相关推荐
在CentOS系统下安装Puppet和Puppet Foreman的教程.docx
centos7安装配置mysql5.7教程全
Centos7下安装MongoDB
基于CentOS 7的Kubernetes安装全过程(含附件) 目录如下: 第一部分:Nginx on Kubernetes应用部署 3 一、环境准备 3 1.1软硬件环境 3 1.2 网络拓扑 4 二、Kubenetes及相关组件部署 6 2.1 Docker容器及私有仓库部署...
centos7离线安装vim
centos7离线安装bzip2
centos7 lnmp安装教程 一些简单的配置,和一些重要的设置
目前来说整理得最全的Oracle 11g静默安装手册,望大伙支持! 一、安装前环境准备 ...四、以静默方式配置监听 五、以静默方式建立新库,同时也建立一个对应的实例。 六、Oracle开机自启动设置 七、删除实例
CentOS7安装mysql5.7.19 & mysql5.7.19主从配置(CentOS7)
Centos7.9安装配置vsftpd
CentOS7配置本地yum源(超详细过程)
centos7离线安装bison
ganglia 3.7.2 基于centos7可安装rpm包(rpmbuild/RPMS/x86_64目录中) 配合ganglia-web-3.7.2.tar.gz使用 参考:https://blog.csdn.net/lswnew/article/details/79175539
CentOS7离线安装oracle 11g_r2所有离线依赖包,并附详细安装说明,安装详细说明和依赖包,轻松在CentOS7安装oracle
基于centos7下zabbix的搭建,收集整理自主实验的资料。
centos7自带的中文输入法非常难用,在centos7上面安装sougou输入法,
webvirtmrg基于centos7平台安装
centos7离线安装http服务器的rpm包
首先使用xshell连接到centos7,我使用的是centos7 *64位,所以一切的配置安装都按照的是centos7来进行的,当然其他版本的centos的操作也类似,如果有需要的,请自行百度哈。 本次安装环境: centos7 64位 jdk1.8...