- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Chapter III - User's environments and /etc/profile
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 09:48 PM
тАО02-23-2010 09:48 PM
I'd like to find out some details about environments, how to create them correctly and how to edit profile file.
1. to set temporary (for current session) environment. I needed to environment for ORACLE_HOME and ORACLE_SID.
i did:
# cd /u01/app/oracle/product/10.2.0/db_1/bin
# PATH=$PATH:.
# export PATH
# .oraenv
after this i could run oracle commands. When i changed user and came back, i couldnt do
$echo $PATH
PATH: .
in my 2nd server:
$echo $PATH returns
/usr/bin:/usr/sbin:/sbin
so, how could i have normal PATH value? in both of them i must have PATH for OS commands and ORACLE env.
Should i run PATH=PATH:/usr/bin:/usr/sbin:/sbin:/u01/app/oracle/product/10.2.0/db_1/bin or ? I know how to set one PATH(env), such as:
# cd /u01/app/oracle/product/10.2.0/db_1/bin
# PATH=$PATH:.
# export PATH
but i need to set whole environments with 1-2 command, i'd like to find out syntax of 'set environments'
2. First mark was to set temporary environments and syntax. Better to check and know what is running right now. But for the future i'd like to know - how to edit /etc/profile and ~/.profile, coz dont wanna always
set environments after relogin\restart\shutdown and so on. I checked /etc/profile and a bit difficult to find where to put environments..? + i couldnt find .profile in my home directory.
Regards,
Rustam
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 10:04 PM
тАО02-23-2010 10:04 PM
Re: Chapter III - User's environments and /etc/profile
PATH=$PATH:.
to
PATH=$PATH:/u01/app/oracle/product/10.2.0/db_1/bin
and then try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 10:09 PM
тАО02-23-2010 10:09 PM
Re: Chapter III - User's environments and /etc/profile
i think if you like to run some commands you need to set the variables for the shell, i always use only a dedicated user for oracle administration, so only this user need to set up this shell variables. of course if you have only one instance on the oracle you could set this variables as a global variable in /etc/profile.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 10:44 PM
тАО02-23-2010 10:44 PM
Re: Chapter III - User's environments and /etc/profile
>so, how could i have normal PATH value?
You could do a:
source /etc/profile
That would restore the PATH to a "normal" value...
>i'd like to know - how to edit /etc/profile
You do not need to edit /etc/profile in order to alter PATH value. Change the file /etc/PATH .
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 12:43 AM
тАО02-24-2010 12:43 AM
Re: Chapter III - User's environments and /etc/profile
To source a file in a real shell you use:
. /etc/profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:02 AM
тАО02-24-2010 01:02 AM
Re: Chapter III - User's environments and /etc/profile
# cd /u01/app/oracle/product/10.2.0/db_1/bin
# PATH=$PATH:.
# export PATH
# .oraenv
then it were possible to run them. But know i cant run OS commands, coz in PATH=PATH: .
on 2nd server i didn't run any command yet, there PATH=/usr/bin:/usr/sbin:/sbin
So how can i have set
PATH=/usr/bin:/usr/sbin:/sbin:/u01/app/oracle/product/10.2.0/db_1/bin
through the CLI?
+ 2nd way, should i add these parameters in /etc/profile or /etc/path ?
i have special user for oracle DBA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:16 AM
тАО02-24-2010 01:16 AM
Re: Chapter III - User's environments and /etc/profile
PATH=/usr/bin:/usr/sbin:/sbin:/u01/app/oracle/product/10.2.0/db_1/bin
You type that exact line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:20 AM
тАО02-24-2010 01:20 AM
Re: Chapter III - User's environments and /etc/profile
$PATH=PATH:/usr/bin:/usr/sbin:/sbin:/u01/app/oracle/product/10.2.0/db_1/bin
$export PATH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:23 AM
тАО02-24-2010 01:23 AM
Re: Chapter III - User's environments and /etc/profile
It is the other way:
PATH=$PATH:...
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:53 AM
тАО02-24-2010 01:53 AM
Re: Chapter III - User's environments and /etc/profile
It depends on how many user's want this in their path vs how many don't.
Special users should add it to their own ~/.profile.