User Tools

Site Tools


deploy:ibm_ilmt_upgrade

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
deploy:ibm_ilmt_upgrade [2024/06/18 16:23]
manu created
deploy:ibm_ilmt_upgrade [2025/08/23 23:18] (current)
Line 3: Line 3:
 If you paln to change IP/​hostname,​ be sure to keep an alias DNS on previous hostname !!! If you paln to change IP/​hostname,​ be sure to keep an alias DNS on previous hostname !!!
  
 +===== Backup from previous server =====
 +
 +Before starting, save the licenses and DB from previous server
 +<cli prompt='#'>​
 +[root@BIGFIX01 backup]# ll /backup
 +  988964 -rw------- ​  1 db2inst1 db2iadm1 ​ 1012699136 Jun 16 01:02 BESREPOR.0.db2inst1.DBPART000.20240616010200.001
 +13621784 -rw------- ​  1 db2inst1 db2iadm1 13948706816 Jun 16 01:01 BFENT.0.db2inst1.DBPART000.20240616010108.001
 + ​6638792 -rw------- ​  1 db2inst1 db2iadm1 ​ 6798123008 Jun 16 01:02 TEMADB.0.db2inst1.DBPART000.20240616010208.001
 +</​cli>​
 +
 +
 +Here are the licences from previous server
 +<cli prompt='#'>​
 +[root@BIGFIX01 license]# ll /​backup/​license/​
 +52 -rw-r--r-- 1 root     root 51406 May 27 14:55 license.crt
 + 4 -rw-r--r-- 1 root     ​root ​ 3418 May 27 14:55 license.pvk
 +36 -rw-r--r-- 1 root     root 34740 May 27 14:56 masthead.afxm
 +</​cli>​
 +
 +===== Server =====
 +
 +New bigfix server Redhat 8.9
 +
 +Disable selinux
 +<cli prompt='#'>​
 +[root@BIGFIX01 ~]# cat /​etc/​selinux/​config
 +
 +# This file controls the state of SELinux on the system.
 +# SELINUX= can take one of these three values:
 +#     ​enforcing - SELinux security policy is enforced.
 +#     ​permissive - SELinux prints warnings instead of enforcing.
 +#     ​disabled - No SELinux policy is loaded.
 +#​SELINUX=permissive
 +SELINUX=disabled
 +
 +[root@BIGFIX01 ~]# init 6
 +</​cli>​
 +
 +==== Filesystems ====
 +
 +<cli prompt='#'>​
 +lvcreate -L 40g -n lv_backup vg_data
 +lvcreate -L 60g -n lv_db2inst1 vg_data
 +lvcreate -L 3g -n lv_opt vg_data
 +lvcreate -L 4g -n lv_optbeswebui vg_data
 +lvcreate -L 6g -n lv_optibmlmt vg_data
 +lvcreate -L 5g -n lv_optibmdb2 vg_data
 +lvcreate -L 50g -n lv_varoptbes vg_data
 +lvcreate -L 3g -n lv_varoptweb vg_data
 +lvcreate -L 2g -n lv_varoptcli vg_data
 +lvcreate -L 5g -n lv_varoptwebui vg_data
 +#
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_backup
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_db2inst1
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_opt
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_optbeswebui
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_optibmlmt
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_optibmdb2
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_varoptbes
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_varoptweb
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_varoptcli
 +mkfs.xfs /​dev/​mapper/​vg_data-lv_varoptwebui
 +</​cli>​
 +
 +Add to /etc/fstab
 +<​code>​
 +/​dev/​mapper/​vg_data-lv_backup /​backup ​          ​xfs ​    ​defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_db2inst1 /​home/​db2inst1 ​ xfs     ​defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_opt /opt                 ​xfs ​    ​defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_optbeswebui /​opt/​BESWebUI xfs    defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_optibmlmt /​opt/​ibm/​LMT ​  ​xfs ​    ​defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_optibmdb2 /​opt/​ibm/​db2 ​  ​xfs ​    ​defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_varoptbes /​var/​opt/​BESServer xfs defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_varoptweb /​var/​opt/​BESWebReportsServer xfs     ​defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_varoptcli /​var/​opt/​BESClient xfs defaults ​       0 0
 +/​dev/​mapper/​vg_data-lv_varoptwebui /​opt/​BESWebUI xfs    defaults ​       0 0
 +</​code>​
 +
 +Reload daemon ​
 +<cli prompt='#'>​
 +[root@BIGFIX01 /]# systemctl daemon-reload
 +</​cli>​ Create all mount points, and mount
 +
 +<cli prompt='#'>​
 +[root@BIGFIX01 /]# mount -a
 +</​cli>​
 +
 +==== Users ====
 +
 +<cli prompt='#'>​
 +groupadd -g 2500 webreports
 +groupadd -g 2501 dasadm1
 +groupadd -g 2502 db2iadm1
 +groupadd -g 2503 db2fsdm1
 +
 +useradd -u 2500 -g webreports webreports
 +useradd -u 2501 -g dasadm1 dasusr1
 +useradd -u 2502 -g db2iadm1 db2inst1
 +useradd -u 2503 -g db2fsdm1 db2fenc1
 +</​cli>​
 +
 +<cli prompt='#'>​
 +chmod 700 /​home/​db2inst1
 +chown -R db2inst1:​db2iadm1 /​home/​db2inst1
 +chown -R db2inst1 /backup
 +</​cli>​
 +
 +===== Install DB2 =====
 +
 +==== Prerequisites ====
 +
 +=== filesystems ===
 +
 +Remount /tmp with exec permissions ​
 +<cli prompt='#'>​
 +[root@BIGFIX01 /]# mount | grep '/​tmp'​
 +/​dev/​mapper/​rhel-tmp on /tmp type xfs (rw,​nosuid,​nodev,​noexec,​relatime,​seclabel,​attr2,​inode64,​logbufs=8,​logbsize=32k,​noquota)
 +[root@BIGFIX01 /]# mount -o remount,​exec /tmp
 +
 +[root@BIGFIX01 /]# mount | grep '/​tmp'​
 +/​dev/​mapper/​rhel-tmp on /tmp type xfs (rw,​nosuid,​nodev,​relatime,​seclabel,​attr2,​inode64,​logbufs=8,​logbsize=32k,​noquota)
 +</​cli>​
 +
 +**To satisfy db2precheck,​ I've created a new LV for /tmp, and just overmount (no entry into /​etc/​fstab)**
 +
 +==== Downloading the BigFix installer for Linux ====
 +
 +https://​www.ibm.com/​docs/​en/​license-metric-tool?​topic=platform-step-2-downloading-bigfix-installer
 +  From IBM Passport Advantage download the following softwares
 +  - BigFix_Platform_Install_V10.0.11.zip
 +  - DB2_SEVPC_OA_11.5.4_MP_ML.zip
 +
 +=== packages ===
 +
 +<cli prompt='#'>​
 +[root@BIGFIX01 server_dec]#​ pwd
 +/​backup/​tmp/​server_dec
 +[root@BIGFIX01 server_dec]#​ ./​db2prereqcheck -v 11.5.0.0 | grep failed
 +DBT3514W ​ The db2prereqcheck utility failed to find the following 32-bit library file: "​libstdc++.so.6"​.
 +   ​DBT3514W ​ The db2prereqcheck utility failed to find the following 32-bit library file: "/​lib/​libpam.so*"​.
 +   ​DBT3514W ​ The db2prereqcheck utility failed to find the following 32-bit library file: "/​lib/​libpam.so*"​.
 +</​cli>​
 +
 +Install missing packages 32 and 64 bits
 +<cli prompt='#'>​
 +[root@BIGFIX01 server_dec]#​ yum install cpp gcc gcc-c++ kernel-devel binutils
 +[root@BIGFIX01 server_dec]#​ yum install libstdc++.i686 pam.i686
 +
 +[root@BIGFIX01 server_dec]#​ yum install nmon
 +</​cli>​
 +
 +=== tuning parameters ===
 +
 +Before
 +<cli prompt='#'>​
 +[root@BIGFIX01 sysctl.d]# sysctl -a | grep kernel.msgm
 +kernel.msgmax = 8192
 +kernel.msgmnb = 16384
 +kernel.msgmni = 32000
 +</​cli>​
 +
 +After
 +<cli prompt='#'>​
 +[root@BIGFIX01 sysctl.d]# cat /​etc/​sysctl.d/​00-db2.conf
 +### DB2 kernel parameters
 +### Comment as default are higher values
 +### Example for a computer with 16GB of RAM:
 +#​kernel.shmmni=4096
 +#​kernel.shmmax=17179869184
 +#​kernel.shmall=8388608
 +#​kernel.sem=<​SEMMSL>​ <​SEMMNS>​ <​SEMOPM>​ <​SEMMNI>​
 +#​kernel.sem=250 1024000 32 4096
 +kernel.msgmni=16384
 +kernel.msgmax=65536
 +kernel.msgmnb=65536
 +###
 +#​fs.file-max=16384
 +fs.aio-max-nr=1048576
 +vm.max_map_count=4194304
 +###
 +vm.swappiness=5
 +#​vm.overcommit_memory=0
 +
 +
 +[root@BIGFIX01 sysctl.d]# sysctl -p /​etc/​sysctl.d/​00-db2.conf
 +kernel.msgmni = 16384
 +kernel.msgmax = 65536
 +kernel.msgmnb = 65536
 +
 +[root@BIGFIX01 sysctl.d]# sysctl -a | grep kernel.msgm
 +kernel.msgmax = 65536
 +kernel.msgmnb = 65536
 +kernel.msgmni = 16384
 +</​cli>​
 +
 +Limits for user db2inst1
 +<cli prompt='#'>​
 +[root@BIGFIX01 security]# cat /​etc/​security/​limits.conf
 +db2inst1 ​       soft    nofile ​         65536
 +db2inst1 ​       hard    nofile ​         65536
 +</​cli>​
 +
 +=== Installation ===
 +
 +Install DB2
 +<cli prompt='#'>​
 +[root@BIGFIX01 server_dec]#​ ./​db2_install
 +Read the license agreement file in the db2/license directory.
 +
 +***********************************************************
 +To accept those terms, enter "​yes"​. Otherwise, enter "​no"​ to cancel the install process. [yes/no]
 +yes
 +
 +
 +Default directory for installation of products - /​opt/​ibm/​db2/​V11.5
 +***********************************************************
 +Install into default directory (/​opt/​ibm/​db2/​V11.5) ? [yes/no]
 +yes
 +
 +
 +Specify one of the following keywords to install DB2 products.
 +
 +  SERVER
 +  CONSV
 +  CLIENT
 +  RTCL
 +
 +Enter "​help"​ to redisplay product names.
 +
 +Enter "​quit"​ to exit.
 +
 +***********************************************************
 +SERVER
 +***********************************************************
 +Do you want to install the DB2 pureScale Feature? [yes/no]
 +no
 +DBI20043E ​ DB2 failed to install because of restrictive permission settings on the temporary directory /tmp
 +
 +
 +***********************************************************
 +SERVER
 +***********************************************************
 +Do you want to install the DB2 pureScale Feature? [yes/no]
 +no
 +DB2 installation is being initialized.
 +
 + Total number of tasks to be performed: 58
 +Total estimated time for all tasks to be performed: 2819 second(s)
 +
 +Task #1 start
 +Description:​ Checking license agreement acceptance
 +Estimated time 1 second(s)
 +Task #1 end
 +
 +Task #2 start
 +</​cli>​
 +
 +<cli prompt='#'>​
 +[root@BIGFIX01 install]# /​opt/​ibm/​db2/​V11.5/​adm/​db2licm -a <​file_vpc>​
 +
 +[root@BIGFIX01 install]# /​opt/​ibm/​db2/​V11.5/​adm/​db2licm -l
 +Product name:                     "​DB2 Standard Edition"​
 +License type:                     "​Virtual Processor Core"
 +Expiry date:                      "​Permanent"​
 +Product identifier: ​              "​db2std"​
 +Version information: ​             "​11.5"​
 +Max amount of memory (GB):        "​128"​
 +Max number of cores: ​             "​16"​
 +Enforcement policy: ​              "​Hard Stop"
 +Features:
 +IBM DB2 Performance Management Offering: ​             "Not licensed"​
 +</​cli>​
 +
 +===== Install BigFix =====
 +
 +=== Create DB2 instance ===
 +
 +New instance: db2inst1 ​
 +<cli prompt='#'>​
 +[root@BIGFIX01 ~]# /​opt/​ibm/​db2/​V11.5/​instance/​db2icrt -u db2inst1 db2inst1
 +</​cli>​
 +
 +=== restore DB2 existing DBs ===
 +
 +As user **db2inst1** restore previous BigFix and WebReport DB backup directory: /​backup/​database
 +<cli prompt='​$'>​
 +[db2inst1@BIGFIX01 ~]$ db2start
 +05/27/2024 14:​20:​52 ​    ​0 ​  ​0 ​  ​SQL1063N ​ DB2START processing was successful.
 +SQL1063N ​ DB2START processing was successful.
 +
 +[db2inst1@BIGFIX01 ~]$ db2 restore db BFENT from /​backup/​database
 +DB20000I ​ The RESTORE DATABASE command completed successfully.
 +
 +[db2inst1@BIGFIX01 ~]$ db2 restore db BESREPOR from /​backup/​database
 +DB20000I ​ The RESTORE DATABASE command completed successfully.
 +
 +[db2inst1@BIGFIX01 ~]$ db2stop
 +05/21/2024 10:​43:​46 ​    ​0 ​  ​0 ​  ​SQL1064N ​ DB2STOP processing was successful.
 +SQL1064N ​ DB2STOP processing was successful.
 +[db2inst1@BIGFIX01 ~]$ db2start
 +05/21/2024 10:​43:​47 ​    ​0 ​  ​0 ​  ​SQL1063N ​ DB2START processing was successful.
 +SQL1063N ​ DB2START processing was successful.
 +[db2inst1@BIGFIX01 ~]$ db2 list database directory
 +
 + ​System Database Directory
 +
 + ​Number of entries in the directory = 2
 +
 +Database 1 entry:
 +
 + ​Database alias                       = BESREPOR
 + ​Database name                        = BESREPOR
 + Local database directory ​            = /​home/​db2inst1
 + ​Database release level               = 15.00
 + ​Comment ​                             =
 + ​Directory entry type                 = Indirect
 + ​Catalog database partition number ​   = 0
 + ​Alternate server hostname ​           =
 + ​Alternate server port number ​        =
 +
 +Database 2 entry:
 +
 + ​Database alias                       = BFENT
 + ​Database name                        = BFENT
 + Local database directory ​            = /​home/​db2inst1
 + ​Database release level               = 15.00
 + ​Comment ​                             =
 + ​Directory entry type                 = Indirect
 + ​Catalog database partition number ​   = 0
 + ​Alternate server hostname ​           =
 + ​Alternate server port number ​        =
 +</​cli>​
 +
 +=== Install BigFix server v10.0.11.108 (with option -reuseDb) ​ ===
 +
 +Here are the licences from previous server
 +<cli>
 +[root@BIGFIX01 license]# ll /​backup/​license/​
 +52 -rw-r--r-- 1 root     root 51406 May 27 14:55 license.crt
 + 4 -rw-r--r-- 1 root     ​root ​ 3418 May 27 14:55 license.pvk
 +36 -rw-r--r-- 1 root     root 34740 May 27 14:56 masthead.afxm
 +</​cli>​
 +
 +Download the BigFix server from web site https://​support.bigfix.com/​bes/​install/​downloadbes.html
 +<cli>
 +[root@BIGFIX01 install]# unzip  BigFix_Platform_Install_V10.0.11.zip
 +[root@BIGFIX01 BigFix_server_Linux_V10.0.11.108]#​ tar zxvf ServerInstaller_10.0.11.108-rhe6.x86_64.tgz
 +[root@BIGFIX01 ServerInstaller_10.0.11.108-rhe6.x86_64]#​ pwd
 +/​backup/​install/​BigFix_Platform_Install_V10.0.11/​BigFix_server_Linux_V10.0.11.108/​ServerInstaller_10.0.11.108-rhe6.x86_64
 +</​cli>​
 +
 +
 +Do not install WebUI
 +<cli prompt='#'>​
 +[root@BIGFIX01 ServerInstaller_10.0.11.108-rhe6.x86_64]#​ pwd
 +/​backup/​install/​BigFix_Platform_Install_V10.0.11/​BigFix_server_Linux_V10.0.11.108/​ServerInstaller_10.0.11.108-rhe6.x86_64
 +
 +####################​
 +Choose the type of setup that best suits your needs:
 +[1]  I want to install with a BES license authorization file.
 +[2]  I want to install with a production license that I already have.
 +[3]  I want to install with an existing masthead.
 +Choose one of the options above or press <​Enter>​ to accept the default value: [1]
 +3
 +
 +####################​
 +Proxy usage
 +[1]  Use the proxy to access the internet
 +[2]  Do not use the proxy
 +Choose one of the options above or press <​Enter>​ to accept the default value: [2]
 +1
 +####################​
 +Proxy hostname
 +Specify the hostname or the IP address of the Server that acts as a proxy:
 +XXX.XXX.XXX.XXX
 +####################​
 +Proxy port
 +Specify the port of the proxy or press <​Enter>​ if this parameter is not required:
 +XXXX
 +####################​
 +Advanced proxy parameters
 +The proxy will be configured using the following defaults:
 +        Proxy user: none
 +        Proxy password: none
 +        Proxy tunneling capability: let proxy decide
 +        Authentication method: all methods allowed by the proxy
 +        Proxy exception list: localhost,​127.0.0.1
 +        Use the proxy for downstream notification:​ false
 +[1]  Use the default values
 +[2]  Set advanced proxy parameters
 +Choose one of the options above or press <​Enter>​ to accept the default value: [1]
 +
 +####################​
 +Test the connection using the proxy
 +If you want to enable FIPS 140-2 compliant cryptography,​ select "Test the connection using FIPS".
 +Warning: There are some proxy authentication methods that are not compatible with FIPS.
 +[1]  Test the connection
 +[2]  Test the connection using FIPS
 +[3]  Do not test the connection
 +Choose one of the options above or press <​Enter>​ to accept the default value: [1]
 +
 +Info: The test connection using the proxy ran successfully.
 +####################​
 +Site admin private key
 +Specify the site level signing key file (license.pvk) for the database that you want to administer or press <​Enter>​ to accept the default value: ./​license/​license.pvk
 +/​backup/​license/​license.pvk
 +The specified file does not exist.
 +Invalid choice: /​backup/​license/​license.pvk,​ retry:
 +Site admin private key
 +Specify the site level signing key file (license.pvk) for the database that you want to administer or press <​Enter>​ to accept the default value: ./​license/​license.pvk
 +/​backup/​license/​license.pvk
 +####################​
 +Site admin private key password
 +Specify the related site admin private key password:
 +
 +Enter the password again for verification:​
 +
 +####################​
 +Deployment masthead
 +Specify the masthead file (masthead.afxm or actionsite.afxm) for your deployment or press <​Enter>​ to accept the default value: ./​license/​masthead.afxm
 +/​backup/​license/​masthead.afxm
 +####################​
 +Use root user for Web Reports
 +If you specify true, Web Reports service will run with root privileges.
 +[1]  True
 +[2]  False
 +Choose one of the options above or press <​Enter>​ to accept the default value: [2]
 +1
 +####################​
 +Local DB2 port
 +Specify the local DB2 port number or press <​Enter>​ to accept the default value: 50000
 +
 +Info: The ODBC driver configuration for DB2 was already installed.
 +Info: Creating or reusing the database for the server component, please wait ...
 +Info: The database for the server component was created or reused successfully.
 +Info: Creating or reusing the database for the Web Reports component, please wait ...
 +Info: The database for the Web Reports component was created or reused successfully.
 +Info: The rpm '​./​repos/​BESAgent-10.0.11.108-rhe6.x86_64.rpm'​ was installed successfully.
 +Info: The rpm '​./​repos/​BESRootServer-10.0.11.108-rhel.x86_64.rpm'​ was installed successfully.
 +Info: The rpm '​./​repos/​BESWebReportsServer-10.0.11.108-rhel.x86_64.rpm'​ was installed successfully.
 +Info: The rpm '​./​repos/​BESWebUI-10.0.11.108-rhe6.x86_64.rpm'​ was installed successfully.
 +Info: The proxy was successfully configured.
 +Info: Configuring the database for the server component, please wait ...
 +Info: The database for the server component was configured successfully.
 +Info: Password policy successfully set.
 +Info: The service '​BESRootServer'​ started successfully.
 +Info: The service '​BESFillDB'​ started successfully.
 +Info: The service '​BESGatherDB'​ started successfully.
 +Info: Web Reports self-signed certificate was successfully created.
 +Info: Configuring the database for the Web Reports component, please wait ...
 +Info: The database for the Web Reports component was configured successfully.
 +Info: A Web Reports administrator was created successfully.
 +Job for beswebreports.service failed because the control process exited with error code.
 +See "​systemctl status beswebreports.service"​ and "​journalctl -xe" for details.
 +Error: Unable to start the service: '​BESWebReportsServer'​
 +mkdir: cannot create directory ‘/​var/​opt/​BESWebUI/​Mirror’:​ File exists
 +mkdir: cannot create directory ‘/​var/​opt/​BESWebUI/​WebUI’:​ File exists
 +Info: WebUI credentials created successfully.
 +Info: The service '​BESClient'​ started successfully.
 +Error: An error occurred while starting the service: '​BESWebUI'​
 +Error: An error occurred while installing '​BigFix'​. Refer to the installation log file '/​var/​log/​BESInstall.log'​ for additional details.
 +[root@BIGFIX01 ServerInstaller_10.0.11.108-rhe6.x86_64]#​
 +
 +[root@BIGFIX01 ~]# /​opt/​BESServer/​bin/​BESAdmin -initializewebreportsuser -dbname:"​BESREPOR"​ -dbUsername:"​db2inst1"​ -dbPassword:"​********"​ -dbPort:"​25010"​ -username:"​BFAdmin"​ -password:"​********"​ -roleID:1
 +
 +select ServerID from DBINFO
 +Mon, 27 May 2024 14:59:20 +0200 -- 853293120 -- select FieldContents from ADMINFIELDS where FieldName = ? and IsDeleted = 0
 +</​cli>​
 +
 +===== Install, restore DB ILMT =====
 +
 +==== Prerequisites ====
 +
 +Check the maximum connections else change it (min 8)
 +<cli prompt='​$'>​
 +[db2inst1@BIGFIX01 ~]$ db2 get dbm cfg | grep NUMDB
 + Max number of concurrently active databases ​    ​(NUMDB) = 32
 +
 +[db2inst1@BIGFIX01 ~]$ db2 update dbm cfg using numdb 34
 +</​cli>​
 +
 +Start from scratch Without a DB, leave installer to setup it
 +<cli prompt='​$'>​
 +[db2inst1@BIGFIX01 ~]$ db2 list db directory
 +
 + ​System Database Directory
 +
 + ​Number of entries in the directory = 3
 +
 +Database 1 entry:
 +
 + ​Database alias                       = BESREPOR
 + ​Database name                        = BESREPOR
 + Local database directory ​            = /​home/​db2inst1
 + ​Database release level               = 15.00
 + ​Comment ​                             =
 + ​Directory entry type                 = Indirect
 + ​Catalog database partition number ​   = 0
 + ​Alternate server hostname ​           =
 + ​Alternate server port number ​        =
 +
 +Database 2 entry:
 +
 + ​Database alias                       = TEMADB
 + ​Database name                        = TEMADB
 + Local database directory ​            = /​home/​db2inst1
 + ​Database release level               = 15.00
 + ​Comment ​                             = ILMT database
 + ​Directory entry type                 = Indirect
 + ​Catalog database partition number ​   = 0
 + ​Alternate server hostname ​           =
 + ​Alternate server port number ​        =
 +...
 +
 +[db2inst1@BIGFIX01 ~]$ db2 deactivate db TEMADB
 +DB20000I ​ The DEACTIVATE DATABASE command completed successfully.
 +
 +[db2inst1@BIGFIX01 ~]$ db2 drop db TEMADB
 +DB20000I ​ The DROP DATABASE command completed successfully.
 +</​cli>​
 +
 +Ensure that the DB2 user has the DBAUTH permission for the BigFix database (BFENT), here we 'll use **db2inst1** for configuration on the web interface
 +<cli prompt='​$'>​
 +[db2inst1@BIGFIX01 ~]$ db2 connect to bfent
 +
 +   ​Database Connection Information
 +
 + ​Database server ​       = DB2/​LINUXX8664 11.5.8.0
 + SQL authorization ID   = DB2INST1
 + Local database alias   = BFENT
 +
 +[db2inst1@BIGFIX01 ~]$ db2 "​SELECT * FROM SYSCAT.DBAUTH"​
 +
 +GRANTOR ​                                                                                                                         GRANTORTYPE GRANTEE ​                                                                                                                         GRANTEETYPE BINDADDAUTH CONNECTAUTH CREATETABAUTH DBADMAUTH EXTERNALROUTINEAUTH IMPLSCHEMAAUTH LOADAUTH NOFENCEAUTH QUIESCECONNECTAUTH LIBRARYADMAUTH SECURITYADMAUTH SQLADMAUTH WLMADMAUTH EXPLAINAUTH DATAACCESSAUTH ACCESSCTRLAUTH CREATESECUREAUTH
 +-------------------------------------------------------------------------------------------------------------------------------- ----------- -------------------------------------------------------------------------------------------------------------------------------- ----------- ----------- ----------- ------------- --------- ------------------- -------------- -------- ----------- ------------------ -------------- --------------- ---------- ---------- ----------- -------------- -------------- ----------------
 +SYSIBM ​                                                                                                                          ​S ​          ​DB2INST1 ​
 +  2 record(s) selected.
 +</​cli>​
 +
 +==== Install ILMT ====
 +
 +Change the response file **install_response.txt** to accept licenses...
 +<cli prompt='#'>​
 +[root@BIGFIX01 ILMT_Server_Lnx-x86-64_V9235]#​ pwd
 +/​backup/​install/​ILMT_Server_Lnx-x86-64_V9235
 +[root@BIGFIX01 ILMT_Server_Lnx-x86-64_V9235]#​ cat install_response.txt | grep -v '​^#'​
 +RSP_LICENSE_ACCEPTED=true
 +RSP_DISABLE_PREREQ_WARNINGS=true
 +RSP_TLM_ROOT=/​opt/​ibm/​LMT
 +RSP_TLM_HTTPS_PORT=9081
 +RSP_VMMAN_SERVICE_PORT=25001
 +
 +[root@BIGFIX01 ILMT_Server_Lnx-x86-64_V9235]#​ setup-server-linux-x86_64.sh -f ./​install_response.txt -i silent
 +</​cli>​
 +
 +Now go to the Web interface https://​bigfix01:​9081/ ​
 +
 +Here you have to create the DB TEAMDB
 +  * port: 25010
 +  * Database Name: TEAMDB
 +  * User name: db2inst1
 +  * DB2 instance owner: db2inst1
 +
 +Once done, select datasource: **BigFix**
 +
 +
 +Now asking for password for user ILMTAdmin
 +
 +
 +==== Now restore ILMT DB to previous state ====
 +
 +<cli prompt='#'>​
 +[root@BIGFIX01 ~]# /​etc/​rc.d/​init.d/​LMTserver stop
 +Stopping LMT server
 +Stopping the local VM Manager Tool.
 +
 +Stopping server server1.
 +Server server1 stopped.
 +[root@BIGFIX01 ~]# su - db2inst1
 +</​cli>​
 +<cli prompt='​$'>​
 +[db2inst1@BIGFIX01 ~]$ db2 connect to temadb
 +
 +   ​Database Connection Information
 +
 + ​Database server ​       = DB2/​LINUXX8664 11.5.8.0
 + SQL authorization ID   = DB2INST1
 + Local database alias   = TEMADB
 +
 +[db2inst1@BIGFIX01 ~]$ db2 terminate
 +DB20000I ​ The TERMINATE command completed successfully.
 +[db2inst1@BIGFIX01 ~]$ db2 deactivate db TEMADB
 +DB20000I ​ The DEACTIVATE DATABASE command completed successfully.
 +[db2inst1@BIGFIX01 ~]$ db2 restore db TEMADB from /​backup/​database replace existing
 +
 +SQL2523W ​ Warning! ​ Restoring to an existing database that is different from
 +the database on the backup image, but have matching names. The target database
 +will be overwritten by the backup version. ​ The Roll-forward recovery logs
 +associated with the target database will be deleted.
 +DB20000I ​ The RESTORE DATABASE command completed successfully.
 +[db2inst1@BIGFIX01 ~]$ db2 activate db TEMADB
 +DB20000I ​ The ACTIVATE DATABASE command completed successfully.
 +[db2inst1@BIGFIX01 ~]$ logout
 +</​cli>​
 +<cli prompt='#'>​
 +[root@BIGFIX01 ~]# /​etc/​rc.d/​init.d/​LMTserver start
 +Starting LMT server
 +</​cli>​
 +
 +Now test: https://​bigfix01:​9081/​sam ​     with user ILMTAdmin
 +
 +==== Upgrade BigFix from 10 to 11 ====
 +
 +=== Compatibility matrix ===
 +
 +
 +Minimum level to upgrade to 11 is 10.0.7
 +<cli prompt='​$'>​
 +[db2inst1@BIGFIX01 ~]$ rpm -qa | grep BES
 +BESWebReportsServer-10.0.11.108-rhel.x86_64
 +BESRootServer-10.0.11.108-rhel.x86_64
 +BESAgent-10.0.11.108-rhe6.x86_64
 +</​cli>​
 +
 +DB2 versions supported for BigFix 11
 +
 +
 +<cli prompt='​$'>​
 +[db2inst1@BIGFIX01 ~]$ db2ls
 +
 +Install Path                       ​Level ​  Fix Pack   ​Special Install Number ​  ​Install Date                  Installer UID
 +---------------------------------------------------------------------------------------------------------------------
 +/​opt/​ibm/​db2/​V11.5 ​              ​11.5.8.0 ​       0                            Mon May  6 18:25:03 2024 CEST             0
 +</​cli>​
 +
 +ILMT 9.2.35 compatibility matrix with BigFix
 +
 +{{:​bigfix:​pasted:​20240610-152135.png?​500}}
 +
 +=== Upgrade BigFix ===
 +
 +Log is available at place: **/​var/​log/​BESInstall.log** ​
 +<cli prompt='#'>​
 +[root@BIGFIX01 ServerInstaller_11.0.2.125-rhe7.x86_64]# ​ pwd
 +/​backup/​install/​ServerInstaller_11.0.2.125-rhe7.x86_64
 +
 +[root@BIGFIX01 ServerInstaller_11.0.2.125-rhe7.x86_64]#​ ./​install.sh -upgrade
 +Welcome to the upgrade of BigFix version 11.0.2.125
 +Info: The ODBC driver configuration for DB2 was already installed.
 +Info: Stopping server services ...
 +Info: The rpm '​./​repos/​BESRootServer-11.0.2.125-rhel.x86_64.rpm'​ was installed successfully.
 +Info: Configuring the database for the server component, please wait ...
 +Info: The database for the server component was configured successfully.
 +Info: Stopping the client service ...
 +Info: The rpm '​./​repos/​BESAgent-11.0.2.125-rhe7.x86_64.rpm'​ was installed successfully.
 +Info: Stopping Web Reports service ...
 +Info: The ODBC driver configuration for DB2 was already installed.
 +Info: The rpm '​./​repos/​BESWebReportsServer-11.0.2.125-rhel.x86_64.rpm'​ was installed successfully.
 +Info: Configuring the database for the Web Reports component, please wait ...
 +Info: The database for the Web Reports component was configured successfully.
 +Info: The service '​BESRootServer'​ started successfully.
 +Info: The service '​BESFillDB'​ started successfully.
 +Info: The service '​BESGatherDB'​ started successfully.
 +Info: The service '​BESClient'​ started successfully.
 +Info: The service '​BESWebReportsServer'​ started successfully.
 +The '​BigFix'​ upgrade completed successfully.
 +</​cli>​
 +
 +Propagate license (log file: **/​var/​log/​BESAdminDebugOut.txt**)
 +<cli prompt='#'>​
 +[root@BIGFIX01 ServerInstaller_11.0.2.125-rhe7.x86_64]#​ /​opt/​BESServer/​bin/​BESAdmin.sh -syncmastheadandlicense -sitePvkLocation=/​backup/​license/​license.pvk
 +Please enter the sitePvkPassword:​
 +
 +Validating new license
 +Importing new license
 +Stopping server services
 +Updating masthead
 +Creating new server signing certificates
 +Creating new client CA certificates
 +Re-signing user data
 +Re-signing sites data
 +Re-signing role data
 +Re-signing LDAP settings
 +Re-signing custom site writers
 +Updating encrypted WebUI data
 +Re-signing SAML identity provider configuration
 +Re-signing Admin Fields
 +Re-signing custom content
 +Re-signing custom actions
 +Re-signing role subscriptions
 +Re-signing management rights actions
 +Re-signing site subscription actions
 +Re-signing mailbox files
 +Re-signing metadata
 +Queueing propagation
 +Restarting stopped services
 +The masthead and license have been updated.
 +</​cli>​
 +
 +=== Install latest console ===
 +
 +Download the 2 following files, transfert it to Windows in same folder and double click to install
 +<cli prompt='#'>​
 +[root@BIGFIX01 ~]# ll /​var/​opt/​BESInstallers/​Console/​
 +   68 -rw-r--r-- 1 root root    66284 Jun 10 14:27 actionsite.afxm
 +51164 -rwxr-xr-x 1 root root 52391536 Jun 10 14:27 setup.exe
 +</​cli>​
 +
 +==== Upgrade DB2 from 11.5.8.0 to 11.5.9.0 ====
 +
 +Precheck
 +<cli prompt='#'>​
 +[root@BIGFIX01 server_dec]#​ /​opt/​ibm/​db2/​V11.5/​adm/​db2licm -l
 +Product name:                     "​DB2 Standard Edition"​
 +License type:                     "​Virtual Processor Core"
 +Expiry date:                      "​Permanent"​
 +Product identifier: ​              "​db2std"​
 +Version information: ​             "​11.5"​
 +Max amount of memory (GB):        "​128"​
 +Max number of cores: ​             "​16"​
 +Enforcement policy: ​              "​Hard Stop"
 +Features:
 +IBM DB2 Performance Management Offering: ​             "Not licensed"​
 +
 +[db2inst1@BIGFIX01 ~]$ /​opt/​ibm/​db2/​V11.5/​bin/​db2level
 +DB21085I ​ This instance or install (instance name, where applicable:
 +"​db2inst1"​) uses "​64"​ bits and DB2 code release "​SQL11058"​ with level
 +identifier "​0609010F"​.
 +Informational tokens are "DB2 v11.5.8.0",​ "​s2209201700",​ "​DYN2209201700AMD64",​
 +and Fix Pack "​0"​.
 +Product is installed at "/​opt/​ibm/​db2/​V11.5"​.
 +</​cli>​
 +
 +Upgrade DB2 (untar the package 11.5.9, and update)
 +<cli prompt='#'>​
 +[root@BIGFIX01 install]# ll
 +      4 drwxr-xr-x ​ 3 root     ​root ​      4096 Oct 27  2023 server_dec
 +1912200 -rw-r--r-- ​ 1 root     root 1958088887 Jun 11 18:12 v11.5.9_linuxx64_server_dec.tar.gz
 +[root@BIGFIX01 install]# cd server_dec
 +[root@BIGFIX01 server_dec]#​ cd ..
 +[root@BIGFIX01 install]# pwd
 +/​backup/​install
 +[root@BIGFIX01 install]# cd server_dec/
 +
 +[root@BIGFIX01 server_dec]#​ ll
 +total 88
 + 4 drwxr-xr-x ​ 3 root root  4096 Oct 27  2023 .
 + 0 drwxrwxrwx. 7 root root   207 Jun 18 14:55 ..
 + 0 drwxr-xr-x ​ 6 root root   134 Oct 27  2023 db2
 + 8 -r--r--r-- ​ 1 root root  4987 Oct 27  2023 db2checkCOL_readme.txt
 +20 -r--r--r-- ​ 1 root root 16790 Oct 27  2023 db2checkCOL.tar.gz
 + 8 -r-xr-xr-x ​ 1 root root  5254 Oct 27  2023 db2ckupgrade
 + 8 -r-xr-xr-x ​ 1 root root  5207 Oct 27  2023 db2_deinstall
 + 8 -r-xr-xr-x ​ 1 root root  5077 Oct 27  2023 db2_install
 + 8 -r-xr-xr-x ​ 1 root root  5041 Oct 27  2023 db2ls
 + 8 -r-xr-xr-x ​ 1 root root  5059 Oct 27  2023 db2prereqcheck
 + 8 -r-xr-xr-x ​ 1 root root  5059 Oct 27  2023 db2setup
 + 8 -r-xr-xr-x ​ 1 root root  5095 Oct 27  2023 installFixPack
 +[root@BIGFIX01 server_dec]#​ ./​installFixPack
 +Read the license agreement file in the db2/license directory.
 +
 +***********************************************************
 +To accept those terms, enter "​yes"​. Otherwise, enter "​no"​ to cancel the install process. [yes/no]
 +yes
 +
 +Enter the full path of the base installation directory:
 +
 +-------------------------------------------------------
 +/​opt/​ibm/​db2/​V11.5
 +
 +Do you want to choose a different installation directory for the fix pack? [yes/no]
 +
 +------------------------------------------------------------------------------------
 +no
 +
 +DBI1017I ​ installFixPack is updating the database products installed in
 +      location /​opt/​ibm/​db2/​V11.5.
 +
 +
 +DB2 installation is being initialized.
 +
 + Total number of tasks to be performed: 56
 +Total estimated time for all tasks to be performed: 2759 second(s)
 +
 +Task #1 start
 +Description:​ Stopping DB2 Fault Monitor
 +Estimated time 10 second(s)
 +Task #1 end
 +
 +Task #2 start
 +...
 +Task #56 start
 +Description:​ Updating existing DB2 instances
 +Estimated time 60 second(s)
 +Task #56 end
 +
 +The execution completed with warnings.
 +
 +For more information see the DB2 installation log at
 +"/​tmp/​installFixPack.log.2005962"​.
 +</​cli>​
 +
 +Postcheck
 +<cli prompt='#'>​
 +[root@BIGFIX01 server_dec]#​ /​opt/​ibm/​db2/​V11.5/​adm/​db2licm -l
 +Product name:                     "​DB2 Standard Edition"​
 +License type:                     "​Virtual Processor Core"
 +Expiry date:                      "​Permanent"​
 +Product identifier: ​              "​db2std"​
 +Version information: ​             "​11.5"​
 +Max amount of memory (GB):        "128
 +
 +[db2inst1@BIGFIX01 ~]$ /​opt/​ibm/​db2/​V11.5/​bin/​db2level
 +DB21085I ​ This instance or install (instance name, where applicable:
 +"​db2inst1"​) uses "​64"​ bits and DB2 code release "​SQL11059"​ with level
 +identifier "​060A010F"​.
 +Informational tokens are "DB2 v11.5.9.0",​ "​s2310270807",​ "​DYN2310270807AMD64",​
 +and Fix Pack "​0"​.
 +Product is installed at "/​opt/​ibm/​db2/​V11.5"​.
 +
 +[root@BIGFIX01 server_dec]#​ /​opt/​ibm/​db2/​V11.5/​instance/​db2ilist -g db2inst1
 +#​name:​vrmf:​sqllibdir:​db2dir:​instancetype:​build
 +db2inst1:​11.5.9.0:/​home/​db2inst1/​sqllib:/​opt/​ibm/​db2/​V11.5:​ese:​s2310270807
 +
 +[root@BIGFIX01 server_dec]#​ /​opt/​ibm/​db2/​V11.5/​bin/​db2greg -dump
 +V,​DB2GPRF,​DB2SYSTEM,​BIGFIX01,/​opt/​ibm/​db2/​V11.5,​
 +I,​DB2,​11.5.9.0,​db2inst1,/​home/​db2inst1/​sqllib,,​1,​0,/​opt/​ibm/​db2/​V11.5,,​
 +S,​TSA,​4.1.1.1,/​opt/​IBM/​tsamp,​DG_NOT_ALLOWED,​DB2_INSTALLED,​0,​0,​-,​1718717222,​0
 +S,​RSCT,​3.3.1.2,/​usr/​sbin/​rsct,​DG_NOT_ALLOWED,​DB2_INSTALLED,​0,​0,​-,​1718717222,​0
 +S,​PCMK,​2.1.6.4,/​usr/​sbin,​DG_NOT_ALLOWED,​DB2_INSTALLED,​0,​0,​-,​1718717222,​0
 +S,​DB2,​11.5.9.0,/​opt/​ibm/​db2/​V11.5,,,​0,​0,,​1718717286,​0
 +</​cli>​
 +
 +Check Database version
 +<cli prompt='​$'>​
 +[db2inst1@BIGFIX01 ~]$  db2 list database directory
 +
 + ​System Database Directory
 +
 + ​Number of entries in the directory = 3
 +
 +Database 1 entry:
 +
 + ​Database alias                       = BESREPOR
 + ​Database name                        = BESREPOR
 + Local database directory ​            = /​home/​db2inst1
 + ​Database release level               = 15.00
 + ​Comment ​                             =
 + ​Directory entry type                 = Indirect
 + ​Catalog database partition number ​   = 0
 + ​Alternate server hostname ​           =
 + ​Alternate server port number ​        =
 +
 +Database 2 entry:
 +
 + ​Database alias                       = TEMADB
 + ​Database name                        = TEMADB
 + Local database directory ​            = /​home/​db2inst1
 + ​Database release level               = 15.00
 + ​Comment ​                             = ILMT database
 + ​Directory entry type                 = Indirect
 + ​Catalog database partition number ​   = 0
 + ​Alternate server hostname ​           =
 + ​Alternate server port number ​        =
 +
 +Database 3 entry:
 +
 + ​Database alias                       = BFENT
 + ​Database name                        = BFENT
 + Local database directory ​            = /​home/​db2inst1
 + ​Database release level               = 15.00
 + ​Comment ​                             =
 + ​Directory entry type                 = Indirect
 + ​Catalog database partition number ​   = 0
 + ​Alternate server hostname ​           =
 + ​Alternate server port number ​        =
 +
 +[db2inst1@BIGFIX01 ~]$ db2 connect to BESREPOR
 +
 +   ​Database Connection Information
 +
 + ​Database server ​       = DB2/​LINUXX8664 11.5.9.0
 + SQL authorization ID   = DB2INST1
 + Local database alias   = BESREPOR
 +
 +
 +[db2inst1@BIGFIX01 ~]$ db2 "​SELECT service_level,​ fixpack_num FROM TABLE(sysproc.env_get_inst_info()) as INSTANCEINFO"​
 +
 +SERVICE_LEVEL ​                                                                                                                   FIXPACK_NUM
 +-------------------------------------------------------------------------------------------------------------------------------- -----------
 +DB2 v11.5.9.0 ​                                                                                                                             0
 +
 +  1 record(s) selected.
 +</​cli>​
 +
 +===== Script to backup DB2 =====
 +
 +As root
 +<cli prompt='#'>​
 +[root@BIGFIX01 scripts]# cat bigfix_backup.sh
 +</​cli>​
 +<​code>​
 +#​!/​usr/​bin/​ksh
 +#​==================================================================================
 +#
 +# FILE:    bigfix_backup.ksh
 +#
 +# PURPOSE: Backup BigFix + ILMT Server
 +#
 +# AUTHOR:
 +#
 +# PARAMETERS:
 +#
 +# SAMPLES:
 +#
 +#​==================================================================================
 +# To check DB consistency
 +# [db2inst1@BIGFIX01 ~]$ /​opt/​ibm/​db2/​V11.5/​bin/​db2ckbkp -h /​backup/​TEMADB.0.db2inst1.DBPART000.20240618172214.001
 +# Image Verification Complete - successful.
 +
 +
 +
 +echo "​**********************************"​
 +echo "***** Stopping BigFix Server *****"
 +echo "​**********************************"​
 +date '​+%Y-%m-%d %H:​%M:​%S'​
 +/​etc/​init.d/​LMTserver stop
 +for svc in besclient.service beswebreports.service besgatherdb.service besfilldb.service besserver.service
 +do
 +  systemctl stop $svc
 +done
 +
 +echo "​**********************************"​
 +echo "***** Removing old backups ​  ​*****"​
 +echo "​**********************************"​
 +date '​+%Y-%m-%d %H:​%M:​%S'​
 +rm -f /​backup/​BFENT*
 +rm -f /​backup/​BESREPOR*
 +rm -f /​backup/​TEMADB*
 +echo "​**********************************"​
 +echo "***** Backup DB2 to disk     ​*****"​
 +echo "​**********************************"​
 +date '​+%Y-%m-%d %H:​%M:​%S'​
 +echo "​backup DB BFENT"
 +/​usr/​sbin/​runuser -l db2inst1 -c "db2 backup db BFENT to /​backup"​
 +echo "​backup DB BESREPOR"​
 +/​usr/​sbin/​runuser -l db2inst1 -c "db2 backup db BESREPOR to /​backup"​
 +echo "​backup DB TEMADB"​
 +/​usr/​sbin/​runuser -l db2inst1 -c "db2 backup db TEMADB to /​backup"​
 +
 +### If error
 +#​[root@BIGFIX01 backup]# /​usr/​sbin/​runuser -l db2inst1 -c "db2 backup db TEMADB to /​backup"​
 +#​SQL1035N ​ The operation failed because the specified database cannot be
 +#connected to in the mode requested. ​ SQLSTATE=57019
 +#db2 connect to DBXX
 +#db2 quiesce database immediate force connections
 +#db2 connect reset
 +#db2 terminate
 +#db2 deactivate database DBXX
 +#db2 terminate
 +#db2 "​backup database DBXX to /backup
 +
 +echo "​**********************************"​
 +echo "***** Backup to TSM          *****"
 +echo "​**********************************"​
 +date '​+%Y-%m-%d %H:​%M:​%S'​
 +# Here you can add backup to external source
 +echo "​**********************************"​
 +echo "***** Startting BigFix Server ****"
 +echo "​**********************************"​
 +date '​+%Y-%m-%d %H:​%M:​%S'​
 +for svc in besfilldb.service besgatherdb.service besserver.service beswebreports.service besclient.service
 +do
 +  systemctl start $svc
 +done
 +/​etc/​init.d/​LMTserver start
 +
 +date '​+%Y-%m-%d %H:​%M:​%S'​
 +</​code>​
  
deploy/ibm_ilmt_upgrade.1718720629.txt.gz · Last modified: 2024/06/18 16:23 by manu