事前準備

本節說明其他工作 (除了您必須先執行才能安裝 Apigee mTLS 的需求之外)。這些工作包括:

  • 確認您並未停用 localhost
  • 在叢集的所有節點上,將預設的防火牆服務 (在許多情況下為 firewalld) 替換為 iptables
  • 備份 Cassandra、ZooKeeper 和 Postgres 資料

以下各節將分別說明這些工作。

備份 Cassandra、Zookeeper 和 Postgres 資料

在 Apigee mTLS 安裝與設定期間,您會在各自的節點中重新安裝 Cassandra 和 Postgres。因此,建議您備份下列元件的資料:

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

雖然您並未在叢集中重新安裝 ZooKeeper,但 Apigee 建議在安裝 Apigee mTLS 之前先備份其資料。

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

確認回送位址已啟用

如要使用 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. root 使用者身分登入節點。
  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. 對叢集中的每個節點重複執行這項程序。