|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
failing to make MQSERVER var value permanent on linux box |
« View previous topic :: View next topic » |
Author |
Message
|
raj429 |
Posted: Sat Mar 26, 2011 11:09 pm Post subject: failing to make MQSERVER var value permanent on linux box |
|
|
Acolyte
Joined: 04 Jul 2009 Posts: 53
|
HI,
I want to add MQSERVER environment variable value in my linux permanently(like XX-->environment variables-->user variables in windows).
Eachtime, I tried to edit .bash_profile, .bashrc, .profile , /etc/profile with below 2 lines
MQSERVER=XYX/TCP/XYY
export MQSERVER
And restarted the system every time I have changed in the above file.
but nothing i can see after issuing "echo $MQSERVER" in linux terminal.
am i missing anything or is there any way to make MQSERVER value applied to all the terminal instances. |
|
Back to top |
|
 |
zpat |
Posted: Sat Mar 26, 2011 11:32 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Using a CCDT is a better approach. However try
export MQSERVER=XYX/TCP/XYY |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Mar 27, 2011 6:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You should not need to restart the server. Logging out and logging back in should be enough. Beware however of the many different shells. It would be probably easier to set the variable in it's own file say in /etc/profile and then source it in each of the different shell profiles. So if you need to change it there is only one place you need to change it in.
PS if you don't know what sourcing an environment variable means, google it.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
gbaddeley |
Posted: Sun Mar 27, 2011 3:04 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Quote: |
I want to add MQSERVER environment variable value in my linux permanently(like XX-->environment variables-->user variables in windows).
Eachtime, I tried to edit .bash_profile, .bashrc, .profile , /etc/profile with below 2 lines
MQSERVER=XYX/TCP/XYY
export MQSERVER
And restarted the system every time I have changed in the above file. |
You need to know which shell your userid logs on as, and then edit the appropriate logon profile file. The commands you need to run to set and export an environment variable can vary between shells.
Your logon shell is identified in your entry in /etc/passwd
eg. for ksh (Korn Shell), the logon profile is ".profile" and you add
export MQSERVER=XYX/TCP/XYY
if you need to add a port number, the value will need to be in double quotes
export MQSERVER="XYX/TCP/XYY(1415)"
HTH _________________ Glenn |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|