To setup environment variables in Linux like sqlplus, emctl etc

Hi,
how can setup environment variable like sqlplus, emctl, etc in Linux.
what i mean is from any directory i should be able to invoke sqplus, emctl etc
is this posisble in linux.
THanks,
Philip.

Hi Hunter,
this one worked great. this is really cool man.
i also have a http server running for my htmldb forms/reports.
i created a environment variable saying
"HTTP_HOME=/home/oracle/oracle/product/10.2.0/http_1"
i need to go to $HTTP_HOME/Apaceh/Apache/bin"
and i give the command "./apachetcl start" for the http server to start running.
how can i make this apachectl variable to work so that form any directoy i should be able to give "apachectl start" comand and it runs.
Can u help me please.
i think if i do this also i can get some more understanding.
the command u gave worked great, but i did not understand the
LD_LIBRARY_PATH and CLASSPATH. what are they for.
Philip.

Similar Messages

  • Installed jre and jdk and setup environment  variable

    installed jre and jdk and setup environment variable but still i am not able to rum program?
    cannot find symbol class string
    package system does not exist

    if removing 1 jre will help your disk space problems
    then you urgently need a bigger disk.
    Btw i never notice Java installing 2 different JRE's
    so i dont think it will harm remvong one, make sure
    you dont delete one you are using :)I assume that you don't run MS os; that's the only one that installs 2 JRE's.
    To OP: This has been discussed by Sun, but no changes have been announced. Maybe the relocation in version 1.5 of the private (aka developer) code to the Program Folder is a start of this change?

  • Setting new environment variable on Linux

    {noformat}I need to set new environment variable on my linux machine from inside my code. I am using csh and the command works fine from command line:
    setenv IFConfigLocation4 /home/username/myfile.xml
    But when i try the same thing from Java code it does not seem to have any effect. here is my code:
    import java.util.*;
    import java.io.*;
    public class CDE_parser_methods{
    public static String fileParse(String inFile, String parserName, String outFile, String CMConfig_locale)
    String parsed = "SUCCESSFUL";
    System.out.println("Parsing file..." + "\nParser name: " + parserName +"\nInput file name: " + inFile + "\nOutput file name: " + outFile + "\nCMConfig file is: " + CMConfig_locale);
    System.out.println("Current Java version: " + System.getProperty("java.version"));
    try
              String cmd[]={"/bin/csh", "-c", "setenv IFConfigLocation4 " + CMConfig_locale};
              Process proc = Runtime.getRuntime().exec(cmd);
              int exitVal= proc.waitFor();
              System.out.println("Value of setenv command is: " + exitVal);
              String cmd2[]={"/bin/csh", "-c", "env"};
              Process proc2 = Runtime.getRuntime().exec(cmd2);
              InputStream instr = proc2.getInputStream();
              InputStreamReader inread = new InputStreamReader(instr);
              BufferedReader buf = new BufferedReader(inread);
              String line=null;
              while((line=buf.readLine()) != null)
                   System.out.println(line);
              int exitVal2= proc2.waitFor();
              }catch(CMException cme){
                   System.out.println("Issue when trying to executing parse command, details: " + cme.getMessage());
                   System.out.println("Description of the issue is: " + cme.getDescription());
                   parsed = "FAILURE: " + cme.getDescription();
              }catch(Exception e){
                   System.out.println("Uncought exception, details: " + e.getMessage());
                   parsed = "FAILURE: " + e.getMessage();
         return parsed;
    public static void main(String[] args) {
         String results=CDE_parser_methods.fileParse("/opt/itemfield/ServiceDB/Project2/Mapping_for_Account_Number_Structure_ITS_Input_File.xls","MappingforAccountNumberStructure","/opt/itemfield/ServiceDB/Project2/test_ws_44.xml","/home/rvenishe/CMConfig.xml");
         System.out.println("Result of fileParse call is: " + results);
         }The out put of my env command does NOT contain system variable "IFConfigLocation4". Any ideas? {noformat}

    Environment variables and their values set from within a user process has their scope and lifetime limited to the process and its subprocesses. See java.lang.ProcessBuilder class and its API documentation for setting env for a subprocess that will be started by a ProcessBuilder instance. Even in the C programming we have the same limitation for the environment.
    Since they are not globally set, system command like env or Java method like System.getenv() can't see them.

  • How to setup ENVIRONMENT VARIABLES in WIN2K installation?

    Hi experts,
    I am trying to install nw04s on wink2 server, I want to know what environment variables do I need to setup?
    Also, Export cd's, there are 8 cd's, one of them exe, else are different. How would I make it working.I know in linux how to make it working not in windows
    Thanks,

    hi,
    In win2k you need to set the " system and user variable " for java
    right click on my computer->advanced->environment variables
    1>   name:   JAVA_HOME  ( this must be in capital)
         value:  c:\j2sdk1.4.2_11
    2> edit the "path"
    and ;c:\j2sdk1.4.2_11\bin
    then save.
    after this check this through
    cmd
    give the command "java -version"

  • Oracle Environment Variables on Linux

    Hi,
    First, I'll admit that I'm very, very new to Linux.  I'm running Oracle Database XE 11g R2 on a virtual machine (Virtualbox) that is running Oracle Enterprise Linux 6.  Whenever I open a terminal window and set ORACLE_HOME, PATH, and ORACLE_SID, I can easily access SQLPlus, simply by typing "SQLPlus".  However, if I close that window and then open another terminal window, I cannot access SQLPlus, simply by typing "SQLPlus".  I have to re-specify the environment variables first.
    I'm sure that this is something simple but my lack of Linux experience is keeping me from finding the issue.  Also, I've not found any documentation that helps but please point me to it if I've missed it.
    Thanks,
    Brian

    You can also set your environment by using a shell script that comes with the XE default installation:
    # source /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    There's also a backup script.
    # /u01/app/oracle/product/11.2.0/xe/config/scripts/backup.sh
    assuming that you've installed the XE instance in the default path /u01
    C.

  • Environment Variables for Linux

    Hi All
    I am trying to set the Environement Variables on RHEL 5.2(64 Bit) for SM 7.0 Installation
    - I have installed the RPM "IBMJava2-AMD64-142-SDK-1.4.2-11.0.x86_64.rpm"
    - I have set the Environment Variable in .bash_profile file as below:
    export JAVA_HOME=/opt/IBMJava2-amd64-142
    expot PATH=$JAVA_HOME/bin:$PATH
    Logged out of root and logged in, but I am not able to see the correct JAVA -Version
    Its still showing the GNU version.
    Can you please let me know that was correct ?
    Thanks
    Sri

    You can simply use those commands in the shell that is open and in which you want to start the installation. There's no need to make this permanent for user "root".
    Sapinst will configure the new users correctly with the correct PATH.
    Markus

  • Oracle Application Server Environment Variables for Linux

    Hello All,
    I have installed Oracle As (infratructure & middlie tire) on same box.
    10g Release 2 (10.1.2)
    Now I need to do post installation steps as below.
    ORACLE_HOME
    1) How to set to the full path of the installation's Oracle home?
    2) Do I need to also set ORACLE_HOME for middle tier?
    ORACLE_SID
    (Infrastructure installations only)
    3) How to set the OracleAS Metadata Repository SID supplied during installation?
    cheers,
    DN

    Hello,
    I have installed Oracle AS Infrastructure (10.1.2) and BI & Forms on our Linux box.
    Now I am doing some post installtion steps .
    Per Oracle® Application Server Quick Administration Guide 10g Release 2 (10.1.2) B14126-02
    \http://download-west.oracle.com/docs/cd/B14099_10/core.1012/b14126/toc.htm
    **Set to the full path of the installation's Oracle home
    ORACLE_HOME=/opt/oracle/infra; export ORACLE_HOME
    ** Set to the OracleAS Metadata Repository SID you supplied during installation.
    ORACLE_SID=orcl; export ORACLE_SID
    Is it the correct way to setup ORACLE_HOME & ORACLE_SID?
    Actually I have setup as above on Last thursday. (09-15-05)
    But when I have checked today (09-19-05) as
    echo $ORACLE_HOME
    I got nothing.same with SID, now I need to set again.
    DN

  • Environment Variables for EBS 12.1

    Hello,
    I'm trying to install the Oracle EBS 12 into my machine and i'm wondering if i need to setup environment variables in the bash_profile. If i should configure this, please tell me what are those.
    Thanks
    AJ

    Hi Aj,
    You do not have to setup any environment variables, But you have to make sue you follow all the pre-requisites befor installing R12
    Depending on you operating system please see
    761566.1 - Oracle E-Business Suite Installation and Upgrade Notes Release 12 (12.1.1) for Linux x86-64
    761564.1 - Oracle E-Business Suite Installation and Upgrade Notes Release 12 (12.1.1) for Linux x86
    Thanks

  • Environment variables of Winnt winxp

    I wanna set Environment variables of Winnt or winxp thro' Java

    Actually, if you can get access to the registry, you can view/set the user's environment variables at
    HKEY_CURRENT_USER\Environment
    and the system environment variables at
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Evironment
    Note that this is specific to Windows NT 4.0, there's no guarantee that they will be in the same location on other flavours of Windows. Note further that this will certainly work only on Windows machines... there is (AFAIK) no standard way to set environment variables for Linux, BSD or Solaris systems.
    For the particularly brave (or stupid, or both :-), there is a beta(/alpha) registry interface for Java
    http://www.algorekiss.com/wsnE682.html

  • Dsee 6.0 environment variables

    DS 6.0 - The documentation says to create environment variables so you don't have to specify options on the command line.
    We have environment variables:
    DIRSERV_PORT=13902
    LDAP_ADMIN_PWF=/opt/ldap/admin.pwf
    When I try to use dsconf get-server-prop, I get errors:
    [ldap@server] /opt/ldap $ echo $DIRSERV_PORT
    13902
    [ldap@server] /opt/ldap $ dsconf get-server-prop
    Unable to bind securely on "localhost:389".
    The "get-server-prop" operation failed on "localhost:389".
    Shouldn't dsconf use the $DIRSERV_PORT environment variable?
    It seems like it would just defeat the purpose if you had to specify -p $DIRSERV_PORT each time.
    Same thing with the $LDAP_ADMIN_PWF environment variable. Seems like they are not being used at all, even though we have set it:
    [ldap@server] /opt/ldap $ echo $LDAP_ADMIN_PWF
    /opt/ldap/admin.pwf
    [ldap@server] /opt/ldap $ dsconf get-server-prop -p 13902
    Enter "cn=Directory Manager" password:

    You may not have exported the env variables. If you're on sh/bash, try "export DIRSERV_PORT", then dsconf again.

  • Best practices for defining Environment Variables/User Accounts in Linux

    Hello,
    After reading throught the Quick Install guide for 10gR2 on x86_64 Linux, I see that it is not recommended to define ANY variables in .bash_profile.
    I'm hoping to get a Best practices approach for defining environment variables - right now we use the oracle linux account for administration including sql*plus. So, where should the myriad variables be defined? Is it important enough to create a user account in linux to support best practices?
    What variables, exactly, should be defined? It seems that LD_LIBRARY_PATH is no longer being used?
    Thanks in advance
    Doug

    Something that I've done for years on unix/linux boxes is to create a seperate environment variable setup file for each instance on the box. This would include things like ORACLE_HOME, ORACLE_SID, etc. Then I would create an alias in my .bash_profile that would execute this script. As an example, I would create a orcl.env file that would hold all of the environment variables for this instance. Then in my .bash_profile I would create a line like the following:
    alias orcl=". $HOME/orcl.env"
    Then from anywhere you could type orcl and you would set your environment to connect to that database.
    Also, if you are using 10g, something else that is really nice if you are using sqlplus, and you connect to different databases without starting a new sqlplus session is to set a parameter in your $ORACLE_HOME/sqlplus/admin/glogin.sql file:
    set sqlprompt "_user 'at' _connect_identifier >"
    This will automatically change your command prompt to look like this:
    RALPH at ORCL >
    if you connect as GEORGE, your prompt will immediately change to :
    GEORGE at ORCL >
    This way you can always know who and where you are connected to.
    Good luck!

  • Novell Linux Client, -E/--passenv environment variable?

    Hi!
    I've been experimenting with the Novell Client for Linux v1.2 on
    SLED10. I have most of it working as intended.
    Now I'd like to integrate with some scripts to do automatic logins. I
    notice that in the help message (from 'nwlogin --help'), this
    information is present:
    -E, --passenv
    pass password via environment variable
    The same (almost, it only lists --passenv, not -E) goes for gnwlogin.
    This looks like a very useful feature for script integration, but
    unfortunately, I can't find any documentation on which environment
    variable to use. The -E/--passenv parameter is also missing from the
    nwlogin(1) manual page.
    What environment variable should be used? Is this feature official, so
    that I can rely on it being present in later versions of the client?
    Thanks,
    \EF
    Erik Forsberg OpenSource-based Thin Client Technology
    Systems Analyst/Developer Phone: +46-13-21 46 00
    Cendio AB Web: http://www.cendio.com

    Erik,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp
    - Check all of the other support tools and options available at
    http://support.novell.com.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://support.novell.com/forums)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://support.novell.com/forums/faq_general.html
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Setting widows environment variable like "path "

    I want to set a new value for windows environment variable path. Is there any way to set change the varibale.

    You could also use ORA_FFI package to call Windows API function SetEnvironmentVariable. There is an example below.
    See also:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/setenvironmentvariable.asp
    kernel_lhandle Ora_Ffi.Libhandletype;
    GetEnvironmentVariable_fhandle Ora_Ffi.Funchandletype;
    SetEnvironmentVariable_fhandle Ora_Ffi.Funchandletype;
    FUNCTION ff_GetEnvironmentVariable(
    fhandle Ora_Ffi.funchandletype,
    lpName varchar2,     -- address of environment variable name
    lpBuffer varchar2,     -- address of buffer for variable value
    nSize      pls_integer -- size of buffer, in characters
    ) RETURN pls_integer;
    PRAGMA interface( C, ff_GetEnvironmentVariable, 11265 );
    FUNCTION ff_SetEnvironmentVariable(
    fhandle Ora_Ffi.funchandletype,
    lpName varchar2,     -- address of environment variable name
    lpValue varchar2     -- address of variable value
    ) RETURN pls_integer;
    PRAGMA interface( C, ff_SetEnvironmentVariable, 11265 );
    function SetEnvironmentVariable(lpName varchar2, lpValue varchar2) return pls_integer IS
    BEGIN
    return ff_SetEnvironmentVariable( SetEnvironmentVariable_fhandle, lpName, lpValue );
    END;
    function GetEnvironmentVariable(
    lpName varchar2
    ) return varchar2 as
    lpBuffer char(2000);     -- address of buffer for variable value
    nSize      pls_integer; -- size of buffer, in characters
    res pls_integer;
    begin
    lpBuffer:='*';
    nSize:=2000-1;
    res:=ff_GetEnvironmentVariable(
    GetEnvironmentVariable_fhandle,
    lpName,
    lpBuffer,
    nSize );
    if res>0 then
    return substr( lpBuffer, 1, res );
    else
    return null;
    end if;
    end;
    -- Initialization
    /* Load the library */
    kernel_lhandle:=Ora_Ffi.Load_library
    ( '', 'kernel32.dll' );
    /* GetEnvironmentVariable */
    GetEnvironmentVariable_fhandle:=Ora_Ffi.Register_Function
    ( kernel_lhandle, 'GetEnvironmentVariableA', Ora_Ffi.C_Std );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    Ora_Ffi.Register_Return
    ( GetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    /* SetEnvironmentVariable */
    SetEnvironmentVariable_fhandle:=Ora_Ffi.Register_Function
    ( kernel_lhandle, 'SetEnvironmentVariableA', Ora_Ffi.C_Std );
    Ora_Ffi.Register_Parameter
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Parameter
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_CHAR_PTR );
    Ora_Ffi.Register_Return
    ( SetEnvironmentVariable_fhandle, Ora_Ffi.C_INT );
    To change the variable PATH you could use something like the following code:
    s:=dll_path||';'||WIN32.GetEnvironmentVariable( 'PATH' );
    res:=WIN32.SetEnvironmentVariable( 'PATH', s );

  • Setup JAVA_HOME n CATALINA_HOME environment variable

    Hi there
    im new in Java Servlet programming... im confused how to setup JAVA_HOME n CATALINA_HOME environment variable... if any1 of u know this plz help me to how to setup it... it will help me very much.
    thanks in advance
    112

    Once you have identified the JDK install path:
    1. Right click on the My Computer icon on your desktop and select properties
    2. Click the Advanced Tab
    3. Click the Environment Variables button
    4. Click New
    5. Enter the variable name as JAVA_HOME
    6. Enter the variable value as the install path for the Java Development Kit.
    7. OK
    Next you have set an environment variable CATALINA_HOME that contains the pathname to the directory in which Tomcat 5 has been installed, the same way you set the JAVA_HOME ev.

  • The NLS_LANG environment variable for Form Builder 10g on Linux

    Hi,
    I have installed Oracle Developer Suite 10g on Linux Enterprise AS4 successfully,and set environment variable NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK",LANG="zh_CN.UTF-8".When i executed the following: /home/oracle/Orant/bin/frmbld
    I got the error as:
    X Error of failed request:BadFont(invalid Fond parameter)
    Major opcode of failed request:56(X_ChangeGC)
    Resource id in failed request:Ox2c000af
    Serial number of failed request:3376
    Current serial number in output stream 3517
    FRM-18122: ’Form Builder Debugger.
    If i delete the NLS_LANG environment variable,the Form Builder can be running,but i can't keyboard input[b] chinese characters in the PL/SQL Editor.
    I don't know how to solve the problem,anybody can help me?

    Hello Howard,
    Check out the following link here you can find your desired NLS parameters.
    http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
    And about the NLS_LANG for developer why you want to create for developer. Its is already there in REGISTRY. Just seaching in developer registry you can find there.
    how do I set more than 1 at a time.
    You can set only one NLS_LANG parameter at a time.
    -Ammad
    Edited by: Ammad Ahmed on Apr 15, 2010 8:52 PM

Maybe you are looking for