0. 進入到/etc/haproxy/conf.d/目錄下
mv 015-horizon.cfg 150-timaiaas.cfg
將原有的dashboard的ha配置檔案做為自己的配置檔案。
1. 修改150-timaiaas.cfg
listen timaiaas bind 172.17.46.2:80 balance source capture cookie vgnvisitor= len 32 cookie SERVERID insert indirect nocache mode http option forwardfor option httpclose option httplog rspidel ^Set-cookie:\ IP= server node-5 172.17.47.3:8081 cookie node-5 check inter 2000 fall 3 server node-9 172.17.47.4:8081 cookie node-9 check inter 2000 fall 3 server node-10 172.17.47.5:8081 cookie node-10 check inter 2000 fall 3
修改埠為8081為我們的服務埠。
2. 開啟iptables 的8081埠 vi /etc/sysconfig/iptables
-A INPUT -p tcp -m multiport --ports 8081 -m comment --comment "timaIaas" -j ACCEPT
3. 設定timacloud開機自啟動
chkconfig timacloud on
4. 設定原有的dashboard 開機不自動啟動
chkconfig httpd off
完成。