aptitude -y install puppet augeas-tools
aptitude -y install puppetmaster sqlite3 libsqlite3-ruby libactiverecord-ruby git rake
已经安装完了puppetmaster端
1.安装dashboard需要的一些软件
apt-get install -y build-essential irb libmysql-ruby libmysqlclient-dev libopenssl-ruby libreadline-ruby mysql-server rake rdoc ri ruby ruby-dev
2.创建数据库
# mysql -uroot -p
mysql> create database dashboard;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on dashboard.* to dashboard@localhost identified by 'topsecret';
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
3.获取dashboard源码包
我放置的目录在/root//puppet-dashboard-1.2.11
4.修改数据库配置文件的信息
#cd /root/puppet-dashboard-1.2.11/
#cp config/database.yml.example config/database.yml
# vi config/database.yml
内容如下:
production:
database: dashboard
username: dashboard
password: topsecret
encoding: utf8
adapter: mysql
5.初始化数据库
rake RAILS_ENV=production db:migrate
注意:这里可能遇到一些问题
问题1:
rake aborted!
no such file to load -- rdoc/task
解决文档
问题2:
rake aborted!
Could not find rack (~> 1.1.0) amongst 解决方法
gem install rack --version 1.1.2
(安装1.1.0版本 会报
rake aborted!
can't activate rack-1.1.0, already activated rack-1.1.2)
6.启动服务
script/server -e production
可以参察看server的其他参数