Install Oracle under Linux

  • 2020-05-10 23:05:37
  • OfStack

The ORACLE tutorial you are looking at is: install Oracle under Linux. Because of the complexity of Oracle itself, there are many factors involved in installing it in an Linux environment. This article introduces the installation of Oracle 8.0.5 in Linux RedHat 6.0 in two aspects.

1. Adjust Linux core and environment

Before installing Oracle, you should adjust the Linux kernel and environment of RedHat 6.0. You should do the following:

1. After completing the default installation of RedHat 6.0 Linux, you need to install the following packages.

kernel -source -2.2.5 -15.1386.rpm
Linux 2.2.5 kernel source code, mainly used to modify the core parameters after rebirth into the kernel.
tcl -8.0.4 -29.1386.rpm

This package is required to install the Oracle Intelligent Agent package.
Compat -binutils -5.2-2.9.0.23.1.1386.rpm
Compat -glibc -5.2-2.0.7.2.1386.rpm
Compat -egcs -5.2 -1.0.3a.1.1381.rpm
Compat -egcs -C++ -5.2 -1/0/3a.1.1386.rpm
Compat -libs -5.2 -1.1386.rpm

2. Adjust Linux core parameters

According to the requirements of Oracle 8.0.5 for Linux core memory parameters, the Linux core parameters can be adjusted. Edit/usr/src/linux include/asm/shmparam h file, modify SHMMAX options. Oracle recommends 4294967295, which means the system's Shared memory reaches 4G, which is not appropriate. Like 1, SHMMAX can be set slightly larger than the native memory configuration.
In fact, the default installed RedHat 6.0 core runs Oracle 8.0.5 with no problem, and these parameters are normally not adjusted.
If adjustments are required, after the modifications are made, regenerate to the core as documented and use the lilo command to specify the new core to boot with.

3. Add users and create installation directory

To install and run Oracle, you need to create an Oracle user belonging to the dba group, and an installation point directory belonging to the Oracle user, such as /u0/oracle, and specify that this directory is the default home directory for Oracle users.
To set up the Oracle user's running environment, create a script file in the Oracle user's home directory to automatically set the environment variables after logging in as Oracle user. The script file is named according to the shell used by the user (defined in the etc/passwd file). If bash is used, the script file is.bash_profile; If sh is used, the script file name is.profile. Take bash as an example, enter the following in the script file.bash_profile:

#ORACLE_HOME specifies the installation directory for Oracle
ORACLE_HOME=/u0/oracle; export ORACLE_HOME
#LD_LIBRARY_PATH specifies the Shared library directory for Oracle
LD_LIBRARY_PATH=$ORACLE_HOME /lib;export LD_LIBRARY_PATH
ORACLE_BASE=$ORACLE_HOME; export ORACLE_BASE
#ORACLE_SID specifies the Oracle database instance name, and Oracle is recommended to be less than or equal to 4 characters
ORACLE_SID=BROS;export ORACLE_SID
#ORACLE_TERM Oracle user terminal type
ORACLE_TERM=ansi; export ORACLE_TERM
PATH=$PATH: $ORACLE_HOME /bin; export PATH
#TMPDIR specifies a temporary directory, and Oracle requires space of at least 20M
TMPDIR=/var/tmp;export TMPDIR
umask 022
After logging out, log in as user Oracle to test whether the environment variables meet the requirements.

2. Install Oracle

The installation of Oracle can be done by cd-rom or by specifying the installation path.
For installation with Oracle for linux cd-rom, follow the following command:

mount -t iso9660 /dev/cdrom /home/Oracle

Install the CD media. Normally, CDROM should be installed under the /mnt/cdrom directory.
For the specified original installation path, extract the compressed file 805ship.tgz to a temporary directory, such as /home/Oracle, using the following command:

gunzip - c 805ship.tgz| tar xvf -

Suppose you use the specified original installation path /home/Oracle, and execute in this directory:

cd orainst
sh oratab.sh

The main purpose of the oratab.sh command is to create /etc/oratab.

Since RedHat 6.0 USES glibc 2.0, installing Oracle 8.0.5 in RedHat 6.0 requires patching. Method is: unloading in ftp. Oracle. / pub www com site/otn linux/glibcpatch tgz file, in complete Oracle basic system after installation, for $ORACLE_HOME/bin executable program modification in the directory.

Once you've done that, you're ready to start the installation of the Oracle base system.

1. Enter /home/Oracle directory;

2. Execution./orainst /c;

3. Select Custom installation.

Make the following choices according to the prompt:
Install,Upgrade or De -instal software
Install new product -DO NOTCREAT DB Objects This step is very important because the executable in the installation package is not compatible with blibc2.0, so you cannot start the Oracle engine to create the database objects before patting.
After following the above steps to host and exit, the system should prompt:
Result:Success

4. Make glibc corrections to Oracle execution procedures. The steps are as follows:

* create the $ORACLE_HOME/orapatch directory;
* copy glibcpatch.tgz to your home directory;
* tar-xvzf glibcpatch. tgz;
* sh glibcpatch.sh.
After installing the patch, rerun the installation of Oracle as follows:
* cd orainst;
* execute orainst /c;
* install custom.
Make the following choices according to the prompt:
Create/upgrade Database objects
Create Database objicts
Oracle 8 Standard RDBMS 8.0.5.0.0
Create product DB Objicts
Filisystem -bases Database
Until: Rusult:Success

5. Installation after execution

* log in as Oracle user;
* execute su-p root and enter root user password;
* cd orainst;
* sh root.sh;
* edit and modify the /etc/oratab file.
Find the Oracle-SID indicator line, as follows:
$BROS: /u0/Oracle:N
Is amended as:
$BROS: /u0/Oracle:Y
To allow the Oracle server to start itself.
* modify TNS file permissions:
chown oracle.dba $ORACLE_HOME/bin/tnslsnr
chmod 750 $ORACLE_HOME/bin/tnslsnr
chown oracle.dba $ORACE_HOME/network/log
chmod 775 $ORACLE_HOME/network/log
chown root.dba $ORACLE_HOME/network/log/listener.log
chmod 664 $ORACLE_HOME/network/log/listener.log
At this point, the installation is almost complete.


Related articles: