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 将数据库迁移到新服务器

如果您的 User Application 数据库位于 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,其中,<POSTGRES_HOME>/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. 编辑配置文件的内容,以跳过 User Application 和 Roles and Resources Service 驱动程序的部署。

    注:默认情况下,Identity Applications 安装程序会创建并部署 Role and Resource Service 和 User Application 的驱动程序。

    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