13.6 移轉 Identity Applications

不要對資料庫使用區分大小寫的定序。區分大小寫的定序不受支援。使用區分大小寫的定序可能會導致移轉期間發生重複鍵錯誤。如果遇到重複鍵錯誤,請檢查定序並予以校正,然後重新安裝 Identity Applications。唯一受支援的定序是 SQL_Latin1_General_CP1_CI_AS。

在移轉 Identity Applications 之前,必須從 /opt/netiq/common/openssl/lib64/ 目錄安裝 libssl.so.1.0.0libcrypto.so.1.0.0 程式庫。

Identity Applications 移轉過程包括以下步驟:

13.6.1 將資料庫移轉至新伺服器

如果您的使用者應用程式資料庫位於 PostgreSQL 中,請執行以下步驟:

  1. postgres 使用者身分登入裝有 PostgreSQL 的伺服器。

    #su - postgres

  2. 將資料輸出至 .sql 檔案:確定 Postgres 使用者對您要將檔案輸出到的目錄具有完整存取權:

    pg_dump -p <連接埠號碼> -U <使用者名稱> -d <資料庫名稱> -f <輸出位置>

    例如,

    pg_dump -p 5432 -U postgres -d idmuserappdb -f /tmp/idmuserappdb.sql

  3. 登入要安裝 PostgreSQL 的新伺服器。

  4. 安裝 PostgreSQL。

    1. 導覽至掛接 Identity_Manager_4.8_Linux.iso 的位置。

    2. 導覽至 /common/packages/postgres/ 目錄。

    3. 使用以下指令安裝 PostgreSQL:

      rpm -ivh netiq-postgresql-9.6.6-0.noarch.rpm

    4. 使用以下指令將群組關聯到 postgres 使用者。

      /usr/sbin/usermod -a -G postgres postgres
    5. /etc/passwd 檔案中,將 postgres 使用者的主目錄路徑變更為 /opt/netiq/idm/postgres/

      1. 導覽至 /etc/ 目錄。

      2. 編輯 passwd 檔案。

        vi /etc/passwd

      3. 將 postgres 使用者的主目錄變更為 /opt/netiq/idm/postgres/

    6. postgres 使用者身分登入。

      例如,

      su - postgres

    7. 在 PostgreSQL 安裝位置中建立 data 目錄。

      mkdir -p <POSTGRES_HOME>/data, where <POSTGRES_HOME> is /opt/netiq/idm/postgres

      例如,

      mkdir -p /opt/netiq/idm/postgres/data

    8. 輸出 PostgreSQL home 目錄.

      export PGHOME=<postgres home directory path>

      例如,

      export PGHOME=/opt/netiq/idm/postgres

    9. 輸出 PostgreSQL 密碼:

      export PGPASSWORD=<輸入資料庫密碼>

    10. 啟始化資料庫。

      LANG=en_US.UTF-8 <POSTGRES 主目錄>/bin/initdb -D <POSTGRES 主目錄>/data

      例如:

      LANG=en_US.UTF-8 /opt/netiq/idm/postgres/bin/initdb -D /opt/netiq/idm/postgres/data

    11. 導覽至 /opt/netiq/idm/postgres/bin 目錄。

    12. 為以下元件建立資料庫:

      $ createdb idmuserappdb
      $ psql -s idmuserappdb
      # create user idmadmin password 'somepassword';
      # GRANT ALL PRIVILEGES ON DATABASE idmuserappdb TO idmadmin;
      # ALTER DATABASE idmuserappdb OWNER TO idmadmin;
  5. 將資料輸入到新 PostgreSQL 資料庫中。

    1. 將步驟 2 中輸出的檔案複製到 postgres 使用者具有完整存取權的位置。

    2. 執行以下指令以將資料輸入到 PostgreSQL 資料庫。

      psql -d <資料庫名稱> -U <使用者名稱> -f <輸出檔案所在位置的完整路徑> -W

      例如,

      psql -d idmuserappdb -U idmadmin -f /tmp/idmuserappdb.sql -W

13.6.2 在新伺服器上安裝 Identity Applications

  1. 從 NetIQ 下載網站下載 Identity_Manager_4.8_Linux.iso

  2. 掛接 .iso

  3. 將 iso 的內容複製到您具有寫入存取權的另一個目錄。

    例如,

    cp -rp /mnt /home

  4. 編輯組態檔案的內容,以跳過使用者應用程式和角色與資源服務驅動程式的部署。

    附註:依預設,Identity Applications 安裝程式會建立並部署角色與資源服務和使用者應用程式的驅動程式。

    1. 導覽至 /mnt/user_application 目錄。

    2. 編輯 configure.sh 檔案。

      vi configure.sh

    3. 將下行設為備註:

      install_service_drivers "UA" "${ID_VAULT_ADMIN_LDAP}" "${ID_VAULT_PASSWORD}" "${ID_VAULT_HOST}" ${ID_VAULT_LDAPS_PORT} "cn=${ID_VAULT_DRIVER_SET},${ID_VAULT_DEPLOY_CTX}"

    4. 儲存 configure.sh 檔案。

  5. /mnt 目錄安裝 Identity Applications。

    ./install.sh

  6. /mnt 目錄設定 Identity Applications。

    ./configure.sh

  7. 選取自訂組態,並在出現以下提示時選取

    是否要在目前伺服器上設定 PostgreSQL 資料庫?

  8. 導覽至 /opt/netiq/idm/apps/configupdate 目錄中的組態更新公用程式,並確定組態設定正確無誤:

    ./configupdate.sh