这篇文章给大家分享的是有关puppet服务端如何安装的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
服务端
服务器环境
[root@Centos-server yum.repos.d]# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 5.9 (Final) Release: 5.9 Codename: Final [root@Centos-server yum.repos.d]# cat /etc/redhat-release CentOS release 5.9 (Final) [root@Centos-server yum.repos.d]# uname -a Linux Centos-server 2.6.18-348.el5 #1 SMP Tue Jan 8 17:53:53 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
开始安装
[root@Centos-server ~]# mkdir soft [root@Centos-server ~]# cd soft/ [root@Centos-server soft]# wget http://puppetlabs.com/downloads/puppet/puppet-2.7.21.tar.gz [root@Centos-server soft]# wget http://puppetlabs.com/downloads/facter/facter-1.7.0.tar.gz 下载Facter收集关于主机的信息 [root@Centos-server soft]# yum -y install ruby ruby-devel ruby-libs ruby-shadow 安装Ruby语言包、Ruby标准库和Ruby Shadow库才能管理用户和组 [root@Centos-server soft]# tar xf puppet-2.7.21.tar.gz [root@Centos-server soft]# tar xf facter-1.7.0.tar.gz 安装Facter用来获取客户端系统信息(如hostname,ip,OS-Version,fqdn等) [root@Centos-server soft]# cd facter-1.7.0 [root@Centos-server facter-1.7.0]# ruby install.rb [root@Centos-server facter-1.7.0]# cd /root/soft/puppet-2.7.21 [root@Centos-server puppet-2.7.21]# ruby install.rb [root@Centos-server puppet-2.7.21]# cp conf/auth.conf /etc/puppet/ [root@Centos-server puppet-2.7.21]# cp conf/redhat/fileserver.conf /etc/puppet/ [root@Centos-server puppet-2.7.21]# cp conf/redhat/puppet.conf /etc/puppet/ [root@Centos-server puppet-2.7.21]# cp conf/redhat/server.init /etc/init.d/puppetmaster [root@Centos-server puppet-2.7.21]# chmod +x /etc/init.d/puppetmaster [root@Centos-server puppet-2.7.21]# chkconfig --add puppetmaster [root@Centos-server puppet-2.7.21]# chkconfig puppetmaster on [root@Centos-server puppet-2.7.21]# mkdir -p /etc/puppet/manifests [root@Centos-server puppet-2.7.21]# chmod 644 /etc/passwd [root@Centos-server puppet-2.7.21]# chmod 644 /etc/shadow [root@Centos-server puppet-2.7.21]# chmod 644 /etc/group [root@Centos-server puppet-2.7.21]# chmod 644 /etc/gshadow 生成pupput用户 [root@Centos-server puppet-2.7.21]# puppetmasterd --mkusers 启动服务 [root@Centos-server puppet-2.7.21]# /etc/init.d/puppetmaster start [root@Centos-server puppet-2.7.21]# netstat -tulnp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:8140 0.0.0.0:* LISTEN 6371/ruby tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN 3029/sshd
添加hosts
[root@Centos-server puppet-2.7.21]# vim /etc/hosts 127.0.0.1 localhost.localdomain localhost Centos-server ::1 localhost6.localdomain6 localhost6 172.16.10.252 Centos-server 172.16.10.2 web01
如果报Starting puppetmaster: hostname: Unknown host错误
[root@Centos-server puppet-2.7.21]# hostname Centos-server [root@Centos-server puppet-2.7.21]# hostname -i hostname: Unknown host [root@Centos-server puppet-2.7.21]# vim /etc/hosts 127.0.0.1 localhost.localdomain localhost Centos-server [root@Centos-server puppet-2.7.21]# hostname -i 127.0.0.1
就可以了 重新执行 生成用户和启动服务
感谢各位的阅读!关于“puppet服务端如何安装”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。