Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change TMR SERVER NAME

Status
Not open for further replies.

larditti

IS-IT--Management
Oct 5, 2004
11
FR
Hi
i need to know what is the process when you changed TMR hostname
tks
my os is sun 9.0 oracle 10g and
tivoli tcm 4.2.3 full update
tmf 4.1.1 full update

laurent
 
It's been a while, but I'm pretty sure you use the wtmrname command with the -S (yes, that's a capital S) option.

Is this a new install, or has it been around for a while?
 
hi
thanks for your thread.
It's not a new install.
we've made mirror and rename tmr server and all components.
(i don't use wtmrname -S but i try it tommorrow)
i give you the process (first release for a script).
i'm script beginner.
Do you know how to change policy region name in command line.

sorry for my english (i'm french).


#!/bin/sh

#Tivoli environment
. /etv/Tivoli/setup_env.sh
val=`wlookup -ar ManagedNode -a -L`
pr=$1
site=$2
chem=/etc/Tivoli/
chem1=/etc/init.d
chem2=/etc/
chem3=/opt/Tivoli/
### change gateway name ####

echo "Change Gateway Name"
oid=`wlookup -r Gateway $val-gw -o`
idlcall $oid _get_label
idlcall $oid _set_label '"$1"'
echo "end"

#change managed node name
echo "Change Managed Node Name"
wlookup -ar ManagedNode
MNoid=`wlookup -r ManagedNode $val`
idlcall $MNoid _set_label '"$1"'
echo "end "

#add hostename
echo "Add hostName"
odadmin odlist add_hostname_alias 1 10.163.186.193 $1
echo "end"
#delete hostname
echo "Delete old hostname""
odadmin odlist delete_hostname_alias 1 10.163.186.193 $val
echo "end"

# Change old name in new name in all file and folder

echo "Change old name in /etc/Tivoli/"
grep -i $val /etc/Tivoli/* |awk -F: '{print $1;}'|uniq > /var/tmp/liste_to_sed
for i in `cat /var/tmp/liste_to_sed` ;
do sed -e 's/$val/$1/g' $i>${i}_tmp; mv ${i}_tmp $i ;
done

echo "change old name in /opt/Tivoli/db/$val.db/.installed/ "
grep -i $val /opt/Tivoli/db/$val.db/.installed/* |awk -F: '{print $1;}'|uniq > /var/tmp/liste_to_sed1
for i in `cat /var/tmp/liste_to_sed1` ;
do sed -e 's/$1/g' $i>${i}_tmp; mv ${i}_tmp $i ;
done

echo "Change old name in etc/init.d"
grep -i $val /etc/init.d/* |awk -F: '{print $1;}'|uniq > /var/tmp/liste_to_sed2
for i in `cat /var/tmp/liste_to_sed2` ;
do sed -e 's/$1/g' $i>${i}_tmp; mv ${i}_tmp $i ;
done


# change wb WB to WI wi in hosts file and wisp_after_install_policy
"change old name into after install policy "
echo "Change old name in Policy script and put new policy into tmr"
grep -i wb /opt/Tivoli/Scripts/Policy/* |awk -F: '{print $1;}'|uniq > /var/tmp/liste_to_sed3
for i in `cat var/tmp/liste_to_sed3` ;
do sed -e 's/wb/$2/g' $i>${i}_tmp; mv ${i}_tmp $i ;
done
wput after_install_policy </opt/Tivoli/Scripts/Policy/after_install_policy.sh
grep -i $val /etc/* > /var/tmp/liste_to_sed4
for i in `cat /var/tmp/liste_to_sed4` ;
do sed -e 's/wb/$2/g' $i>${i}_tmp; mv ${i}_tmp $i ;
done
# change db name and archive this
tar cf $chem3/db/$val.db
mv $chem3/db/$val.db $chem3/db/$1.db

thks laurent
 
hi
thanks for all
just one thing

on unix when you use wtmrname -s you must verify owner for tmp folder.This command change right to tmp for group other .
it canceled write right .

laurent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top