Centos6.2_x86_64环境下puppet-dashboard安装配置
2013-03-20 14:32:54 来源:开发学院 系统环境:
Centos6.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测试
四、配置puppet服务端和客户端
服务器端配置
vim /etc/puppet/puppet.conf #在[main]内添加
reports = http,store
reporturl = http://IP:3000/reports/upload
修改完毕后重启puppetmaster服务
在客户端配置
vim /etc/puppet/puppet.conf #在[agent]内添加
report = true
修改完毕后重启puppet服务
五、dashboard相关命令
导入已有的报告
cd /usr/share/puppet-dashboard
rake RAILS_ENV=production reports:import
运行分析报告进程
env RAILS_ENV=production /usr/share/puppet-dashboard/script/delayed_job -p dashboard -n 4 -m start #-n 指定启动多少个进程,-m stop 停止分析进程,-m start 启动分析进程
后台运行dashboard
/usr/share/puppet-dashboard/script/server -e production -d
六、puppet-dashboard+apache配置
解决依赖关系
yum install httpd mod_passenger
配置apache
vim /etc/httpd/conf.d/passenger.conf
LoadModule passenger_module modules/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/share/rubygems/gems/passenger-3.0.17
PassengerRuby /usr/bin/ruby
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
PassengerStatThrottleRate 120
RailsAutoDetect On
</IfModule>
<VirtualHost *:8001>
DocumentRoot "/usr/share/puppet-dashboard/public/"
<Directory "/usr/share/puppet-dashboard/public/">
Options None
AllowOverride AuthConfig
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/dashboard.error.log
LogLevel warn
CustomLog /var/log/httpd/dashboard.access.log combined
ServerSignature On
</VirtualHost>
七、整合puppetmaster到apache
解决依赖关系
yum install mod_ssl
创建apache配置
cp /usr/share/puppet/ext/rack/files/apache2.conf /etc/httpd/conf.d/rack.conf
mkdir -p /etc/puppet/rack/public
cp /usr/share/puppet/ext/rack/files/config.ru /etc/puppet/rack/
修改apache配置
vim /etc/httpd/conf.d/rack.conf
# you probably want to tune these settings #注释这些配置,因为已经在passenger.conf中定义
#PassengerHighPerformance on
#PassengerMaxPoolSize 12
#PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
#PassengerStatThrottleRate 120
#RackAutoDetect Off
#RailsAutoDetect Off
Listen 8140
<VirtualHost *:8140>
SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP
SSLCertificateFile /var/lib/puppet/ssl/certs/puppet.server.cihi.cn.pem #修改这里对应的路径
SSLCertificateKeyFile /var/lib/puppet/ssl/private_keys/puppet.server.cihi.cn.pem
SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem
SSLCACertificateFile /var/lib/puppet/ssl/ca/ca_crt.pem
SSLCARevocationFile /var/lib/puppet/ssl/ca/ca_crl.pem
SSLVerifyClient optional
SSLVerifyDepth 1
- ››CentOS系统只需6步添加新硬盘并分区格式化的方法
- ››Centos6.0 64位下 MySQL 5.6.11 CMake 安装部署
- ››CentOS下配置超级终端minicom
- ››Centos6.2_x86_64环境下puppet-dashboard安装配置...
- ››CentOS下建立本地YUM源并自动更新
- ››CentOS 安装 PostgreSQL 9.2
- ››CentOS 6.3 安装 Oracle 11gR2 依赖库检查失败处理...
- ››CentOS 6.X 系统初始化生产脚本
- ››CentOS 6下安装nodejs 0.9.0教程
- ››CentOS使用Screen管理会话选项
- ››CentOS+JDK+Tomcat+MySql&JDBCDriver 开发环境搭建...
- ››CentOS 5.6创建NFS文件共享服务器
赞助商链接