一、部署说明
Foreman可以安装在Puppet服务器中,也可以单独安装在另一台服务器,本节介绍集成式安装过程。
二、准备YUM源
说明:163的源用来安装ruby193。
三、安装foreman-installer
1
2
3
4
5
| [iyunv@puppet ~]#yum install -y httpd httpd-devel mod_dav_svn
[iyunv@puppet ~]#yum install -y foreman-installer
[iyunv@puppet ~]#yum install -y ruby193-rubygem-passenger-native
[iyunv@puppet ~]#yum install -y foreman
[iyunv@puppet ~]#yum install -y mod_passenger mod_ssl mysql mysql-server foreman-mysql2 openssl
|
安装foreman出错:
多执行几次试试,实在不行就手动下载到YUM缓存目录:
缓存中已存在失败的rpm包名,需要覆盖下
1
| [iyunv@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
1
2
3
4
5
| [iyunv@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
1
2
3
4
5
6
7
8
| [iyunv@puppet ~]# yum install -y tftp-server syslinux foreman-proxy
[iyunv@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,查看进程状态和端口是否启用:
1
2
3
4
| [iyunv@puppet ~]# /etc/init.d/foreman-proxy status
[iyunv@puppet ~]# netstat -naltp | grep 8443
[iyunv@puppet ~]# netstat -naltp | grep 8140
[iyunv@puppet ~]# netstat -naltp | grep 443
|
六、登陆Foreman
1
2
3
4
| [iyunv@puppet ~]# service puppetmaster stop
[iyunv@puppet ~]# service httpd restart
[iyunv@puppet ~]# iptables -I INPUT -p tcp --dport 443 -j ACCEPT
[iyunv@puppet ~]# service iptables save
|
修改密码: 注册代理:
查看主机:
|