CentOS 6.2下puppet-dashboard安装配置

系统环境:

CentOS 6.2_x86_64

puppet-3.0.2

一、安装puppet-dashboard

yum install rubygem-rake ruby-mysql mysql-server puppet-dashboard

二、修改mysql配置

1.  修改单行最大容量

vim /etc/my.cnf

max_allowed_packet = 32M        #[mysqld]内加入

2.  配置默认字符集为utf8

defalut-character-set = utf8    #[mysqld]和[client]内加入

3.  创建mysql数据库和用户

create database dashboard;

grant all on dashboard.* to puppet@'localhost' identified by 'centos';

flush privileges;

三、配置puppet-dashboard

1.  修改database.yml

vim /usr/share/puppet-dashboard/config/database.yml

production:

database: dashboard

username: puppet

password: centos

encoding: utf8

adapter: mysql

2.  导入表结构,依次执行如下命令

cd /usr/share/puppet-dashboard

rake gems:refresh_specs

rake RAILS_ENV=production db:migrate

3.  测试puppet-dashboard能否工作

/usr/share/puppet-dashboard/script/server -e production

4.  启动完成后访问http://ip:3000测试

相关推荐