Install Oracle under RedHat7.0

zhaozj2021-02-08  244

Seeing a lot of articles say that the GLIBC with RedHat7.0 has problems, can't install Oracle. Later, I heard that I would like to have a Glibc version, so I wanted to install one. Some people say that I want to install Oracle, at least 256M memory, but also to modify the shared memory size, recompile the kernel, create 4 mount points, etc., I have not done, I installed it (or I can only use it. event). The following steps are faithfully recorded the entire installation process.

Machine configuration

CPU: Intel Pentium III 668203 kHz

Memory: 128M

Operating system: redhat7.0 (fully installed)

SWAP area: 256M

Install shell: Bash

2. Install the required software

Oracle8161_tar.gz (275M, big file is big, doing psychological preparation before downloading, I spent a whole day, but I can't open, I can't open, I almost mad! I have to download it once, it is better to go Buy a pirated disc.). Download URL:

ftp://166.111.136.3/pub/Database/oracle/oracle8161.tar.gz (Tsinghua Wine)

http://technet.Oracle.com/software/products/oracle8i/software/index.htm

GLIBC2.1 (GNU C Library, 18M) Download Address:

ftp://ftp.kernel.org/pub/software/libs/glibc/hjl/sdk/2.1/i386-glibc-2.1-linux.tar.gz

Put it after downloading / backup directory

3. Install the GLIBC 2.1 package

RedHat7.0 is installed for glibc2.2. Oracle 8i cannot compile using Glibc 2.2, and the SDK of Glibc2.1 is required.

Log in with root account

[root @ online_you / root] CD /

[root @ online_you /] TAR ZXVF /BACKUP/i386-glibc-2.1-linux.tar.gz

Hide / USR / BIN directory GCC, CC, LD, avoid being used by Oracle Installer

[root @ online_you /] cd / usr / bin

[root @ online_you bin] MKDIR SAVED

[root @ online_you bin] MV GCC CC LD Saved

[root @ online_you bin] ln -s /usr/i386-glibc-2.1-linux/bin/i386-glibc21-linux-gcc gcc

[root @ online_you bin] ln -s gcc cc

[root @ online_you bin] ln -s /usr/i386-glibc-2.1-linux/bin/i386-glibc21-linux-LD LD

Hide / usr / lib directory Libc.so, libdl.so, libm.so and libpthread.so files, avoid being used by Oracle Installer

[root @ online_you bin] cd ../lib

[root @ online_you lib] MKDIR SAVED

[root @ online_you lib] mv libc.so libdl.so libm.so lopthread.so saved

[root @ online_you lib] mv libc.a libdl.a libm.a libpthread.a saved4. Create an Oracle account

Log in with a root account, open a Terminal window, create an Oracle account

[root @ online_you / root] UserAdd Oracle

[root @ online_you / root] Passwd Oracle (Set the Password for the Oralce account)

The system automatically creates the / home / oracle directory, the owner is Oracle. My Oracle is ready to be installed in this directory. On the installation document, you want to create a DBA group, I will be free.

5. Decompose Oracle8161_Tar.gz

Log in with the root account, execute:

[root @ online_you / root] CD / Backup

[root @ online_you / backup] tar zxvf oracle8161_tar.gz

Generate an Oralce8ir2 directory in / backup / directory, including files after unpacking

6. Set Oracle User Environment

Use the Oracle account to log in, turn on the Terminal window, open /Home/oracle/.bash_profile to use the text editor to finally add the setting line with the following environment variable:

Oracle_home = / home / oracle; export oracle_home

LD_LIBRARY_PATH = / home / oracle / lib; export ld_library_path

Oracle_base = / home / oracle; export oracle_base

Oracle_sid = Orcl; Export Oracle_sid

ORA_NLS33 = / Home / Oracle / Ocommon / NLS / Admin / Data; Export ORA_NLS33

NLS_LANG = American_America.zHS16CGB231280; Export NLS_LANG

#, ZHS16CGB231280 is the code of Simplified Chinese. It is also the character set of the database. American_america is a regional code and has little relationship.

Log Out, log in to the Oracle account, type the ENV directive to see the environment variables just set.

[Oracle @ online_you oracle] ENV

7. Create an Oracle Data File Directory

I want to put the data file in the / home / oracle / data directory, so

[Oracle @ Only_You Oracle] MKDIR DATA

8. Install Oracle 8i Database Software

(1) Log in with an Oracle account, enter xwindows, open the Terminal window

(2) [Oracle @ Only_You Oracle] CD / Backup / Oracle8ir2

(3) [Oracle @ online_you oralcle8ir2] ./ Runinstaller

(4) Error, display information

XLIB: Connection To ": 0.0" Refused by Server

XLIB: Client Is Not Authorized to Connect To Server

Description XHOST is not configured

(5) Set XHOST

Open a new Terminal window

[Oracle @ online_you oracle] Su - (Enter the root password)

[root @ online_you / root] XHOST

Keep this window

(6) Continue installation under Oracle User Window

[Oracle @ Only_You ORCLE8IR2] ./RunInstaller appears on the Java-based Oracle Installer interface, click Next.

(7) On the File Locations interface, check the Destination path as / home / oracle, click Next

(8) In the UNIX Group Name window, type "Oracle" and click Next;

(9) A window will pop up, requiring ROOT /HOT / ORACLE/OrinStroot.sh

(10) Switch to the root user window just reserved

[root @ online_you / root] CD / HOME / ORACLE

[root @ online_you oracle] ./ ORAINSTROOT.SH

(11) Return the window that has just popped up, click Retry.

(12) Select "Oracle8i Enterprise Edition 8.1.6.1.0" on the "Available Products" window appearing, click Next.

(13) Select Typical on the next screen, click Next

(14) On the Privileged Operating System Groups interface, click Next

(15) Tips Enter Global Database Name, write what you like, I wrote a WAP, verify that oracle_sid is orcl, click Next

(16) Tips Enter DB Files Localtion, Enter / Home / Oracle / Data, click Next

(17) On the last summary window, click Install

(18) It is now officially installed.

I said that this is a long process, at least 1 to 2 hours. In order to keep awake, I rushed into cup of coffee and started the Internet. I didn't expect to be less than 20 minutes.

(19) After the file is copied and counted, a window that requires ROOT.SH is popped up.

Switch to the root user window,

[root @ online_you oracle] ./ root.sh

Press the Enter key when you ask LOCAL BIN DIRECTORY

(20) Return to the window to run root.sh, click OK

(21) Oracle Net8 Configuration and Oracle Database Configuration Assistants are launched, install NET8 and create a database. This step takes about 20 minutes.

(22) After the Oracle Database Configuration Assistants, click OK on the completion database that pops up.

(23) On the End Of Installation screen, click on Exit, click Yes on the pop-up Do you reallywant to exit?

All Oralce 8i Enterprise is now installed! You can then use the Oracle Database Management SVRMGRL, SQL * Plus to test the installed database!

9. test

[Oracle @ online_you oracle] SVRMGRLORCLE Server Manager Release 3.1.6.0.0 - Production

CopyRight (C) 1997, 1999, Oracle Corporation. All Rights Reserved.

Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production

WITH THE PartInog Option

JServer Release 8.1.6.0.0 - Production

SVRMGR> Connect Internal

Connected.

SVRMGR> Shutdown

Database closed.

Database dismount.

Oracle Instance Shut Down.

SVRMGR> Startup

Oracle Instance Started.

Total System Global Area 56012784 BYtes

Fixed size 69616 bytes

Variable size 38993920 bytes

Database buffers 16777216 BYTES

Redo buffers 172032 bytes

Database mounted.

Database opened.

SVRMGR> quit

Server Manager Complete.

Yes, it seems that you can work normally. Try again with SQLPlus

[Oracle @ Only_You Oracle] $ SQLPLUS

SQL * Plus: Release 8.1.6.0.0 - Production on Sun Apr 15 09:20:12 2001

(c) Copyright 1999 Oracle Corporation. All Rights Reserved.

ENTER User-name: Scott

ENTER Password: Tiger

Connected to:

Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production

WITH THE PartInog Option

JServer Release 8.1.6.0.0 - Production

SQL> SELECT * FROM EMP

There should be a bunch of data, there are 14, it seems that there is no problem.

SQL> quit

10. Restore previous GLIBC

[root @ online_you oracle] CD / USR / BIN

[root @ online_you bin] RM -F GCC CC LD

[root @ online_you bin] mv ./saved/*.

[root @ online_you bin] rmdir saved

[root @ online_you bin] CD / USR / LIB

[root @ online_you lib] mv ./saved/*.

[root @ online_you lib] RMDir Saved

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

New Post(0)