Puppet日志管理系统
rpm -ivh rubygem-rake-0.8.7-2.1.el6.noarch.rpmruby-mysql-2.8.2-1.el6.x86_64.rpm##两个软件包要同时装,才能解决依赖性
yum install -y puppet-dashboard-1.2.23-1.el6.noarch.rpm
cd /usr/share/puppet-dashboard/config/
vim database.yml
production:##只留下生产环境的配置
database: dashboard_production
username: dashboard
password: westos
encoding: utf8
adapter: mysql
vim test.sql##配置检测的数据库
CREATE DATABASE dashboard_production CHARACTER SET utf8;
CREATE USER 'dashboard'@'localhost' IDENTIFIED BY 'westos';
GRANT ALL PRIVILEGES ON dashboard_production.* TO 'dashboard'@'localhost';
vim settings.yml
time_zone: 'Beijing'##更改时区为北京
/etc/init.d/mysqld start
mysql < test.sql##将检测的数据库导入
rake RAILS_ENV=production db:migrate##建立Dashborad所需要的数据库和表
mysql
mysql> show databases;
+----------------------+
| Database |
+----------------------+
| information_schema |
| dashboard_production |
| mysql |
| test |
+----------------------+
4 rows in set (0.00 sec)
mysql> use dashboard_production;
mysql> show tables;
+--------------------------------+
| Tables_in_dashboard_production |
+--------------------------------+
| delayed_job_failures |
| delayed_jobs |
| metrics |
| node_class_memberships |
| node_classes |
| node_group_class_memberships |
| node_group_edges |
| node_group_memberships |
| node_groups |
| nodes |
| old_reports |
| parameters |
| report_logs |
| reports |
| resource_events |
| resource_statuses |
| schema_migrations |
| timeline_events |
+--------------------------------+
18 rows in set (0.00 sec)
mysql> quit
Bye
/etc/init.d/puppet-dashboard restart
chmod 666 /usr/share/puppet-dashboard/log/production.log
/etc/init.d/puppetmaster start
/etc/init.d/puppet-dashboard-workers start
页:
[1]