我正在尝试在我的 CentOS 6.5 64 位机器上安装 puppet。puppet-server 的安装顺利完成,我能够安装 apache2.2.15 和 Passenger 4.0.53。我还安装了 puppet-dashboard 并配置了 apache。
一切都是从头开始安装的。请遵循以下教程: https://www.youtube.com/watch?v=k51SY_o9hMo 和http://www.youtube.com/watch?v=cHRHKKkCdTU用于安装 puppet 服务器和 puppet 仪表板。
现在,当我尝试访问 Puppet 仪表板时,我发现 ..test:3000 无法访问。
因此,我运行以下命令以确保 3000 端口在 CentOS 机器上可访问:
iptables -I INPUT -p tcp --dport 3000 -j ACCEPT
每次显示 apache 欢迎页面时都会出现这种情况。如果在 /etc/httpd/conf.d/welcome.conf 文件中我进行了如下更改
<LocationMatch "^/+$">
Options Indexes ##### this originally was Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
这将开始列出文档根目录(以下位置)的文件[此目录具有递归 755 权限]:
/usr/share/puppet-dashboard/public/
但实际的仪表板并未显示。
我没有使用默认的“puppet”作为我的主机名,并且在配置 mysql 时我使用了“user”@“%”而不是“user”@“localhost”。
/etc/httpd/conf.d/puppet-dash.conf 文件:
#LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.53
PassengerRuby /usr/bin/ruby
# you may want to tune these settings
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
#RailsAutoDetect On
Listen 3000
<VirtualHost *:3000>
ServerName masterpuppet.mydomain.test
ServerAlias masterpuppet
DocumentRoot /usr/share/puppet-dashboard/public/
<Directory /usr/share/puppet-dashboard/public/>
Options None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/puppet-dashboard_error.log
LogLevel warn
CustomLog /var/log/httpd/puppet-dashboard_access.log combined
......
</VirtualHost>
/etc/puppet.puppet.conf 文件是:
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
#Set up DNS
dns_alt_names = masterpuppet masterpuppet.mydomain.test
# Tell puppet where the environment directories live
environmentpath = $confdir/environments
# Confivure puppet to talk to puppet dashboard
reports = store, http
reporturl = http://masterpuppet.mydomain.test:3000/reports/upload
node_terminus = exec
external_nodes = /user/bin/env PUPPET_DASHBOARD_URL=http://masterpuppet.mydomain.test:3000 /usr/share/puppet-dashboard/bin/external_node
[代理人]
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
# Turn on reporting
report = true
puppet.conf 文件是从 puppet lab 文档中获取的默认文件,并进行了必要的更改以指向乘客和其他位置。证书名称经过双重检查,发现是正确的。
netstat -aln | grep 3000 显示端口 3000 正在监听。
现在我完全搞不清楚这里到底出了什么问题。puppet lab docs 中的所有文档,其他教程博客看起来都和我在这里做的一模一样。是不是我需要使用默认的“puppet”作为主机名,还是我这里漏掉了一些技巧。如果需要任何进一步的信息/说明来帮助我,请告诉我!