参考文档
https://theforeman.org/manuals/1.5/index.html#3.InstallingForeman
https://theforeman.org/manuals/1.19/quickstart_guide.html
因为小版本众多而且已经失败了2次,故直接安装rpm而不用yum根据EPEL搜索不同的软件
nmtui更新机器名和DNS名
echo "192.168.10.130 puppet.pcdog.com">>/etc/hosts
cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.10.130 puppet.pcdog.com
ping puppet.pcdog.com
PING puppet.pcdog.com (192.168.10.130) 56(84) bytes of data.
64 bytes from puppet.pcdog.com (192.168.10.130): icmp_seq=1 ttl=64 time=0.036 ms
64 bytes from puppet.pcdog.com (192.168.10.130): icmp_seq=2 ttl=64 time=0.044 ms
64 bytes from puppet.pcdog.com (192.168.10.130): icmp_seq=3 ttl=64 time=0.068 ms
^C
--- puppet.pcdog.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.036/0.049/0.068/0.014 ms
安装puppet agent
rpm -ivh http://yum.puppetlabs.com/puppet5/el/7/x86_64/puppet-agent-5.5.6-1.el7.x86_64.rpm
安装jdk
yum install -y java-1.8.0-openjdk
安装puppet server
rpm -ivh http://yum.puppetlabs.com/puppet5/el/7/x86_64/puppetserver-5.3.5-1.el7.noarch.rpm
安装foreman install
rpm -ivh https://yum.theforeman.org/releases/latest/el7/x86_64/foreman-installer-1.19.0-1.el7.noarch.rpm
还缺4个包
http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
yum install -y foreman-selinux ruby rubygem-highline rubygem-kafo
再来安装foreman install
foreman-installer
tail -f /var/log/foreman-installer/foreman.log
下载postgres中
容我看个电视
15分钟左右,速度还算不错
看到官网,如果你有其他db server的话,可以直接用
foreman-installer \
--foreman-db-type=mysql \
--foreman-db-manage=false \
--foreman-db-host=dbserver.example.com \
--foreman-db-database=dbname \
--foreman-db-username=dbuser \
--foreman-db-password=dbpassword
As a post-installation step, to populate the database correctly, run:
foreman-rake db:migrate
foreman-rake db:seed
foreman-rake apipie:cache:index
看下服务
service foreman-proxy status
netstat -naltp | grep 8140
netstat -naltp | grep 443
webui
puppet.pcdog.org / 192.168.10.129
我密码呢
grep "admin_password" /var/log/foreman-installer/foreman.log
终于登陆了
添加本机作为客户端,证书还没有签发
创建自动签名,本机自动连接上了
首页也多了一个健康主机