DWP Catalog root to non-root / directory change (how to)

Version 5
    Share:|

    Sometimes the situation changes and the DWP Catalog installed as root is no more allowed to be running with this user. One has to move to some limited user even more to other directory.

    Here is some guide what we did to make this procedure successful - running DWP Catalog without to reinstall.

     

    Start Status: user: root, directory: /opt/bmc/digitalworkplace

    End Status: user: bmc, directory: /appl/bmc/digitalworkplace

     

    Root Change

    1) Change ownership of /opt/bmc, /etc/arsystem to non-root user (chown -R bmc:bmc <main directory>)

    2) Go to /tmp folder and clean up it completely

    3) Go to /opt/bmc/digitalworkplace/bundle-cache/ and clean up it completely

    4) Go to  /opt/bmc/digitalworkplace/db and clean up it completely

    5) copy .bmc_profile from root home to user home and adapt .bash_profile (add ". /<home>/.bmc_profile" at the end)

              .bmc_profile content

                   BMC_AR_SERVER_HOME="/appl/bmc/digitalworkplace"

                   BMC_AR_SYSTEM_HOME="/appl/bmc/digitalworkplace"

                   export BMC_AR_SERVER_HOME

                   export BMC_AR_SYSTEM_HOME

    6) relogin

    7) Perform starup with non-root user

     

    Directory Change (beware. some files may be different. start a search using grep -R "/opt/bmc" /opt/bmc/digitalworkplace/*)

    1) mv /opt/bmc/* /appl/bmc

    2) files to replace /opt with /appl

         /opt/bmc/digitalworkplace

              sb/logger.sh

              sb/ExImTool/bin/run_data_migration.sh

              sb/ExImTool/bin/import_assets.sh

              sb/ExImTool/bin/export_tenant_data.sh

              sb/ExImTool/bin/arimport.sh

              sb/create_schema.sh

              sb/run_migrations.sh

              sb/env/set_script_variables.sh

              pluginsvr/pluginsvr_config.xml

              pluginsvr/log4j_pluginsvr.xml

              pluginsvr/fts/secondary/log4j_pluginsvr.xml

              pluginsvr/fts/secondary/pluginsvr_config.xml

              Logs/DIServerConfigureXMLTask.html

              Logs/Diserver-RIK_PostInstall.html

              Logs/ARServer-RIK_PostInstall.html

              Logs/ARServer-RIK_PostUpgrade.html

              FileRegistry.xml

              conf/ar.conf

              conf/org_apache_felix_cm_impl_DynamicBindings.config

              conf/org/apache/felix/fileinstall/a3d8ae26-4401-4d73-9f93-a31971b8d0db.config

              conf/org/apache/felix/fileinstall/dbc80803-6cb0-41b8-8659-e8914cc9ff7e.config

              bin/arStart.sh

              bin/arRestart.sh

              bin/arsystem

              bin/arserverd.conf

              bin/cartesignal.sh

              artools/arsrename.sh

              artools/arexport.sh

              artools/log4j.properties

              ARSystemInstalledConfiguration.xml

         etc/arsystem

              install_info

              <hostname>/armonitor.conf

         ~

              .bmc_profile

    3) db tables/configuration

         AR System Tenant Configuration

              update AR_System_Tenant_Configuration

              set Setting_Value=REPLACE(Setting_Value,'/opt/bmc','/appl/bmc')

              where Setting_Value LIKE '/opt/bmc%'

     

         AR System Configuration Setting

              update AR_System_Configuration_Sett57

              set Value=REPLACE(Value,'/opt/bmc','/appl/bmc')

              where Value LIKE '%/opt/bmc%'

     

    find and replace in vi editor:

         :%s#/opt/bmc#/appl/bmc#gc

    you can also automate the find and replace for all files using sed.

     

     

    Njoy