使用「分派器」時,您可以利用指令行、配置精靈或圖形使用者介面 (GUI) 來建立配置。
如果您使用指令行,請遵循下列步驟:
dscontrol executor start
dscontrol cluster add www.company.com
dscontrol port add www.company.com:80
dscontrol server add www.company.com:80:server2.company.com
dscontrol server add www.company.com:80:server3.company.com
dscontrol executor configure www.company.com
dscontrol manager start
現在,分派器會根據伺服器效能來進行負載平衡。
dscontrol advisor start http 80
現在,「分派器」可確保用戶端要求不會傳給失敗的 Web 伺服器。
現在,本端連接伺服器的基本配置已經完成。
如果您使用配置精靈,請遵循下列步驟:
dsserver
精靈會逐步引導您建立「分派器」元件的基本配置。 它會詢問關於網路的問題,帶您逐步設定「分派器」的叢集,來進行伺服器群組之資料流量的負載平衡。
配置精靈包含下列畫面:
如果要啟動 GUI,請遵循下列步驟:
dsserver