centos or rhel puppet  安裝

1.在centos or rhel 安裝,使用yum源安裝

 1)enterprise 5

  sudo rpm -ivh http://yum.puppetlabs.com/el/5/products/i386/puppetlabs-release-5-6.noarch.rpm
 2)enterprise 6

   wget http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm 
 rpm –
ivhpuppetlabs-release-6-7.noarch.rpm
2.server 端安裝

 yum install puppet-server

  /etc/init.d/puppetmaster 啓動文件

3.agent 客戶端安裝

  yum install puppet

  /etc/init.d/puppet   啓動文件

4.安裝puppet dashboard

  yum install puppet-dashboard
  默認安裝到/usr/share/puppet-dashboard 和/usr/share/puppet

5.配置puppet-dashboard

  配置文件爲config/database.yml ,可以查看配置文件案例config/database.yml.example

6.創建mysql數據庫和用戶

  CREATE DATABASE dashboard CHARACTER SET utf8;
  CREATE USER 'dashboard'@'localhost' IDENTIFIED BY 'my_password';
  GRANT ALL PRIVILEGES ON dashboard.* TO 'dashboard'@'localhost';
7.配置mysql 配置文件,配置maximum packet size 以允許數據庫更多的行

  vi /etc/my.cnf

  max_allowed_packet = 32M
  如果不想重啓mysql 使配置生效

  mysql> set max_allowed_packet = 33554432;
8.生成數據庫表,前提是database.yml必須配置好,數據庫、用戶名和密碼,否則運行失敗

  1)production

   rake RAILS_ENV=production db:create
  2)development or test

   rake RAILS_ENV=production db:migrate
9.啓動dashboard

  /etc/init.d/puppet-dashboard  restart

  /etc/init.d/puppet-dashboard-workers  restart

  登陸http://IP:3000

10.客戶端向服務器端進行ssl認證

    puppetd --test --server puppet.master.com

    自動認證,需要配置服務器端 puppet.conf

    在main 添加

    autosign=true

   puppet 同步時間

   在客戶端配置agent添加

   runinterval=3600 單位秒

 

11.服務器端進行迴應

   puppet cert list

   puppet cert  -s  puppet.client.com 或者puppet cert -s -a

12.客戶端連接失敗,報錯ssl認證

 On Puppet client:
  rm -f /etc/puppet/ssl/certificate_requests/*.pem rm -f /etc/puppet/ssl/certs/*.pem
• On Puppet master:
  rm -f /var/lib/puppet/ssl/ca/requests/*.pem

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章