Install Oracle9i on Redhat9 on the VM

xiaoxiao2021-03-06  83

I have successfully installed Oracle9iR1 on Redhat Linux8.0 in the first two years. Due to the reason for work, I haven't touched Oracle for a long time :(. But I specially like Oracle Linux. So today is itchy, Try to install Oracle9i (9.2.0.4) on Redhat Linux9.0. The result is actually installed once. During only one error in using the DBCA to build a library, it can be corrected. Spirit, excellent tradition :), my younger brother, I don't dare to enjoy, special. It's just a new hand, the wrong thing is inevitable, please give criticism and correct.

First, hardware software environment:

Saiyang 4 2.4GHz

Hard disk 40GB

Memory 256MB

System environment Windosxp Pro

Linux running environment VMwareworkStation4.5.2

Virtual memory 128MB under VM

Virtual hard disk 40GB under VM (actually only 14GB)

There is no way, I am very special, can't buy memory, huh, huh! Pack, die, die, manage it!

Second, ready to work:

1. Create an Oracle User Account:

# GroupAdd DBA #Group of users to be granted with sysdba system priviliege

# GroupAdd Oinstall #Group Owner of Oracle Files

# UserAdd -c "Oracle Software Owner" -g oinstall -g DBA Oracle

# Passwd Oracle

2. Create an Oracle directory:

I am installing Oracle below / opt directory. If your / opt is not a single file system, make sure the root file system "/" has enough space.

# 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

3. Set up an Oracle environment

Edit the .bash_profile file below the Oracle Catalog, Note: LD_ASSUME_KERNEL = 2.4.1 under redhat linux9.0. .bash_profile file content can be as follows: # .bash_profile

# Get the aliases and functions

IF [-f ~ / .bashrc]; then

. ~ / .bashrc

Fi

# User specific Environment and Startup Programs STARTUP PROGRAMS

PATH = $ PATH: $ HOME / BIN

Export Path

Unset Username

# -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------

# | File: .bash_profile |

# -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------

Umask 022

Term = xterm; Export Term

TMPDIR = / TMP; Export Tmpdir

# --------------------------

# | Setup oracle environment |

# --------------------------

Export oracle_sid = Orcl

Export oracle_base = / opt / oracle

Export Oracle_Home = / OPT / ORACLE / Product / 9.2.0

Export ld_library_path = $ oracle_home / lib: / lib: / usr / lib

Export LD_Library_Path = $ LD_LIBRARY_PATH: / USR / LOCAL / LIB

Export TNS_ADMIN = $ Oracle_Home / Network / Admin / Admin / Admin

Export NLS_LANG = American_america.zHS16GBK

Export ORA_NLS33 = $ Oracle_Home / Ocommon / NLS / Admin / Data

Export Oracle_owner = ORACLE

Export Oracle_Term = xterm

#export ldemulation = ELF_I386_GLIBC21

Export GCC_EXEC_PREFIX = / usr / i386-glibc21-linux / lib / GCC-LIB /

# --------------------------

# | Linux stuff |

# --------------------------

Export ld_assume_kernel = 2.4.1

#Source /usr/i386-glibc2.1-linux/bin/i386-glibc21-linux-env.sh

# --------------------------

# | Setup search path |

# --------------------------

PATH = $ PATH: $ ORACLE_HOME / BIN: / OPT / BIN: / BIN: / USR / BIN: / USR / local / bin: / usr / sbin: / usr / x11r6 / bin: /usr/java/jdk_1.3.1 _08 / bin: .export path

# --------------------------

# | Setup java environment |

# --------------------------

Export java_home = / usr / java / jdk_1.3.1_08

Export ClassPath = $ ORACLE_HOME / JDBC / LIB / CLASS12.ZIP: $ ORACLE_HOME / JRE: $ Oracle_Home / Jlib: $ Oracle_Home / Rdbms / Jlib: $ Oracle_Home / Network / Jlib :.

# -------------

# | "Greetings" |

# -------------

echo ".bash_profile executed"

In fact, the ClassPath environment variable is not set, or the Oracle9IR2 can also be successfully installed.

4. Set the switch space

In order to perform Oracle9i standard installation and create an original database, Oracle recommends at least 512M memory switching space. But my machine is configured, you know: (, huh! So I spend the most time when I build a library.

Check the memory size, you can use the following command:

# GREP MEMTOTAL / Proc / Meminfo

Check the swap space size, you can use the following command:

# cat / proc / swaps

However, you can increase the exchange room by establishing a temporary exchange file, instead of using the original device.

# DD if = / dev / zero of = tmpwap bs = 1k count = 900000

# chmod 600 TMPSWP

# MKSWAP TMPSWAP

# sPON TMPSWAP

Cancel the temporary exchange space, so that you can:

# swapoff tmpswap

# rm -rf tmpswap

5. Set up Linux kernel parameters:

Add the following with the super user editor /etc/rc.local files:

Echo 100 256 100 100> / Proc / Sys / Kernel / SEM

Echo 2147483648> / proc / sys / kernel / shmmax

Echo 4096> / proc / sys / kernel / shmmni

Echo 2097152> / proc / sys / kernel / shmall

After modification, restart your computer and perform CAT to confirm.

Such as:

# Cat / Proc / Sys / Kernel / SEM

100 256 100 100

#

6. Check / TMP Space

Oracle General installer takes more than 400M or more temporary space, but I am just set up 300M when I install Linux, huh, huh!

Check / TMP temporary space, you can use:

# DF / TMP

If there is not enough / TMP space, you can temporarily create a TMP directory in another file system. # MKDIR / / TMP

# Chown root.root / / tmp

# chmod 1777 / / TMP

# export temp = / / tmp #used by oracle

# export tmpdir = / #used by Linux Program

When Oracle is installed, turn off Oracle and delete the temporary directory:

# RMDIR / / TMP

# Unset Temp

# unset tmpdir

7. Check the development package:

Run the following command to see if these packages are installed:

# rpm -q GCC CPP Compat-libstdc Glibc-Devel Glibc-Kernheaders Binutils

If it is not installed, you can install the package:

# rpm -ivh gcc-3.2.2-5.i386.rpm

8. Install JDK

There is information that oracle9ir2 can skip this part of this part, not installing JDK in the system, or successfully installing Oracle9IR2. It means that Oracle is now able to use our Java.

Download JDK1.3.1 or BlackDown1.1.8_v3: (I used JDK1.3.1-08)

http://www.blackdown.org/

http://java.sun.com/

According to the JDK document, install it to the / usr / local directory, but also build a link JDK to / usr / local / java, but I am using rpm -ivh jdk1.3.1.i586.rpm, the default installation path is not Implan as RedHat Linux 8.0 to the / usr / local / directory, but install it to the / usr / java directory, this is only discovered when I use the DBCA to build a library, but there is no relationship, know where she is hidden You can control, huh, huh. So I have changed in the initial environment, you don't have to worry. Links in Redhat Linux8.0:

# ln -s /uar/local/jdk1.3.1_08 / usr / local / java

9. Unzip the installation of the Oralce9ir2 for Linux:

Copy the installation file to the system to avoid unexpected results due to optical drives or discs :).

The file can be extracted by step by step:

# zcat ship_9204_linux_disk1.cpio.gz | CPI -IDMV

# zcat ship_9204_linux_disk2.cpio.gz | CPI -IDMV

# zcat ship_9204_linux_disk3.cpio.gz | CPI -IDMV

During unpacking and decompression, 3 directorys containing installation files are automatically created:

Disk1

Disk2

DISK3

You can also install Oracle9ir2, Note: To install Oracle9IR2 in an English language environment. Otherwise, there will be a garbled phenomenon due to different systems and Oracle fonts. Third, start installation:

1. Log in to the Oracle user, perform Oracle installation:

$ CD Disk1

$ ./runinstaller

Oracle installation interface will appear after a while, as shown in the following figure:

2. Click "Next" to do the next step:

3. Select the default, click "OK" to continue:

4. Enter the group name "oinstall", click "Next" to do the next step:

5. Follow the prompts, open another terminal, execute /tpm/orainstroot.sh command with the root user:

6. After the command is completed instantly, click "Continue" for the next step:

7. Select the default, click "Next" to continue:

8. After "Loading Product", go to the installation interface shown below:

9. Select "Oracle9i Database 9.2.0.4.0" and select "Product Languages" to set up

Set:

10. Select "Simplified Chinese", "Traditional Chinese", "Traditional Chinese", click "OK":

11. Here, "Enterprise Edition (2.56GB)" is selected and click "Next":

12. Waiting for the implementation of the installation process, go to the next installation interface:

13. Select "Software Only", we can use the DBCA tool to build library:

14. Click "Install" to start installing the database:

15. Installation Waiting for "Link Pending ...", continue:

16. After a long wait, I finally saw the long-awaited interface.

17. The installation process is much better than I expected, there is no error message :). Follow the prompts to execute /opt/oot.sh in the terminal with the root user. As shown below:

18. After executing the statement, enter, use the default path, must wait for the statement to execute, return to the installation interface, click "OK":

19. congratulations! When you see this picture, you have proved that the database has been installed successfully :). Click "EXIT" to exit the interface.

Fourth, create a database:

When I execute the DBCA tool, the interface can be done normally, but when I got up the library, I always closing the window to return the terminal and prompting the 120nd line of the DBCA file. There is an error. However, this may be a problem that Oracle uses itself to bring Java. According to the following modifications, the result is finally the successful construction library.

Modify the DBCA file below the $ ORACLE_HOME / BIN directory:

Change JRE_DIR = / usr / java / jdk1.3.1_08 $ JRE_DIR / bin / jdk1.3.1_08 -native -DORACLE_HOME = $ OH -DJDBC_PROTOCOL = thin -mx64m -classpath $ CLASSPATH oracle.sysman.assistants.dbca.Dbca $ ARGUMENTS else $ Jre_dir / bin / jdk1.3.1_08 -doracle_home = $ oh -djdbc_protocol = thin -mx64m -classpath $ classpath oracle.sysman.assistants.dbca.dbca $ arguments Fi saver after saving.

1. With Oracle users execute DBCA at the terminal, you can build a database, huh, huh! As shown below:

2. Wait, pop up the welcome interface of DBCA:

3. Click "Next" to do the next step:

4. Select "CREATE A DATABASE" to create a database, click "Next", continue:

5. Select "New Database" and click "Next" to create a new database:

6. Enter the global name and SID name of the database, Global Database Name can be entered as: "ORA9204.Oracle.com, SID: ORA9204. You can also enter a name. Click" Next "to continue:

7. Default selection, click "Next" to continue:

8. Here is the default selection, click "Next" to continue:

9. Set the initial parameters of the Oracle9ir2 database, the advantages and disadvantages of the initial parameters directly affect the execution performance of the database,

Here you can also choose the "Archive" tab, set the database into "archive mode":

10. Select "Character Sets" to make a database character set setting, click "Next" to step by step:

10. Click "Next" to do the next step:

11. You can hook "Save As A Database Template" and "Generate Database Creation Scripts", then click the "Browse" button to save the settings of DBCA as a new database template and the script when creating a database is saved to a directory. It can be used directly in the future to establish a database. Then click "Finish" to continue.

12. "Database Configuration Assistant" finally consolidates a list of all configuration settings and starts to create a database after pressing "OK".

13. It is possible to wait patiently to enter the stage of the database built-in :).

14. When the above window appears, I've made a lot! Please specify the password of SYS and System administrators in SYS and SYSTEM. After the setting is complete, press "OK", it will return to the screen installed successfully.

15. Congratulations! Click "Next" to exit the installer, and then jump out of the OEM screen.

16. It is difficult to install the Oracle9i database system, then check it out!

17. Enter the PS - EF | GREP ORA_ command in the terminal to confirm that the background process of the Oracle9i database has been started. carry on:

18. Then use the Oracle9i database to log in to the database, and log in to the database with Scott (Password Tiger), try to perform the instruction query EMP table. Just like you see the data on the EMP table above, it means that the Oracle9i database operation is incorrect! Ok, now check the case of the hard disk used after the actual installation of the Oracle9i database. 19. Hehe! Yes, use the vMware "snapshot" to use 6.82GB. All right! I just finished, I recorded it down, my hand hurts, go to rest! ^ _ ^

Feiwupiaoxue

20040805

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

New Post(0)