启动Mysql服务
[root@master ~]# service mysqld start [root@master ~]# chkconfig mysqld on [root@master ~]# chkconfig --list |grep mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off设置mysql密码,我这里使用是密码是123456
[root@master ~]# mysqladmin -u root password '123456'
创建一个dashboard数据库
[root@master ~]# mysql -uroot -p123456 <<EOF
> CREATE DATABASE dashboard CHARACTER SET utf8;
> CREATE USER 'dashboard'@'localhost' IDENTIFIED BY '123456';
> GRANT ALL PRIVILEGES ON dashboard.* TO 'dashboard'@'localhost';
> FLUSH PRIVILEGES;
> EOF
[root@master ~]
Passenger+Apache+Dashboard
这是让Apache支持ruby,由于Passenger不在CentOS官方源里,因此要添加epel的源
[root@master ~]# wget Fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
[root@master ~]# rpm -ivh epel-release-6-8.noarch.rpm
[root@master ~]# yum install mod_passenger puppet-dashboard
配置Dashboard
[root@master ~]# vim /usr/share/puppet-dashboard/config/database.yml
修改时区
[root@master ~]# vim /usr/share/puppet-dashboard/config/environment.rb
初始化数据库
[root@master ~]# cd /usr/share/puppet-dashboard/
[root@master puppet-dashboard]# rake RAILS_ENV=production db:migrate