官方文档:http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html#installing-puppet-dashboard

环境:

系统:CentOS 5.6

ruby  -v
ruby 1.8.5 (2006-08-25) [x86_64-linux]

1. 安装依赖   yum install  -y  ruby ruby-libs ruby-rdoc  ruby-ri  rubygem-rake  rubygems ruby-mysql rubygem-passenger

2.

Create a Yum repo entry for Puppet Labs in /etc/yum.repos.d/puppetlabs.repo:

# /etc/yum.repos.d/puppetlabs.repo [puppetlabs] name=Puppet Labs Packages baseurl=http://yum.puppetlabs.com/base/ enabled=1 gpgcheck=1 gpgkey=http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs 安装dashboard:
yum install puppet-dashboard
3.配置dashboard 默认安装在/usr/share/puppet-dashboard/目录中 修改config目录文件: database.yml文件中 production下的数据库连接信息. cp settings.yml.example settings.yml 4.创建mysql数据库 CREATE DATABASE dashboard CHARACTER SET utf8; CREATE USER 'dashboard'@'localhost' IDENTIFIED BY 'my_password'; GRANT ALL PRIVILEGES ON dashboard.* TO 'dashboard'@'localhost';

修改my.cnf中的

# Allowing 32MB allows an occasional 17MB row with plenty of spare room max_allowed_packet = 32M 在不重启数据库情况下修改max_allowed_packet 的值: mysql> set max_allowed_packet = 33554432;

4.1 创建表

rake RAILS_ENV=production db:migrate 5.测试结果 sudo -u puppet-dashboard ./script/server -e production 会提示某个日志文件权限不对,创建它并修改权限 touch chmod 777 http://dashboardserver:3000 访问.一般如果有问题就是权限问题. 上面的方法实在是不方便,3000端口,没法定义主机名,不能并发访问.   6.使用apache建立虚拟主机.步骤: http://www.modrails.com/install.html   rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm yum install mod_passenger

配置文件在/etc/httpd/conf.d/passenger.conf

修改创建虚拟主机puppet_dashboard安装在/usr/share/puppet-dashboard/ 访问的目录是其下的public目录

<VirtualHost *:80>
   ServerName puppet.yourdomain.com
   DocumentRoot /usr/share/puppet-dashboard/public/   
   <Directory /usr/share/puppet-dashboard/public/>
      AllowOverride all  
      Options -MultiViews
      order allow,deny
      allow from all
   </Directory>
</VirtualHost>

完成.