您好,登錄后才能下訂單哦!
這篇文章給大家分享的是有關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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。