十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
这篇文章给大家分享的是有关puppet服务端如何安装的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
创新互联建站-专业网站定制、快速模板网站建设、高性价比龙亭网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式龙亭网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖龙亭地区。费用合理售后完善,十年实体公司更值得信赖。
服务端
服务器环境
[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服务端如何安装”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!