重新啟動時,Edge Private Cloud 的內部部署安裝不會自動重新啟動。您可以使用下列指令,在任何節點上啟用/停用自動啟動功能。
如要啟用節點上的所有元件,請按照下列步驟操作:
/opt/apigee/apigee-service/bin/apigee-all enable_autostart
如要停用節點上的所有元件,請按照下列步驟操作:
/opt/apigee/apigee-service/bin/apigee-all disable_autostart
如要啟用或停用節點上特定元件的自動啟動功能,請按照下列步驟操作:
/opt/apigee/apigee-service/bin/apigee-service component_name enable_autostart
/opt/apigee/apigee-service/bin/apigee-service component_name disable_autostart
其中 component_name 是指元件。可能的值包括:
apigee-cassandra
(Cassandra)apigee-openldap
(OpenLDAP)apigee-postgresql
(PostgreSQL 資料庫)apigee-qpidd
(魁北克)apigee-sso
(邊緣單一登入)apigee-zookeeper
(ZooKeeper)edge-management-server
(管理伺服器)edge-management-ui
(新版 Edge UI)edge-message-processor
(訊息處理器)edge-postgres-server
(Postgres 伺服器)edge-qpid-server
(快速伺服器)edge-router
(邊緣路由器)edge-ui
(傳統版 UI)
指令碼只會影響您執行的節點。如要為所有節點設定自動啟動,請在所有節點上執行指令碼。
請注意,啟動元件的順序非常重要:
- 首先啟動 ZooKeeper、Cassandra、LDAP (SymasLDAP)
如果 ZooKeeper 和 Cassandra 是以叢集形式安裝,必須先啟動並執行完整叢集,才能啟動任何其他 Apigee 元件。
- 然後,任何 Apigee 元件 (管理伺服器、路由器、使用者介面等)。如果是 Postgres 伺服器,請先啟動 postgresql;如果是 Qpid 伺服器,請先啟動 qpidd。
影響:
- 如要完整重新啟動 Apigee Edge 環境,必須先完全啟動含有 ZooKeeper 和 Cassandra 的節點,才能啟動其他節點。
- 如果任何其他 Apigee 元件是在一或多個 ZooKeeper 和 Cassandra 節點上執行,建議不要使用自動啟動功能。請改為按照「啟動、停止、重新啟動及檢查 Apigee Edge 的狀態」一文所述的順序啟動元件。
排解自動啟動問題
如果設定自動啟動,但 Edge 啟動 SymasLDAP 伺服器時發生問題,您可以嘗試在所有節點上停用 SELinux,或將其設為寬容模式。如要設定 SELinux,請按照下列步驟操作:
- 編輯
/etc/sysconfig/selinux
檔案:sudo vi /etc/sysconfig/selinux
- 設為
SELINUX=disabled
或SELINUX=permissive
。 - 儲存編輯內容。
- 重新啟動電腦,然後重新啟動 Edge:
/opt/apigee/apigee-service/bin/apigee-all restart