Oracle 9i Installation on Red Hat Linux

zhaozj2021-02-16  37

1, Uncompress and Unpack Downloaded Files

One step procedure (uses less disk space 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 -idmvTwo 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

Now You Should Have 3 Director Containing Installation Files: disk1disk2disk3

2, SWAP SPACE

In order to perform a typical Oracle 9i installation and to create a simple prototype database, Oracle says that you need a minimum of 512MB of RAM for the Oracle9i (9.0.1) Server, and the amount of disk space (swap space) should be Equal to TWICE The Amount of Ram OR at Least 400 MB, Whichever Is Greater.

CHECK YOUR Memory by Executing: Grep Memtotal / Proc / Meminfo

Check Swap Space by Executing: CAT / Proc / Swaps Or Swapon -s

You Can Also Add Temporary Swap Space by Creating A Temporary Swap File Instead of Using A Raw device. Here is the procedure:

As root: dd if = / dev / zero of = tmpswap bs = 1k count = 900000chmod 600 TMPSWAPMKSWAP TMPSWAPSWAPON TMPSWAP

To Disable The Temporary Swap Space Execute The Following Commands:

As root: swapoff tmpswaprm tmpswap

3, Shared Memory

I increased the shmmmax setting for the kernel by Executing The FOLLOWING COMMAND:

As root: # cat / proc / sys / kernel / shmmax33554432 # echo `EXPR 1024 / * 1024 / * 1024`> / proc / sys / kernel / shmmax

It is recommended to increase the shmmax setting permanently for Oracle So if you want to increase the maximum shared memory size permanently, add the following line to the /etc/sysctl.conf file:. Kernel.shmmax = 10737418244, / tmp Space

The Oracle Universal Installer requires up to 400 MB of free space in the / tmp directory If you do not have enough space in the / tmp directory, you can temporarily create a tmp directory in another filesystem Here is how you can do this..:

As root: mkdir / / tmpchown root.root / / tmpchmod 1777 / / tmpexport TEMP = / / tmp # used by Oracleexport TMPDIR = / / tmp # used by Linux Programs Like The Linker "LD" WHEN You Are Done with your Oracle Installation, Shutdown Oracle and Remove The Temporary Directory: RMDIR / / Tmpunset Tempunset TMPDIR

5, Oracle Disk Space

You will NEED ABOUT 2.5 GB for the Database Software. If You Perform A Typical Database Installation and Not a Customized Database Installation, The You Will Need About 3.5 GB of Disk Space.

6, "binutils" Issue (if you fond backing error)

Q: "Error Invoking Target Install of Makefile /opt/oracle/product/9.0.1/plsql/lib/ins_plsql.mk"

A: this obviseate 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.rpmWhen you are done with the Oracle installation, you upgrade your binutil RPM back to the version you had before you downgraded: Eg ON A Red Hat 7.2 Server: rpm -uvh --force - nodeps binutils-2.11.90.0.8-9.i386.0.8-9.i386.rpm7, develop package (RPMS)

You will need the following RPM development packages for the Oracle installer to compile the Oracle modules etc.:gcccppglibc-develcompat-libstdc kernel-headers (on RH 7.1, 7.2, 2.1AS) glibc-kernheaders (on RH 7.3, 8.0) Binutils

Otherwise you'll get an error message like: Error in invoking target ntcontab.o of makefile /opt/oracle/product/9.2.0/network/lib/ins_net_client.mkTo find out if you have these development packages installed, execute the following Command: # rpm -q GCC CPP Glibc-Devel Kernel-Headers Binutils

8, JDK

I successfully installed oracle9ir2 welle, jdk on the system.racle comes now ITS OWN Java. This Means That You don't have to follow these Steps Which bere Required for Older Oracle Versions:

Download JDK 1.3.1 OR BlackDown 1.1.8_v3: (I Usually Used Blackdown) 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 dbagroupadd oinstalluseradd -g oinstall -G dba oraclepasswd oracleOinstall is not needed when the same people will be maintaining the software and the database. In this situation, it will create more work and add an extra layer of complexity to the maintenance of the installation.

Recommendation: if You Don't Need The OinsTall Group for Added Security, Just Install Using The DBA Group.

10, CREATE ORACLE DIRECTORIES

In this Example, Make Sure That The / Opt FileSystem Is Large Enough. IF / Opt IS Not On A Separate FileSystem, The Make Sure The Root FileSystem "HAS ENOUGH SPAS.

As root:

Mkdir / Opt / Oraclemkdir / Opt / Oracle / ProductMkdir /opt/oracle/product/9.2.0chown -r oracle.oinStall / OPT / ORACLE

Mkdir / var / opt / oraclechown oracle.dba / var / opt / oraclechmod 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 Environmentexport ORACLE_BASE = / opt / oracleexport ORACLE_HOME = / opt / oracle / product / 9.2.0export ORACLE_SID = testexport ORACLE_TERM = xterm # export TNS_ADMIN = Set if sqlnet.ora, tnsnames.ora, etc. are not in $ ORACLE_HOME / network / adminexport NLS_LANG = AMERICAN #export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK; (if you use Chinese) export ORA_NLS33 = $ ORACLE_HOME / ocommon / nls / admin / dataLD_LIBRARY_PATH = $ ORACLE_HOME / lib: / lib: / usr / libLD_LIBRARY_PATH = $ LD_LIBRARY_PATH: / USR / LOCAL / LIBEXPORT LD_LIBRARY_PATH

# Set shell search pathsexport 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 / jlibexport CLASSPATHexport TMPDIR = / tmp

You can put these 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 you are logged into (in this example the node name where Oracle is running is called "oracleserver"), you need to set the Display environment variable.

From the console of your Oracle Server "Oracleserver" you are logged Into, Execute the folload command as user "oracle": ORACLESERVER: Oracle $ export display = YOORLOCALIP: 0.0

13, Running Oracle Installation

This Is How I Answered The Questions in The Runinstaller:

What would you like as the base directory (Inventory Location): / opt / oracle / oraInventoryUNIX Group Name (permission for updating Oracle software): oinstallYou could also use "dba" which I do not recommend for security reasons (refer to step 9. ) Full Path name for oracle home: /opt/oracle/product/9.2.0oracle Home Name: Ouihome

14, You Might Get The Following Installation Problems When You Install Oracle 9i (9.2.0):

L First Check Always The Error Logs In / Tmp / ORAINSTALL FOR 9.2.0, EG / TMP / ORAINSTALL 2002-07-04_09-50-19PM, AND IN / TMP / ORAINSTALL for 9.0.1. When You get 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 :ide $ oracle_home / ctx / lib / env_ctx.mk and go to" INSO_LINK = " Add A "$ (LDLIBFLAG) DL" to the line and save it. Here is the full belg "$ (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 $ (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""rror 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 pointing out that this 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 made you have all the oracle environments set!

$ su - Oracle $ $ Oracle_Home / Bin / Genclntshcreated /opt/oracle/product/9.0.1/lib/libclntst9.a

l Q: can't find init file for database "sid".

A: I Saw this error 9i R2 (9.2.0) WHEN 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 working: cp /opt/oracle/admin/test/pfile/inittest.ora.64200224936 $ oracle_home / dbs / inittest.oral 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 RUNINSTALLER Complains it is missing.

L Q: "JRE WAS 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 (eg 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 online om-ly: egln -s / tmp / orapotall / jre / bin / i686 / tmp / orapostall / jre / bin / i586ln -s / tmp / orapostall / JRE / LIB / I686 / TMP / ORE / LIB / JRE / LIB / I586CHMOD UW / TMP / ORAINSTALL / JRE / BIN / I686 / TMP / ORE / BIN / JRE / LIB / I686NOW RESTART RUNINSTALLER. IF you are not running on a 586 OR AMD MACHINE Try to Link JRE TO JAVA AND See if this Solves your problem.

L do not cd to / mnt / cdrom to run ./runinstaller !if you do so, the installation will fail Because You Won't becomle to change the cds.

l If you forgot to set the DISPLAY environment variable (eg 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 (eg xhost oracleserver), you will get the following error: Xlib: connection to ": 0.0" refused by serverXlib: Client is not authorized to connect to ServerIn this case, I always had to kill runInstaller which was still running in the background If you do not do! this, runInstaller will not completely come up any more and you will not see any error messages that runInstaller is having problems.You might also want to clean up / tmp / OraInstall (9.0.1): rm -rf / tmp / OraInstalll When runInstaller starts to configure the tools ( "Configuration Tools"), the "Oracle Net Configuration Assistant" will sometimes hang. Simply stop the Assistant and restart it, or continue the installation. When the rest of the installation is finished, do a "Retry" For "Oracle Net Confi ".................

l When the system stops to respond during the Oracle installation, in particular during the database creation, then it is probably because you do not have enough RAM or enough swap space. I noticed that the whole system will not respond (or "hang" For Several Minutes When I Did Not Have Enough Swap Space. if this happens, Simply Wait Until The System Starts To Respond Again.

l The Oracle installation also runs make etc. In a production environment you might not have compilers and other development packages installed Therefore make sure you have temporarily the following packages installed:. gcc, cpp, egcs, egcs-c , glibc-devel, kernel -headers. (I'm not sure though if all of these packages have to be on the system during the Oracle installation.) l If for any reason the Oracle installation did not finish successfully, you might want to clean up the following files And Director Before You Restart over Again: Rm -rf /etc/orainst.loc / etc / oracab / TMP / ORAINSTALL / TMP / $ Oracle_Base / *

15, Startup and Shutdown of Oracle 9i Database

SQLPlus:

SVRMGRL IS Not 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 you to the schema owned by SYS So in this example we are saying that we want to connect to the 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:

You can also use $ ORACLE_HOME / bin / dbstart to startup the database, and $ ORACLE_HOME / bin / dbshut to shutdown the database. You can place $ ORACLE_HOME / bin / dbstart into the /etc/rc.d/rc.local boot script to automatically bring up the database at system boot time. to get $ ORACLE_HOME / bin / dbstart and $ ORACLE_HOME / bin / dbshut working, you need to change the third field for your Oracle SID in / etc / oratab from "N" to " Y.

Eg for the oracle sid "test" i change the line in / etc / oracle/Product/9.2.0: NTO readtest: /opt/racle/product/9.2.0: Yfor 9.2.0, i Also Had to Copy The Init File for My SID "Test" from / opt / oracle / admin / test / pfile to get dbstart and dbshut working: cp / opt / oracle / admin / test / pfile / inittest. ORA.642002224936 $ Oracle_Home / DBS / InitTest.Orbut First Check if Your Init File Already Exists in $ Oracle_Home / DBS.

转载请注明原文地址:https://www.9cbs.com/read-27306.html

New Post(0)