這篇文章給大家分享的是有關(guān)puppet服務(wù)端如何安裝的內(nèi)容。小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過來看看吧。
為沙灣等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計(jì)制作服務(wù),及沙灣網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)、沙灣網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!服務(wù)端
服務(wù)器環(huán)境
[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收集關(guān)于主機(jī)的信息 [root@Centos-server soft]# yum -y install ruby ruby-devel ruby-libs ruby-shadow 安裝Ruby語言包、Ruby標(biāo)準(zhǔn)庫和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用來獲取客戶端系統(tǒng)信息(如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 啟動(dòng)服務(wù) [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
如果報(bào)Starting puppetmaster: hostname: Unknown host錯(cuò)誤
[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
就可以了 重新執(zhí)行 生成用戶和啟動(dòng)服務(wù)
感謝各位的閱讀!關(guān)于“puppet服務(wù)端如何安裝”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。