8 Replies Latest reply: Oct 25, 2012 12:43 PM by orafad RSS

    What to set in ORACLE_BASE and ORACLE_HOME values ?

    576227
      Hello,

      I installed the Oracle 10g Express Edition on my Linux box with the archive file oracle-xe_10.2.0.1-1.1_i386.deb

      The install went fine.

      Then I installed the instantclient in /home/stephane/programs/oracle/instantclient_10_2 and can load it fine in my Apache PHP server.

      I set the following values in the .bashrc file:

      export ORACLE_BASE=/home/stephane/programs/oracle
      export ORACLE_HOME=/home/stephane/programs/oracle
      PATH=$PATH:$ORACLE_HOME/bin

      But my Apache PHP server shows these values:
      ORACLE_BASE /home/stephane/oracle
      ORACLE_HOME /home/stephane/install/oracle

      I wonder what to set in these values in my .bashrc file.
        • 1. Re: What to set in ORACLE_BASE and ORACLE_HOME values ?
          576227
          I think I'm wrong when specifying the client for the ORACLE_HOME.. I guess it should be the server side.
          • 2. Re: What to set in ORACLE_BASE and ORACLE_HOME values ?
            576227
            I found out about the /etc/oratab file that is listing the databases of the server.

            I contains this:

            XE:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server:N

            I suppose this means there is one database called XE and it is not started when the Oracle server starts.

            I therefore specified the following values in my .bashrc file:

            export ORACLE_BASE=/usr/lib/oracle/xe/app/oracle/
            export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/server
            PATH=$PATH:$ORACLE_HOME/bin
            export LD_LIBRARY_PATH=/home/stephane/programs/oracle/instantclient_10_2/
            export ORACLE_SID=X
            • 3. Re: What to set in ORACLE_BASE and ORACLE_HOME values ?
              576227
              I can see there is no listener being active

              /etc/init.d/oracle-xe status

              LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-OCT-2012 02:34:38

              Copyright (c) 1991, 2005, Oracle. All rights reserved.

              Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))

              TNS-12541: TNS:no listener
              TNS-12560: TNS:protocol adapter error
              TNS-00511: No listener
              Linux Error: 111: Connection refused
              Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=stephane-ThinkPad-X61s)(PORT=1521)))
              TNS-12541: TNS:no listener
              TNS-12560: TNS:protocol adapter error
              TNS-00511: No listener
              Linux Error: 111: Connection refused
              • 4. Re: What to set in ORACLE_BASE and ORACLE_HOME values ?
                576227
                And so I tried to start a listener.

                root@stephane-ThinkPad-X61s:/home/stephane# lsnrctl start

                LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-OCT-2012 02:40:33

                Copyright (c) 1991, 2005, Oracle. All rights reserved.

                Starting /usr/lib/oracle/xe/app/oracle//product/10.2.0/server/bin/tnslsnr: please wait...

                TNSLSNR for Linux: Version 10.2.0.1.0 - Production
                NL-00280: error creating log stream /usr/lib/oracle/xe/app/oracle//product/10.2.0/server/network/log/listener.log
                NL-00278: cannot open log file
                SNL-00016: snlfohd: error opening file
                Linux Error: 13: Permission denied

                Listener failed to start. See the error message(s) above...

                But it didn't really want to start,
                • 5. Re: What to set in ORACLE_BASE and ORACLE_HOME values ?
                  576227
                  I can see the file

                  root@stephane-ThinkPad-X61s:/home/stephane# ll /usr/lib/oracle/xe/app/oracle//product/10.2.0/server/network/log/listener.log
                  -rw-r--r-- 1 oracle dba 8836 Oct 24 21:09 /usr/lib/oracle/xe/app/oracle//product/10.2.0/server/network/log/listener.log

                  is being owned by the oracle user.

                  I had no idea such a user had been created :-)

                  Maybe I need to start the Oracle server not as root but as oracle ?
                  • 6. Re: What to set in ORACLE_BASE and ORACLE_HOME values ?
                    576227
                    With the command

                    /etc/init.d/oracle-xe force-reload

                    I was able to start the listener.

                    And I can now access the server admin panel at http://127.0.0.1:8080/apex

                    Maybe it is related to the hostname or hosts file...
                    • 7. Re: What to set in ORACLE_BASE and ORACLE_HOME values ?
                      576227
                      In fact it was related to the value of ORACLE_DBENABLED set to false in the /etc/default/oracle-xe file.

                      Simply changing the value to true and restarting the server, started the listener.
                      • 8. Re: What to set in ORACLE_BASE and ORACLE_HOME values ?
                        orafad
                        Welcome to the forums!

                        Thanks for posting what you did to resolve the issue. Please mark thread as answered to "close" it off now that you've found a solution.