安裝 Apigee mTLS 前,請務必確認您未停用 localhost,且已將叢集節點上的預設防火牆服務 (通常是 firewalld) 替換為 iptables。
備份 Cassandra、Zookeeper 和 Postgres 資料
安裝 Apigee mTLS 之前,請先備份下列元件的資料:
apigee-cassandraapigee-zookeeperapigee-postgresql
如需備份這些元件資料的操作說明,請參閱「如何備份」。
確認已啟用回送位址
Apigee mTLS 必須啟用 localhost 回送位址。IP 位址 127.0.0.1 必須可轉送,且必須在叢集中的每個節點上解析為 localhost。服務網格中的 Consul Proxy 伺服器會依賴這項設定。
如果您先前已停用 localhost 回送位址,則必須在叢集中的所有節點上重新啟用該位址。
取代預設防火牆
CentOS 和 RedHat Enterprise Linux (RHEL) 的預設防火牆為 firewalld。不過,Apigee mTLS 要求您改用 iptables 做為防火牆。因此,您必須:
- 停用並移除
firewalld(如果已安裝)。且
- 在每個節點上安裝
iptables,並確認其正在執行。
本節說明如何執行這些工作。
執行這項操作時,節點的順序並不重要。
如要解除安裝 firewalld,並確保 iptables 已安裝且正在執行:
- 以超級使用者身分登入節點。
- 執行下列指令,停止所有元件:
/opt/apigee/apigee-service/bin/apigee-all stop
- 停用並解除安裝
firewalld:- 執行下列指令,停止
firewalld服務:systemctl stop firewalld
- 執行下列指令,停用
firewalld服務並遮蓋:systemctl disable firewalld
systemctl mask --now firewalld - 執行下列指令,移除含有
yum的firewalld服務:yum remove firewalld
- 執行下列指令,重設所有狀態為失敗的服務:
systemctl reset-failed
- 執行下列指令,重新載入所有服務:
systemctl daemon-reload
- 執行下列指令,停止
- 安裝
iptables:- 執行下列指令,安裝
iptables和iptables-services套件:yum install iptables iptables-services
- 執行下列指令,重新載入執行中的服務:
systemctl daemon-reload
- 執行下列指令,啟用
iptables:systemctl enable iptables ip6tables
- 執行下列指令,啟動
iptables和ip6tables服務:systemctl start iptables ip6tables
- 執行下列指令,安裝
- 為叢集中的每個節點重複這項程序。