Install Oracle8.1.7 on RedHat7.1

xiaoxiao2021-03-06  41

Install Oracle8.1.7 on RedHat7.1

I was successfully installed for the first time in RedHat7.1, huh, huh, very lucky! Later, there were many friends asked me to install the method. I realized that there were so many problems. According to my method, I should be able to install success. I have installed it without 10 times. It is very smooth. Summarize your own installation experience, summed up the problems encountered by others, hoping to have a little help to others.

Installing the Oracle System File Under / U01, the database file is placed under / u02, not installing the OPS, does not install the JServer, single database form instance.

Oracle_base = / u01 / app / oracle

Oracle_home = / u01 / app / oracle / product / 8.1.7

Oracle_sid = Orcl

First, the configuration before installation

1, replace GLIBC

Oracle8.1.7 uses glibc2.1.3, while RedHat 7.1 is Glibc2.2.2, not compatible, so replacing GLIBC can be successfully installed.

First install the redhat7.1 installation of several RPM packages starting with COMPAT, they are:

Compat-glibc-6.2-2.1.3.2.i386.rpm

Compat-eGCS-OBJC-6.2-1.1.2.14.i386.rpm

Compat-EGCS-6.2-1.1.2.14.i386.rpm

Compat-libs-6.2-3.i386.rpm

Can:

Compat-libstdc - 6.2-2.9.0.14.i386.rpm

Compat-EGCS-C - 6.2-1.1.2.14.i386.rpm

Also installed.

Because there is a dependency between these packages, if the installation order is wrong, it will report an error, and it is impossable. Generally, the first one should be installed, and four of the upper top of the second sheet are installed.

If this is also an error, you can't install it. You can copy these 6 packages to a directory, then install it together, so you don't have to be afraid of the dependence between them, you can have successful installation. E.g:

Rpm -ivh compat-glibc-6.2-2.1.3.2.i386. rpm Compat-EGCS-6.2-1.1.2.14.i386.rpm Compat-Libs-6.2-3.i386.rpm Compat-EGCS-C - 6.2-1.1. 2.14.i386.rpm Compat-EGCS-OBJC-6.2-1.1.2.14.i386.rpm Compat-libstDC - 6.2-2.9.0.14.i386.rpm

2, create users and groups

GroupAdd DBA

UserAdd Oracle -g DBA

Passwd Oracle

The Oracle installation document says, to create two groups, OinsTALL and DBA, Oracle user host groups are Oinstall, from the genus group is DBA, in fact, only DBA is good, don't be so troublesome.

Chown -r oracle.dba / u01

Chown -r oracle.dba / u02

3, set environment variables

You can place the environment variable to be set in. Bash_profile, you can also put it in / etc / profile, you can see all users, I suggest placed in / etc / profile, because everything is running The program reads the Oracle database of this machine, generally need to set an oracle environment variable, otherwise the database cannot be connected.

I can give an example:

If your web server, such as Apache, you need to read and write the database, provide the dynamic content of the web page, assume that serveraPi or CGI is written with PHP or JSP, or Perl, because Apache is started with root, this process is refork Several sub-processes run in the Nobody user, respond to the HTTP request of the 80-port, so if the Oracle environment variable is not read in root, the web program cannot read and write the database at all. As long as the root reads the Oracle environment variable, when the Fork child process, the data space of the parent process is copied, and the environment variable of the parent process is also inherited, so you can read the Oracle database. So I set this, add as follows in / etc / profile:

Oracle_base = / u01 / app / oracle

Oracle_home = / u01 / app / oracle / product / 8.1.7

Oracle_sid = Orcl

ORA_NLS = / U01 / App / Oracle / Product / 8.1.7 / Ocommon / NLS / Admin / Data

NLS_LANG = "Simplified Chinese"

Classpath =.: / U01 / app / oracle / product / 8.1.7 / jdbc / lib / class111.zip

LD_LIBRARY_PATH = / U01 / App / Oracle / Product / 8.1.7 / LIB

PATH = $ PATH: $ ORACLE_HOME / BIN: $ ORACLE_HOME / DBS: / ETC

EXPORT ORACLE_BASE ORACLE_HOME ORACLE_SID ORA_NLS NLS_LANG LD_LIBRARY_PATH PATH

Where $ ORACLE_BASE, $ ORACLE_HOME Specifies the installation directory, $ oracle_sid is the SID of the Oracle database, $ ORA_NLS is a character set directory, $ nls_lang is a character set, $ ClassPath is a JAVA program reads and writes the JDBC Class of the database you need, add a point number It is the meaning of the current search. $ Ld_library_path is the location of Oracle's C library function and header file, which is necessary for OCI8, PROC, and JDBC OCI connections.

Log out and log in, or do not log out, execute the command of the next row, read it directly / etc / profile

. / etc / profile

again

ENV | GREP ORACLE

Take a look at whether Oracle variables are set correctly.

4, temporary change GLIBC

will

. /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh

Export ld_assume_kernel = 2.2.5

Join the .bash_profile under the Oracle Home / Oracle, log out in Oracle login, or do not log out, execute the command of the next row, directly read .bash_profile

. /Home/oracle/.bash_profile

Take a look at whether it has been replaced

GCC -V

Before replacing is:

Reading Specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs

GCC VERSION 2.96 20000731 (Red Hat Linux 7.1 2.96-81)

After the replacement is:

Reading Specs from /usr/i386-glibc21-linux/lib/gcc-lib/i386-redhat-linux/2.96/specsgcc driver version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) Executing GCC Version EGCS-2.91.66

5, modify the kernel parameters

When the Oracle Database is running, use the shared memory to implement Oracle's SGA, so adjust Linux kernel parameters to adapt to Oracle's SGA requirements. This aspect should be adjusted to how much is suitable, you can refer to Oracle's official installation document. In general, mainly, the maximum size of shared memory segments should be adjusted. The LINUX core default shared memory segment is 32m, if the Oracle SGA is more than 32m (general business operation, it is certainly greater than 32m), SGA will segment, occupied a few A discontinuous shared memory segment caused to degrade the performance of Oracle.

Command IPCS -AL can view shared memory parameters, command IPCS to view shared memory usage.

Modifying the kernel parameters can modify the kernel source to recompilate the kernel. This method is a bit troublesome, and the parameters of shared memory are in the SHM.H and Sem.h files in the source code directory.

Another simple approach is to directly modify the kernel parameters, that is, the files under / proc will take effect immediately.

You can modify / proc / sys / kernel SHMMAX and SEM

SHMMAX is the largest size of the shared memory segment with bytes.

SHMMNI is the maximum number of shared memory segments

SHMMAX is the maximum capacity of shared memory (SHMMAX * SHMMNI)

SEM is a semaphore parameter, Msgmax, MsgMnb, and msgmni is the parameter of the message queue.

I changed as follows:

Echo 134217728> / proc / sys / kernel / shmmax (SGA is 128m)

Echo -e "250 32000 100 128"> / proc / sys / kernel / sem

(In fact, don't change this, just changing the Max Ops Per Semop Call, this is written on the Oracle installation document, I have done it, but I tried it, I don't have anything, others are maintained. No changed)

Summarized as follows: Change a must-have SHMMAX, other, during use, the parameters are large enough, and no need to adjust.

Second, the installation process

1, Runinstaller launch installation interface

Sometimes runinstaller, the installation interface is not coming, this is mainly because Oracle's character set is set for Simplified Chinese, but the OS is English, so sometimes it does not come, and the program written by Java often has a problem. At this point, the $ nls_lang variable is temporarily destroyed, Java will use the default character set, just fine. and so:

Unset $ nls_lang

You can also try

Unset $ lang

In fact, dbassist is sometimes not coming, so you can come out, but NetAsS is always unclear, but you can modify Lisner.ora and Tnsnames.ora, so Netasst is not necessary.

Another possible reason is that glibc has not replaced, I found until JDK1.3.1_01, only support GLIBC2.2, previous version, including jdk1.3.0, GLIBC2.2, as long as it is running under glibc2.2, There is no response, the process seems to die, the Oracle installer is used by JRE1.1.8, so as long as GLIBC is still 2.2, the installation window will never come out. 2, click Next, fill in the DBA when you fill in the genus of the Oracle software, then prompt to run $ oracle_home / root.sh with root, run in root. Generate one file in / etc / down ORAINST.LOC

3. When you choose Server, "Network Management Workstations", "Client", select "Server"

After installing, you can return to this screen to select the components that do not have installed, but also you can start Runinstaller to install other components.

Another person mentioned that there is no PORC option, in fact, PROC is installed in the "client" option.

4, then select "Custom Installation", do not choose a typical installation, because typical installation will install Oracle JServer, actually not use JServer, and install JServer is to launch a Java virtual machine in SGA, very resource (Java) Things are always very resource), and the process of creating JServer when installing is very long, once doubting to crash.

5, the list of choosing the installation component, you can delete some components yourself, I don't need Oracle's Apache Server, ready to install themselves, so I will hook. If you want to install the Apache Server option, you need to install Java in advance, and set the $ java_home variable, although the request is JDK1.1.8, but use JDK1.3 can be installed successfully, there is no problem in running apache, it will not Because the version of JDK has differently leading to the difference in running results, I have not tested it.

6, or choose the list of installation components, there is a button to select the language, add "Simplified Chinese"

7. Ask if you create a database, "Yes", add the SID of the installation database, I am "orcl", the database data file is stored, and I am "/ u02".

8. Start installing Oracle, installing copy files.

There are a lot of people saying that when the copy file is finished, when the system library function, the Make error occurs, I think this will still replace GLIBC unsuccessful, I really didn't have this problem when I installed. Problem. I want to follow the steps I wrote, there should be no such problem.

9. After the completion, the prompt runs root.sh in root.

Oracle8.1.7 has two versions, one is Oracle8.1.7.0.0, the other is Oracle8.1.7.0.1, this version with ops, and Oracle provides a glibc2.2's patch, but in redhat7.1, follow the top After the method is done, it doesn't actually make a patch. This version of Oracle8.1.7.0.1 has a bug in root.sh at this time, should be on Chapter 156, as follows:

Ruid = `/ usr / bin / id | $ awk -f ('{print $ 2}' | $ awk -f) '{Print $ 1}`

At the end, write a 'should be changed to:

Ruid = `/ usr / bin / id | $ awk -f ('{print $ 2}' | $ awk -f) '{Print $ 1}'` `

Run it, generate / etc / oracab.

10. Automatically start NetAsSt, configure the listener, usually if you want to save things, choose a typical configuration, just a typical configuration opens a 2481 port, is JServer, if you don't have JServer, you can do not need it, now you can Take it, look back again. Listener.ora.

11. Automatically start dbassist, install the database, and do it according to the prompt, according to your own situation, you can adjust the parameters when installing the database, and finally start creating the database. You can also select the created script, then exit dbassist, separate Run creation script, so more flexible, you can change your script yourself, you can also study your script, there will be harvested.

Third, configure after installation

1. Log in with root, modify / etc / oracab, will last:

Orcl: /u01/app/oracle/product/8.1.7: n

Change to:

Orcl: /u01/app/oracle/product/8.1.7: y

This allows you to start and turn off the database with dbstart and dbshut, don't write SVRMGRL yourself.

2. Start the database and modify the kernel command in the system launch script.

Modify /etc/rc.d/rc.local, join:

#modify kernel parameter

Echo 134217728> / proc / sys / kernel / shmmax

Echo -e "250 32000 100 128"> / proc / sys / kernel / sem

#start oracle8.1.7

Su - Oracle-C 'Lsnrctl Start'

Su - Oracle-C 'DBSTART'

I am more lazy, there is no other write script connection into rc3.d, rc0.d.rc5.d, rc6.d, but directly in rc.local, huh, huh

Note that modifying the kernel parameters After starting the database instance, after starting the database, use the IPCS command to see the usage of shared memory, if there is no segmentation.

Another thing to explain is important to note that any way to read and write the database must obtain Oracle environment variables, otherwise it will not be able to join the database.

This "-" in SU - in the script is very particular, it means to switch to Oracle users, and get Oracle environment variables.

Another example, if you want to start Apache to read and write the database, the command of rc.local is sure to write:

#start apache httpd server

. / etc / profile

/ usr / local / apache / bin / apachectl start

Because I put Oracle's environment variables in / etc / profile, I will force it to read / etc / profile before starting apache, obtain Oracle environment variables, so Apache's ServeraPi program can read and write the database.

3. Modify the NET8 configuration, you can use Netca, or you can modify $ Oracle_Home / Network / Admin / NetWork / Admin, Netasst seems to come. 4. If you create a second instance, you will use dbassist. If DBASSIST does not come, it is temporarily destroyed $ lang, $ nls_lang

Unset $ nls_lang

Unset $ lang

You can come out.

Four, nonsense

I don't have enough hardware conditions to install OPS, so I don't choose OPS when installing Oracle8.1.7; there is no hardware condition to install Oracle9i, so I don't know how to install Oracle9i. However, I have used suse7.1, I'm very impressed, since Oracle officially recommended is SUSE, still use suse to install Oracle9i, so compatibility is better, and it is also available.

If I have something wrong with the installation method, please give me a view, thank you!

My contact method:

E-mail: fana@adbobo.com

QQ: 14477412 '

Supplementary description: September 16, 2001

In essence, the GLIBC2.2 library and other related tools of RedHat 7.1 are a little higher for Oracle8i. So it is usually used to replace the REDHAT7.2 library with redhat7.1, which is Glibc2.1.3.

My own experience is that as long as I have replaced GLIBC, I can install success, don't do other work. Be sure to install the RPM package of the COMPAT, replace it correctly, and try again with GCC -V, it is determined that it is installed with compat glibc2.1.3 and then installing.

I didn't have a display variable in this post. In fact, if I installed Oracle in this unit, there will be default settings, I don't need to set it back at all.

If the Runinstaller reported by display, set it out, it is nothing more than

Export Display = 192.168.0.1: 0.0 (Suppose IP is 192.168.0.1)

If this is done, the Make error is also reported when the system library (I have never encountered such a make error problem, so there is no way to test), may not be a glibc problem, but the version of the LD these commands. . I suggest this error, try this method, that is, downgrade binutil.

First download binutils-2.10.0.18-1.i386.rpm (download URL: http://rpmfind.net/linux/rpm/redhat/7.0/i386/binutils-2.10.0.18-1.i386.html, or in Google Search on it)

RPM -UVH binutils-2.10.0.18-1.i386.rpm --force --Nodeps

after that

Runinstaller.

Or although Make Error appears, you can install the past, you can also try this method:

After the installation file is complete, the process of configuring the NET8 and the database assistant creation database will appear.

If you configure NET8 error, you can quit this, manually modify $ Oracle_Home / Network / Admin of Listener.ora and Tnsnames.ora. )

Do not create a database when the database assistant creates a database, exit. Because the connected executable program is problematic, the database cannot be created correctly. To the Oracle website, you can find a glibc Patch:

http://download.oracle.com/otn/linux/oracle8i/glibc-2.1.3-stubs.tar.gz

Download it, put it in $ oracle_home, decompress,

CD $ ORACLE_HOME

TAR XVFZ GLIBC-2.1.3-stubs.tar.gz

./setup_stubs.sh

In

DBASSIST

Start the database creation assistant and create a database.

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

New Post(0)