設定管理中心

管理中心」是一個 Web 使用者介面,在 Liberty 8.5.5.2 版及更新版本的伺服器上執行。安裝 Liberty 並建立伺服器之後,請配置 server.xml 檔。

開始之前

使用「Liberty 管理中心」(簡稱「管理中心」)來安裝 WebSphere Application Server Liberty。安裝 Liberty Repository 的資產主題會列出「管理中心」等資產的安裝方法。安裝「管理中心」最快的方法是執行 installUtility 指令或 featureManager 指令:

  1. 如果您還沒有這麼做,請安裝 WebSphere Application Server Liberty 8.5.5.2 或更新版本。
    限制: 請確定您使用的 Java 虛擬機器 (JVM) 支援 Liberty 產品和 Secure Sockets Layer (SSL)。請勿使用隨附於 WebSphere® Application Server traditional 產品(例如 Network Deployment)的 IBM JVM,以「管理中心」進行 Liberty 安裝。依預設,傳統產品隨附的 IBM JVM,會指向只隨附於傳統產品的安全類別,而不會指向「管理中心」所需的安全類別。 使用隨附於傳統產品的 IBM JVM 會導致「管理中心」無法顯示在瀏覽器中。
  2. 在 Liberty 安裝架構的主目錄中開啟指令視窗。例如,在 c:\wlp 中開啟指令視窗。
  3. 執行指令,以安裝 adminCenter-1.0 特性。
    若為 8.5.5.6 版或更新版本,請執行 installUtility 指令:
    bin/installUtility install adminCenter-1.0
    若為 8.5.5.5 版或更舊版本,請執行 featureManager 指令:
    bin/featureManager install adminCenter-1.0 --when-file-exists=ignore
  4. 若為 Liberty Developers 版,請執行指令來安裝 collectiveController-1.0 特性。
    若為 8.5.5.6 版或更新版本,請執行 installUtility 指令:
    bin/installUtility install collectiveController-1.0
    若為 8.5.5.5 版或更舊版本,請執行 featureManager 指令:
    bin/featureManager install collectiveController-1.0 --when-file-exists=ignore

    這個步驟僅適用於 Developers 版,不適用於 Liberty 的 Network Deployment、z/OS 或 Core 版。在安裝 adminCenter-1.0 特性之前,您可以選擇性地安裝 collectiveController-1.0 特性。

如需相關資訊,請前往 WASdev 網站,選取下載標籤,並在 Liberty 儲存庫中搜尋「管理中心」資產。

如果要在無法存取網際網路型 Liberty 儲存庫的主機上安裝「管理中心」,請先在可以存取網際網路的主機上安裝 Liberty 和「管理中心」特性。然後將安裝架構轉移至目標主機。如需包裝 Liberty 伺服器和執行時期以部署到其他主機的相關資訊,請參閱使用開發人員工具來包裝 Liberty 伺服器 從指令行包裝 Liberty 伺服器

關於這項作業

您可以將「管理中心」設定在獨立式伺服器和群體控制器上。這個主題的重點放在設定獨立式 Liberty 伺服器。

如果要在群體控制器上啟用「管理中心」,請參閱配置 Liberty 群體使用「管理中心」來部署資源中的範例。確定群體控制器的 server.xml 檔在特性管理程式配置中包含 <feature>adminCenter-1.0</feature>,並在 httpEndpoint 元素中設定 host 值,例如 host="*",讓所有主機都可以存取群體控制器。

程序

  1. 如果您的 Liberty 安裝架構沒有伺服器,請建立 Liberty 伺服器。

    例如,在 wlp/bin 目錄的指令視窗中,建立名為 myServer 的伺服器。

    server create myServer

    範例指令會將伺服器檔案新增至 wlp/usr/servers/myServer 目錄。

  2. 對 Liberty 伺服器的 server.xml 檔開啟編輯器,然後為「管理中心」配置伺服器。
    1. adminCenter-1.0 特性新增至特性管理程式。
      <featureManager>
         <feature>adminCenter-1.0</feature>
      </featureManager>
    2. 新增一或多位使用者,以配置安全登入。 例如:
      <quickStartSecurity userName="admin" userPassword="adminpwd" />
      如果使用者名稱或密碼包含非英文字元,請針對伺服器建立 jvm.options 檔,並將預設用戶端編碼定義為 UTF-8:
      -Ddefault.client.encoding=UTF-8
      如需 jvm.options 檔的相關資訊,請參閱自訂 Liberty 環境
    3. 如果要保護具有伺服器鑑別認證的金鑰儲存庫檔,請定義金鑰儲存庫,並為其指定密碼。
      <keyStore id="defaultKeyStore" password="Liberty" />

      如需其中定義「管理者」和「非管理者」,以及定義金鑰儲存庫的 server.xml 檔案範例,請參閱這個主題中的範例。如需定義多位管理使用者的相關資訊,請參閱在 Liberty 上設定 BasicRegistry 和角色對映

    4. 如果要從智慧型手機、平板電腦或遠端電腦存取「管理中心」,請確定 server.xml 檔案將 httpEndpoint 元素的 host 屬性設為 *(星號)或所定義的主機名稱。依預設,host 屬性設為 localhost
      <httpEndpoint id="defaultHttpEndpoint"
                    host="*"
                    httpPort="9080"
                    httpsPort="9443" />
    5. 儲存您對 server.xml 檔的變更。

      如果您已在 jvm.options 檔中針對非英文字元,將預設用戶端編碼定義為 UTF-8,且使用者登錄存在於 server.xml 檔的 quickStartSecuritybasicRegistry 元素中(其中儲存使用者名稱與密碼),請以 UTF-8 編碼儲存 server.xml 檔。

  3. 如果伺服器不在執行中,請啟動伺服器。

    例如,在 wlp/bin 目錄的指令視窗中,輸入 runstart 指令。

    server run myServer

    尋找顯示 adminCenter Web 應用程式正在執行的伺服器訊息。「管理中心」開始執行之後,您可以將 Web 瀏覽器指向應用程式,並且登入。請參閱登入管理中心

    多媒體 觀看:設定管理中心視訊會示範該程序。[文字稿]

範例:定義兩位獲授權使用者的 server.xml 檔

<server description="new server">

   <!-- Enable features -->
   <featureManager>
      <feature>adminCenter-1.0</feature>
   </featureManager>

   <!-- Define the host name for use by the collective.
        If the host name needs to be changed, the server should be
        removed from the collective and re-joined. -->
   <variable name="defaultHostName" value="localhost" />

    <!-- Define an Administrator and non-Administrator -->
   <basicRegistry id="basic">
      <user name="admin" password="adminpwd" />
      <user name="nonadmin" password="nonadminpwd" />
   </basicRegistry>

   <!-- Assign 'admin' to Administrator -->
   <administrator-role>
      <user>admin</user>
   </administrator-role> 
   <keyStore id="defaultKeyStore" password="Liberty" />

   <httpEndpoint id="defaultHttpEndpoint"
                 host="*"
                 httpPort="9080"
                 httpsPort="9443" />

</server>

指示主題類型的圖示 作業主題



「時間戳記」圖示 前次更新: 2016 年 11 月 30 日
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-libcore-mp&topic=twlp_ui_setup
檔名:twlp_ui_setup.html