CentOS6.5+Puppet3.7.3 安装、配置及测试(2)

CentOS6.5+Puppet3.7.3 安装、配置及测试

启动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

CentOS6.5+Puppet3.7.3 安装、配置及测试

设置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 ~]

CentOS6.5+Puppet3.7.3 安装、配置及测试

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

CentOS6.5+Puppet3.7.3 安装、配置及测试

修改时区

[root@master ~]# vim /usr/share/puppet-dashboard/config/environment.rb

CentOS6.5+Puppet3.7.3 安装、配置及测试

初始化数据库

[root@master ~]# cd /usr/share/puppet-dashboard/
[root@master puppet-dashboard]# rake RAILS_ENV=production db:migrate

CentOS6.5+Puppet3.7.3 安装、配置及测试

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/a28277a9ba5017e8e9d04ea6aba856ef.html