Oracle 9i installation on Red Hat Linux

Source: Internet
Author: User
Tags chmod copy ftp connect unpack uncompress sqlplus linux
Oracle


1, uncompress and unpack downloaded files



One step procedure (uses less disk spaces and is faster):
Zcat lnx_920_disk1.cpio.gz | Cpio-idmv
Zcat lnx_920_disk2.cpio.gz | Cpio-idmv
Zcat lnx_920_disk3.cpio.gz | Cpio-idmv

Two Step procedure:
# uncompress
Gunzip lnx_920_disk1.cpio.gz lnx_920_disk2.cpio.gz lnx_920_disk3.cpio.gz Linux9i_Disk3.cpio.gz
# Unpack the downloaded files:
CPIO-IDMV < Lnx_920_disk1.cpio
CPIO-IDMV < Lnx_920_disk2.cpio
CPIO-IDMV < Lnx_920_disk3.cpio



Now should have 3 directories containing installation files:
Disk1
Disk2
Disk3



2, Swap space

In order to perform a typical Oracle 9i installation and to create a simple prototype database, Oracle says, need A minimum of 512MB of RAM for the Oracle9i (9.0.1) Server, and the amount of disk spaces (swap space) should is equal to TW Ice the amount of RAM or at least MB, whichever is greater.

Check your memory by executing:
grep memtotal/proc/meminfo

Check swap spaces by executing:
Cat/proc/swaps or Swapon–s

You can also add temporary swap spaces by creating a temporary swap file instead of using a raw device. This is the procedure:

As Root:
DD If=/dev/zero Of=tmpswap bs=1k count=900000
chmod Tmpswap
Mkswap Tmpswap
Swapon Tmpswap

To disable the temporary swap spaces execute the following commands:

As Root:
Swapoff Tmpswap
RM Tmpswap

3, Shared Memory

I increased the Shmmax setting for the kernel by executing the following command:

As Root:
# Cat/proc/sys/kernel/shmmax
33554432
# echo ' expr 1024 \* 1024 \* 1024 ' >/proc/sys/kernel/shmmax



It is recommended to increase the Shmmax setting permanently for Oracle. So if you are want to increase the maximum is shared memory size permanently, add the following line to the/etc/sysctl.conf file :
kernel.shmmax=1073741824

4,/tmp Space

The Oracle universal Installer requires up to MB of free spaces in the/tmp directory. If you don't have enough spaces in the/tmp directory, you can temporarily create a TMP directory in another filesystem. Here are how are you can doing this:

As Root:
mkdir/<anotherfilesystem>/tmp
Chown Root.root/<anotherfilesystem>/tmp
chmod 1777/<anotherfilesystem>/tmp
Export Temp=/<anotherfilesystem>/tmp # used by Oracle
Export Tmpdir=/<anotherfilesystem>/tmp # used by Linux programs like the linker "LD"

When you are do with your Oracle installation, shutdown Oracle and remove the temporary directory:
RmDir/<anotherfilesystem>/tmp
Unset TEMP
unset Tmpdir

5,oracle Disk Space

You'll need about 2.5 GB for the database software. If you perform a typical database installation and don't a customized database installation, then you'll need about 3.5 GB of disk space.

6, "Binutils" Issue (If you fond following error)

Q: "Error invoking target install of makefile/opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"

A:This obviates the need to change binutils

Download the following Binutil RPM version and downgrade Binutil on the Oracle server:
ftp://ftp.redhat.com/pub/redhat/linux/7.0/en/os/i386/RedHat/RPMS/binutils-2.10.0.18-1.i386.rpm
As Root:
RPM-UVH--force--nodeps binutils-2.10.0.18-1.i386.rpm
When you are do with the Oracle installation, your upgrade your binutil RPM back to the version of you had before aded:
e.g. on a Red Hat 7.2 server:
RPM-UVH--force--nodeps binutils-2.11.90.0.8-9.i386.rpm

7,development Packages (RPMs)

You'll need the following RPM development packages for the Oracle installer to compile the Oracle modules etc.:
Gcc
Cpp
Glibc-devel
Compat-libstdc++
Kernel-headers (on RH 7.1, 7.2, 2.1AS)
Glibc-kernheaders (on RH 7.3, 8.0)
Binutils

Otherwise ' ll get a error message like:
Error in invoking target ntcontab.o of Makefile/opt/oracle/product/9.2.0/network/lib/ins_net_client.mk

To find out if your have these development packages installed, execute the following command:
# rpm-q gcc cpp glibc-devel kernel-headers binutils

8,jdk

I successfully installed ORACLE9IR2 without installing JDK on the system. Oracle comes now and its own Java. This means so you don ' t have to follow, steps which were required for older Oracle versions:

Download JDK 1.3.1 or Blackdown 1.1.8_v3: (I usually used)
http://www.blackdown.org
Http://java.sun.com

According to JDK documentation, install JDK under/usr/local.
Then Create a symbolic link to the JDK Under/usr/local/java:

As Root:
BZIP2-DC jdk118_v3-glibc-2.1.3.tar.bz2 | Tar XF--c/usr/local
Ln-s/usr/local/jdk118_v3/usr/local/java

9,create Oracle User Accounts

As Root:

Groupadd dba
Groupadd Oinstall
USERADD-G oinstall-g dba Oracle
passwd Oracle

Oinstall is isn't needed when the same people would be maintaining the software and the database. In this situation, it would create more work and add a extra layer of complexity to the maintenance of the.

Recommendation:if don ' t need the Oinstall group for added security,
Just install using the DBA group.

10,create Oracle Directories

In the example, make sure so the/opt filesystem is large enough. If/opt is isn't on a separate filesystem, then make sure the root filesystem "/" has enough spaces.

As Root:

Mkdir/opt/oracle
Mkdir/opt/oracle/product
mkdir/opt/oracle/product/9.2.0
Chown-r oracle.oinstall/opt/oracle

Mkdir/var/opt/oracle
Chown oracle.dba/var/opt/oracle
chmod 755/var/opt/oracle

11,set Oracle Environments

Set the following Oracle environment variables before you start Runinstaller.

As the Oracle user execute the following commands:

# Oracle Environment
Export Oracle_base=/opt/oracle
Export oracle_home=/opt/oracle/product/9.2.0
Export Oracle_sid=test
Export Oracle_term=xterm
#export tns_admin= Set If Sqlnet.ora, Tnsnames.ora, etc. are not in $ORACLE _home/network/admin
Export Nls_lang=american #export Nls_lang=american_america. ZHS16GBK; (if use Chinese)
Export ora_nls33= $ORACLE _home/ocommon/nls/admin/data
Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib
Ld_library_path= $LD _library_path:/usr/local/lib
Export Ld_library_path

# Set Shell Search paths
Export path= $PATH: $ORACLE _home/bin

# I successfully installed ORACLE9IR2 without setting the following CLASSPATH-environment variable:
Classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib
Classpath= $CLASSPATH: $ORACLE _home/network/jlib
Export CLASSPATH

Export Tmpdir=/tmp

You can put this environment settings at the "End of" the ~oracle/.bash_profile file if you use bash.

12,start Runinstaller

Oracle no longer supports a character mode installer. Therefore, in order to execute Runinstaller directly from a console of a machine your are logged into (in this example the Node name where Oracle is running are called "Oracleserver"), you need to set the DISPLAY environment variable.

From the console of your Oracle server "Oracleserver" to are logged into, execute the following command as user Oracle ":
oracleserver:oracle$ Export display=yourlocalip:0.0

13,running Oracle Installation

This are how I answered the questions in the Runinstaller:

What would you as the base directory (Inventory Location):
/opt/oracle/orainventory

UNIX Group Name (permission for updating Oracle software):
Oinstall
You are could also use "DBA" which I does not recommend for security reasons. (Refer to step 9)

Full path name for Oracle home:
/opt/oracle/product/9.2.0

Oracle Home Name:
Ouihome

14,you might get the following installation problems Oracle 9i (install):

L Check always the error logs in/tmp/orainstall for 9.2.0, e.g/tmp/orainstall2002-07-04_09-50-19pm, and in /tmp/orainstall for 9.0.1. When you have make problems check also $ORACLE _home/install/make.log.



L Q: "Error in invoking target install of makefile/opt/oracle/product/9.2.0/ctx/lib/ins_ctx.mk"

A:edit $ORACLE _home/ctx/lib/env_ctx.mk and go to "Inso_link =", add a "$ (ldlibflag) DL" and save it.

This is the full line with the added "$ (ldlibflag) DL" flag:
Inso_link =-l$ (ctxlib) $ (Ldlibflag) M $ (ldlibflag) DL $ (Ldlibflag) Sc_ca $ (Ldlibflag) Sc_fa $ (Ldlibflag) SC_EX $ (LDLIBFLAG ) Sc_da $ (Ldlibflag) Sc_ut $ (Ldlibflag) Sc_ch $ (Ldlibflag) Sc_fi $ (LLIBCTXHX) $ (ldlibflag) c-wl,-rpath,$ (CTXHOME) Lib $ ( Corelibs) $ (COMPEOBJS)

L Q: "Error invoking target install of makefile/opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"
"Error invoking target install of makefile/opt/oracle/product/9.0.1/precomp/lib/ins-precomp.mk"
"Error invoking target install of makefile/opt/oracle/product/9.0.1/precomp/lib/ins-net-client"
"Error invoking target install of makefile/opt/oracle/product/9.0.1/precomp/lib/ins-oemagent"

A:edit the file $ORACLE _home/bin/genclntsh and change the following line (people have sent me emails out of that pointing s also works for Mandrake 8.1 and Mandrake 8.2):
ld_self_contained= "-Z defs"
To read:
Ld_self_contained= ""

Then run the script $ORACLE _home/bin/genclntsh as the user "ORACLE" and not as the user "root". Also Make sure your have all Oracle environments set!

$ su-oracle
$ $ORACLE _home/bin/genclntsh
Created/opt/oracle/product/9.0.1/lib/libclntst9.a
$

L Q:Can ' t find init file for Database "SID".

A:I saw this error is connection with Oracle 9i R2 (9.2.0) as It tried to start the database with Dbstart.

I copied the init file for my SID ' test ' from/opt/oracle/admin/test/pfile to $ORACLE _home/dbs to get Dbstart and Dbshut W Orking:
cp/opt/oracle/admin/test/pfile/inittest.ora.642002224936 $ORACLE _home/dbs/inittest.ora

L Q: "Error in setting permissions of File/directory/opt/oracle/jre/1.1.8/bin/i686/native_threads/.extract_args"

A:while the error dialog is open, manually find and copy the. extract_args file from your installed JRE to where runinstal Ler complains it is missing.

L Q: "JRE is not found In/tmp/orainstall/jre/bin/i586/green_threads/jre"

A:You are probably running Runinstaller on a 586 machine, or your AMD CPU gets recognized as 586 (e.g. AMD k6-iii-400). You can check your machine (hardware) type by executing uname-m.
To rectify this problem, create a link for Lib and bin from i586 to i686 and make the i686 directories read only:
e.g.
Ln-s/tmp/orainstall/jre/bin/i686/tmp/orainstall/jre/bin/i586
Ln-s/tmp/orainstall/jre/lib/i686/tmp/orainstall/jre/lib/i586
chmod u-w/tmp/orainstall/jre/bin/i686/tmp/orainstall/jre/lib/i686
Now restart Runinstaller.

If you are are not running on a 586 or AMD machine, try to link the JRE to Java and the if this solves your.

L don't CD To/mnt/cdrom to run./runinstaller!
If you did so, the installation'll fail because you won ' t is able to the "change the" CDs.

L If you are forgot to set the DISPLAY environment variable (e.g. export display=oracleserver:0.0), or if you forgot To give the remote Console-your Oracle server-authority to display X information on your desktop PC (e.g. Xhost +oracl eserver), you'll get the following error:
Xlib:connection to ': 0.0 ' refused by server
Xlib:client is isn't authorized to connect to Server
In this case, I always had to kill Runinstaller which is still running in the background! If you don ' t does this, Runinstaller won't completely come up any more and you'll not have any error messages that Runin Staller is has problems.
Might also want to clean Up/tmp/orainstall (9.0.1):
Rm-rf/tmp/orainstall

L When Runinstaller starts to configure the tools ("Configuration tools"), the "Oracle Net Configuration Assistant "would sometimes hang. Simply Stop the Assistant and restart it, or continue the installation. When the rest of the installation are finished, do a "retry" for "Oracle Net Configuration Assistant". This is always worked for me.

L when the system stops to respond during the Oracle installation, in particular during the database creation, the n It is probably because you don ' t have enough RAM or enough swap spaces. I noticed that the whole system won't respond (or "hang") for several minutes when I did not have swap spaces. If This is happens, simply wait until the system starts to respond again.

L The Oracle installation also runs make etc. In a production environment your might not have compilers and other development packages. Therefore make sure you have temporarily the following packages, CPP, INSTALLED:GCC, Egcs, egcs-c++, Glibc-devel Eaders. (I ' m not sure though if all of this packages have to is on the system during the Oracle installation.)

L IF for any reason the Oracle installation didn ' t finish successfully, your might want to clean up the following F Iles and directories before you restart over again:
Rm-rf/etc/orainst.loc/etc/oratab/tmp/orainstall
/tmp/<otheroracleownedfiles>
$ORACLE _base/*

15,startup and Shutdown of Oracle 9i Database

Sqlplus:

SVRMGRL is isn't supported any more. You can now do everything with sqlplus.

e.g., to startup the database, execute the following commands:
dba$ Sqlplus/nolog
Sql> Connect/as SYSDBA
Sql> Startup

The slash connects the schema owned by SYS. So in this example we are saying the "We want to connect to" schema owned by SYS with the privilege SYSDBA. SYSDBA gives you the following privileges:
Sysoper Privileges with ADMIN OPTION
Create Database
Recover database until

$ORACLE _home/bin/dbstart and $ORACLE _home/bin/dbshut:

can also use $ORACLE _home/bin/dbstart to startup the database, and $ORACLE _home/bin/dbshut to shutdown the database. Can place $ORACLE _home/bin/dbstart into the/etc/rc.d/rc.local boot script to automatically bring up the database at S Ystem boot time. To-get $ORACLE _home/bin/dbstart and $ORACLE _home/bin/dbshut working, your need to change the third field for your ORACLE SI D in/etc/oratab from "N" to "Y".

e.g. for the Oracle SID ' test ' I changed the line in/etc/oratab from
Test:/opt/oracle/product/9.2.0:n
To read
Test:/opt/oracle/product/9.2.0:y

For 9.2.0, I also had to copy of the init file for my SID ' test ' from/opt/oracle/admin/test/pfile to $ORACLE _home/dbs to get Dbstart and Dbshut working:
cp/opt/oracle/admin/test/pfile/inittest.ora.642002224936 $ORACLE _home/dbs/inittest.ora
But the Your init file already exists in $ORACLE _home/dbs.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.