一、部署说明
Foreman可以安装在Puppet服务器中,也可以单独安装在另一台服务器,本节介绍集成式安装过程。
二、准备YUM源
[[email protected] ~]# yum -y install http://yum.theforeman.org/releases/1.6/el6/x86_64/foreman-release-1.6.3-1.el6.noarch.rpm [[email protected] ~]#yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm [[email protected] ~]#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
[[email protected] ~]#yum install -y httpd httpd-devel mod_dav_svn [[email protected] ~]#yum install -y foreman-installer [[email protected] ~]#yum install -y ruby193-rubygem-passenger-native [[email protected] ~]#yum install -y foreman [[email protected] ~]#yum install -y mod_passenger mod_ssl mysql mysql-server foreman-mysql2 openssl
安装foreman出错:
多执行几次试试,实在不行就手动下载到YUM缓存目录:
[[email protected] ~]# cd /var/cache/yum/x86_64/6/foreman/packages/ [[email protected] ~]# wget http://yum.theforeman.org/releases/1.6/el6/x86_64/ruby193-rubygem-bootstrap-sass-3.0.3.0-1.el6.noarch.rpm
缓存中已存在失败的rpm包名,需要覆盖下
[[email protected] ~]# 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
[[email protected] ~]# 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
[[email protected] ~]# yum install -y tftp-server syslinux foreman-proxy [[email protected] ~]# 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,查看进程状态和端口是否启用:
[[email protected] ~]# /etc/init.d/foreman-proxy status [[email protected] ~]# netstat -naltp | grep 8443 [[email protected] ~]# netstat -naltp | grep 8140 [[email protected] ~]# netstat -naltp | grep 443
六、登陆Foreman
[[email protected] ~]# service puppetmaster stop [[email protected] ~]# service httpd restart [[email protected] ~]# iptables -I INPUT -p tcp --dport 443 -j ACCEPT [[email protected] ~]# service iptables save
访问: https://10.99.1.30 账号密码:admin / xsVApKbR3kzNew3G
修改密码:
注册代理:
查看主机:
时间: 2024-10-11 07:20:55