标签:puppet foreman foreman-installer
一、部署说明
Foreman可以安装在Puppet服务器中,也可以单独安装在另一台服务器,本节介绍集成式安装过程。
二、准备YUM源
[root@puppet ~]# yum -y install http://yum.theforeman.org/releases/1.6/el6/x86_64/foreman-release-1.6.3-1.el6.noarch.rpm [root@puppet ~]#yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [root@puppet ~]#vi /etc/yum.repos.d/CentOS-163.repo [163-ruby193] name=CentOS-ruby193 baseurl=http://mirrors.163.com/centos/6/SCL/x86_64/ gpgcheck=0 enabled=1
说明:163的源用来安装ruby193。
三、安装foreman-installer
[root@puppet ~]#yum install -y httpd httpd-devel mod_dav_svn [root@puppet ~]#yum install -y foreman-installer [root@puppet ~]#yum install -y ruby193-rubygem-passenger-native [root@puppet ~]#yum install -y foreman [root@puppet ~]#yum install -y mod_passenger mod_ssl mysql mysql-server foreman-mysql2 openssl
安装foreman出错:
多执行几次试试,实在不行就手动下载到YUM缓存目录:
[root@puppet ~]# cd /var/cache/yum/x86_64/6/foreman/packages/ [root@puppet ~]# wget http://yum.theforeman.org/releases/1.6/el6/x86_64/ruby193-rubygem-bootstrap-sass-3.0.3.0-1.el6.noarch.rpm
缓存中已存在失败的rpm包名,需要覆盖下
[root@puppet ~]# mv -f ruby193-rubygem-bootstrap-sass-3.0.3.0-1.el6.noarch.rpm.1 ruby193-rubygem-bootstrap-sass-3.0.3.0-1.el6.noarch.rpm
四、使用foreman-installer安装foreman
[root@puppet ~]# foreman-installer --foreman-db-adapter mysql2 --foreman-db-type mysql --no-enable-puppet --no-enable-foreman-proxy --foreman-configure-epel-repo=false Success! *Foreman is running at https://puppet.ewp.com Initial credentials are admin / xsVApKbR3kzNew3G (注:Foreman登陆账号) Thefull log is at /var/log/foreman-installer/foreman-installer.log
说明:安装后会自动整合apache+passenger来运行puppet。
五、安装foreman-proxy
[root@puppet ~]# yum install -y tftp-server syslinux foreman-proxy [root@puppet ~]# foreman-installer --enable-foreman --enable-foreman-proxy --enable-puppet --puppet-server=true --foreman-proxy-puppetrun=true --foreman-proxy-puppetca=true --foreman-configure-epel-repo=false --foreman-proxy-register-in-foreman=false Success! * Foreman is running athttps://puppet.ewp.com Initial credentials are admin /xsVApKbR3kzNew3G * Foreman Proxy is running athttps://puppet.ewp.com:8443 * Puppetmaster is running at port 8140 The full log is at/var/log/foreman-installer/foreman-installer.log
说明:安装后会自动启动foreman-proxy,查看进程状态和端口是否启用:
[root@puppet ~]# /etc/init.d/foreman-proxy status [root@puppet ~]# netstat -naltp | grep 8443 [root@puppet ~]# netstat -naltp | grep 8140 [root@puppet ~]# netstat -naltp | grep 443
六、登陆Foreman
[root@puppet ~]# service puppetmaster stop [root@puppet ~]# service httpd restart [root@puppet ~]# iptables -I INPUT -p tcp --dport 443 -j ACCEPT [root@puppet ~]# service iptables save
访问: https://10.99.1.30 账号密码:admin / xsVApKbR3kzNew3G
修改密码:
注册代理:
本文出自 “月晴星飞” 博客,请务必保留此出处http://ywzhou.blog.51cto.com/2785388/1681920
Puppet整合Foreman(三):安装foreman(集成式)
标签:puppet foreman foreman-installer
原文地址:http://ywzhou.blog.51cto.com/2785388/1681920