6 Replies Latest reply: Jan 22, 2012 11:33 AM by clcarter RSS

    Oracle 10G on fedora 15

    912321
      Hi all,
      I want to install oracle 10G(10.2) Database express on fedora 15.
      I followed all the prescribed steps but still unable to get it done.That's why I had to post the question.
      I am writing all the commands that i used and also the errors so that you all may correct me.


      After increasing the swap size of my linux system to prescribed 1GB,I installed oracle 10G in my system.
      The swap files status is correctly shown using the swapon command,so this does not seems to be an issue.
      But the real problem starts when I try to start the listener.....

      The classpath settings in my /etc/profile is as follows:

      export ORACLE_HOME="/usr/lib/oracle/xe/app/oracle/product/10.2.0/server"

      export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/jdk/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus:/usr/lib/oracle

      export ORACLE_SID="XE"

      export NLS_LANG="AMERICAN_AMERICA.US7ASCII"

      export LD_LIBRARY_PATH="ORACLE_HOME/lib:$LD_LIBRARY_PATH"

      export SQLPATH="$ORACLE_HOME/sqlplus/admin"

      -------------------
      Now where am i wrong in these settings,if i am?

      The listener.ora file is


      SID_LIST_LISTENER =
      (SID_LIST =
      (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
      (PROGRAM = extproc)
      )
      )

      LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      # (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) //I have commented this line//
      (ADDRESS = (PROTOCOL = TCP)(HOST = shekhar)(PORT = 1521))
      )
      )

      DEFAULT_SERVICE_LISTENER = (XE)



      -----------------------------------------------------
      Now ,the series of error appears when i try to login from sqlplus

      ERROR:
      ORA-01034: ORACLE not available
      ORA-27101: shared memory realm does not exist
      Linux Error: 2: No such file or directory


      also,I am unable to open the home page for my login on my browser.

      --------------------------------------------------------------------------------
      Starting the listener,by command lsnrctl start,i get following error

      Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=shekhar)(PORT=1521)))
      TNS-12535: TNS:operation timed out
      TNS-12560: TNS:protocol adapter error
      TNS-00505: Operation timed out
      Linux Error: 110: Connection timed out


      I also get 'resource already in use' error sometimes.That is to say,I never have my listener started.Do I have to make any changes in my listener.ora file?

      ----------------------------------------------------------------------


      That's all I have to mention.
      I request you all to please help me out of this problem.Any help will be really appreciated.
      Waiting for your reply.

      Thanks.....................................................
        • 1. Re: Oracle 10G on fedora 15
          clcarter
          Verify the hostname and IP address, that they resolve both ways (hostname and IP), also check netstat to ensure nothing else has the 1521 port in use. The HOST= listener entry ought to be the FQDN, it could be the IP, or when in doubt (i.e. if the host uses DHCP) the "any IP" address of 0.0.0.0 can also work. For the "easy" way out.
          $ hostname
          ...
          $ nslookup -sil <hostname>
          ... -> n.n.n.n 
          $ nslookup -sil <n.n.n.n>
          ... -> <hostname>
          $ cat /etc/hosts
          ...
          127.0.0.1 localhost.localdomain localhost
          ...
          n.n.n.n <hostname>.<domainname> <hostname>
          $ netstat -an |egrep 1521
          # if there is a:
          ... tcp <n.n.n.n>:1521 0.0.0.0:* ... LISTEN...
          # pick a different port. Add the port# exception to the firewall. If you want remote connections.
          Is the network interface enabled?
          $ ifconfig -a
          ethN ... <n.n.n.n> ...
          Make sure it has an IPv4 address and its correct.
          export NLS_LANG="AMERICAN_AMERICA.US7ASCII"
          That isn't needed, and isn't correct, the character set should be AL32UTF8. And won't have any effect except for stuff you're running at the command line, i.e. expdp, the older exp, or some other client utility.
          ... IPC ... //I have commented this line//
          That's fine. It isn't needed.

          Check the alertlog for the startup attempt. The engine may gripe on a memory parameter setting, can't recall the exact error but it has to do with changes in shared memory stuff. I've installed to Fed15 with no trouble, other than having a few MB short of a full 1GiB allocated to swap.

          For trying startup/shutdown use a switch user oracle and the instance will be much happier. And add your userID to the ora group to allow a sysdba connection without using the su ... oracle bits, but only when you're not doing a startup.

          Sometimes the ...env.sh barfs on the NLS environment .sh call, but it's not critical. To make it really easy pull those bits from the ...env.sh into your own ora_env file to source.
          $ ... set environment <period><space>...OH/bin/oracle_env.sh
             # OR set up your own ~/ora_env
             $ cd
             $ egrep -v NLS ...OH/bin/oracle_env.sh > ora_env
             $ . ./ora_env
          $ sudo su - oracle -c "sqlplus /nolog"
          ... connect /as sysdba
          ... ? connected ... Idle Instance ? ... startup;
          $
          Edited by: clcarter on Jan 20, 2012 12:44 PM
          fix env .sh
          • 2. Re: Oracle 10G on fedora 15
            912321
            Hi,
            thanks for the reply,but i still have the trouble.Now i am able to start my listener by changing HOST to localhost in my listener.ora file,and also able to start oracle srevices,but still i get the error

            ERROR:
            ORA-01034: ORACLE not available
            ORA-27101: shared memory realm does not exist
            Linux Error: 2: No such file or directory

            This is the error i am unable to understand the cause of.Please ,suggest some steps.
            Thanks.................
            • 3. Re: Oracle 10G on fedora 15
              orafad
              Please show us how you get there, not just the resulting error. Use copy - paste from the command line session.
              • 4. Re: Oracle 10G on fedora 15
                clcarter
                ORA-01034: ORACLE not available ... ORA-27101: shared memory realm does not exist
                Pretty straight forward, self-explanatory error. Once you've seen it a few times ;)

                The database isn't running. Or, to be more accurate, the database you're attempting to connect with isn't running.

                Step One, always Verify The Problem. If you can't verify a problem, you can't be sure if a "problem fix" is effective.

                For *nix oracle instances, when the instance is running there will be several processes running, look for them. Check the listener status, and make sure your environment variables are set correctly:
                $ sudo su - oracle
                ... $ . /usr.../bin/oracle_env.sh
                $ ps -ef |egrep pmon
                ... ora_pmonXE    # pmon for ORACLE_SID=XE
                $ set |egrep ORA
                ...
                ORACLE_SID=XE  # a critical bit on *nix
                $ lsnrctl stat
                ... TCP.... HOST=... PORT=1521
                ... http ... PORT=8080 ...
                $ sqlplus /nolog
                connect system
                ... password ... connected.
                select sysdate from dual;
                ... <dd-MON-yy>
                You may not see the 8080 http endpoint. If its not there, you won't be able to connect to the apex pages. But that is a different "problem", if the listener and instance are not running or improperly configured, apex connections not yet a relevant problem.

                The earlier suggestion to set the environment, sudo su oracle -c "sqlplus..." was not good advice, sorry. Forgot that sudo limits environment and PATH settings for its shell process.
                • 5. Re: Oracle 10G on fedora 15
                  orafad
                  909318 wrote:
                  I followed all the prescribed steps but still unable to get it done.
                  What steps exactly?
                  But the real problem starts when I try to start the listener.....
                  export ORACLE_SID="XE"
                  Maybe the problem is related to how you are setting env variables (with quotes).
                  I'm not sure since I have no linux based setup to try on but from windows:
                  C:\>set oracle_sid="xe"
                  
                  C:\>sqlplus / as sysdba
                  
                  SQL*Plus: Release 11.2.0.2.0 Production on S÷ Jan 22 15:55:03 2012
                  
                  Copyright (c) 1982, 2010, Oracle.  All rights reserved.
                  
                  ERROR:
                  ORA-12560: TNS:protocol adapter error
                  
                  
                  Enter user-name: ^C
                  C:\>set oracle_sid=xe
                  
                  C:\>sqlplus / as sysdba
                  
                  SQL*Plus: Release 11.2.0.2.0 Production on S÷ Jan 22 15:55:10 2012
                  
                  Copyright (c) 1982, 2010, Oracle.  All rights reserved.
                  
                  Connected to an idle instance.
                  
                  SQL>
                  If you get the "idle instance" response, just:

                  SQL> startup

                  export NLS_LANG="AMERICAN_AMERICA.US7ASCII"
                  Pure ascii is likely a incorrect setting (for the client char set part, after the dot). The setting should in general reflect the client locale or code page.

                  The listener.ora file is
                  A listener.ora is not required and often not necessary - defaults will cover basic setups.

                  also,I am unable to open the home page for my login on my browser.
                  That's a secondary error if database is not open.

                  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=shekhar)(PORT=1521)))
                  TNS-12535: TNS:operation timed out
                  TNS-12560: TNS:protocol adapter error
                  TNS-00505: Operation timed out
                  Linux Error: 110: Connection timed out
                  Check firewall (iptables) settings.

                  Edited by: orafad on Jan 22, 2012 4:50 PM
                  • 6. Re: Oracle 10G on fedora 15
                    clcarter
                    settings in my /etc/profile
                    And that's not where one sets one's profile, that is where a sysadmin specifies settings that apply to all user profiles. Maybe. Depends on which shell is set for the user.

                    For bash shell, use your ~/.bashrc for your profile:
                    $ cd   # no args, goto ~ a.k.a. home directory
                    vi .bashrc
                    <shift>g # go to the bottom of the  file
                    :r ...bin/oracle_env.sh  # read in your OH/bin env file
                    :w!q  # save changes and quit
                    $ set |egrep ORA
                    ... # should be empty
                    $ bash  # fire up a new shell to test the .bashrc change
                    $ set |egrep ORA
                    ORACLE_HOME...
                    ORACLE_SID...
                    $ echo $NLS_LANG # check that one too
                    AMERICAN_AMERICA.AL32UTF8
                    $ sqlplus /nolog
                    connect system
                    ... password ... Connected.