事前準備

安裝 Apigee mTLS 前,您必須確認並未停用 localhost,且已將預設防火牆服務 (在許多情況下,是 firewalld) 替換為叢集節點上的 iptables

備份 Cassandra、Zookeeper 和 Postgres 資料

安裝 Apigee mTLS 之前,請先備份下列元件的資料:

  • apigee-cassandra
  • apigee-zookeeper
  • apigee-postgresql

如要瞭解如何備份這些元件的資料,請參閱如何備份

確認回送位址已啟用

如要使用 Apigee mTLS,您必須啟用 localhost 回送位址。IP 位址 127.0.0.1 必須可以轉送,且必須在叢集中的每個節點解析為 localhost。服務網格中的 Consul Proxy 伺服器是依附這個依附元件。

如果您之前已停用 localhost 回送位址,則必須在叢集的所有節點上重新啟用該位址。

替換預設防火牆

CentOS 和 RedHat Enterprise Linux (RHEL) 的預設防火牆為 firewalld。不過,Apigee mTLS 要求您改用 iptables 做為防火牆。因此,您必須:

  1. 停用並移除 firewalld (如已安裝)。

  2. 在每個節點上安裝 iptables,並確保其正常運作。

本節說明如何執行這些工作。

執行此操作的節點順序無關緊要。

如要解除安裝 firewalld 並確保已安裝並執行 iptables

  1. 以超級使用者身分登入節點。
  2. 執行下列指令以停止所有元件:
    /opt/apigee/apigee-service/bin/apigee-all stop
  3. 停用並解除安裝 firewalld
    1. 執行下列指令以停止 firewalld 服務:
      systemctl stop firewalld
    2. 停用 firewalld 服務並執行以下指令進行遮蓋:
      systemctl disable firewalld
      systemctl mask --now firewalld
    3. 執行下列指令,使用 yum 移除 firewalld 服務:
      yum remove firewalld
    4. 執行下列指令,重設所有處於失敗狀態的服務:
      systemctl reset-failed
    5. 執行下列指令,重新載入所有服務:
      systemctl daemon-reload
  4. 安裝 iptables
    1. 執行下列指令,安裝 iptablesiptables-services 套件:
      yum install iptables iptables-services
    2. 執行下列指令,重新載入執行中的服務:
      systemctl daemon-reload
    3. 執行下列指令來啟用 iptables
      systemctl enable iptables ip6tables
    4. 執行下列指令來啟動 iptablesip6tables 服務:
      systemctl start iptables ip6tables
  5. 對叢集中的每個節點重複執行這項程序。