Install Oracle in Linux

Source: Internet
Author: User

The ORACLE tutorial is: Install Oracle in Linux. Due to the complexity of Oracle itself, installation in a Linux environment involves many factors. This article describes how to install Oracle 8.0.5 in Linux RedHat 6.0.

I. Adjust the Linux core and Environment

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

1. Install the following software packages after the default installation of RedHat 6.0 Linux is completed.

Kernel-source-2.2.5-15.1386.rpm
Linux 2.2.5 kernel source code is mainly used to modify core parameters and regenerate the kernel.
Tcl-8.0.4-29.1386.rpm

This software 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, you can adjust the Linux core parameters. Modify the/usr/src/linux/include/asm/shmparam. h file and modify the SHMMAX option. Oracle recommends 4294967295, which means the system's shared memory reaches 4 GB, which is not suitable. Generally, the SHMMAX setting can be slightly greater than the local memory configuration.
As a matter of fact, the default RedHat 6.0 core running Oracle 8.0.5 is no problem. Generally, these parameters cannot be adjusted.
If adjustments are required, rebuild the core as required by the document and use the lilo command to specify the new core for guidance.

3. Add users and create installation Directories

To install and run Oracle, you must create an Oracle user in the dba group, and create an installation directory for Oracle users, such as/u0/oracle, and specify this directory as the default home directory for Oracle users.
To set the running environment of an Oracle user, create a script file in the Oracle user's home directory to automatically set environment variables when logging on to the Oracle user. The script file name is related 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 content in the script file. bash_profile:

# ORACLE_HOME specifies the installation directory of Oracle
ORACLE_HOME =/u0/oracle; export ORACLE_HOME
# LD_LIBRARY_PATH specifies the shared library directory of Oracle
LD_LIBRARY_PATH = $ ORACLE_HOME/lib; export LD_LIBRARY_PATH
ORACLE_BASE = $ ORACLE_HOME; export ORACLE_BASE
# ORACLE_SID specifies the name of the Oracle database instance. It is recommended that Oracle be less than or equal to 4 characters
ORACLE_SID = BROS; export ORACLE_SID
# ORACLE_TERM terminal type of Oracle users
ORACLE_TERM = ansi; export ORACLE_TERM
PATH = $ PATH: $ ORACLE_HOME/bin; export PATH
# TMPDIR specifies a temporary directory. Oracle requires at least 20 mb of space.
TMPDIR =/var/tmp; export TMPDIR
Umask 022
Log out and then log on to Oracle to test whether the environment variables meet the requirements.

Ii. Install Oracle

Oracle installation can be performed on a CD or by specifying the installation path.
If you use an Oracle for linux disc for installation, run the following command:

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

Install the disc media. Under normal circumstances, CDROM should be installed in the/mnt/cdrom directory.
If the original installation path is specified, decompress the compressed file 805ship. tgz to a temporary directory, such as/home/Oracle, and run the following command:

Gunzip-c 805ship. tgz | tar xvf-

If you specify the original installation path/home/Oracle, run the following command in this directory:

Cd orainst
Sh oratab. sh

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

Because RedHat 6.0 uses glibc 2.0, installing Oracle 8.0.5 in RedHat 6.0 requires patching. The method is to uninstall/pub/www/otn/linux/glibcpatch at the ftp.Oracle.com site. tgz file. After the basic Oracle system is installed, modify the execution program in the $ ORACLE_HOME/bin directory.

After completing the preceding steps, you can start installing the basic Oracle System.

1. Enter the/home/Oracle directory;

2. Execute./orainst/c;

3. Select m for installation.

Select the following options as prompted:
Install, Upgrade or De-instal software
Install new product-do notcreat db Objects. This step is very important because the execution program in the installation package is not compatible with blibc2.0. Therefore, before patching, the Oracle engine cannot be started to create database objects.
After the reception is completed and exited, the system prompts:
Result: Success

4. Perform glibc correction on the Oracle execution program. The procedure is as follows:

* Create the $ ORACLE_HOME/orapatch directory;
* Copy glibcpatch. tgz to the main directory;
* Run tar-xvzf glibcpatch. tgz;
* Execute sh glibcpatch. sh.
After the patch is installed, run the Oracle Installation program again. The steps are as follows:
* Cd orainst;
* Execute orainst/c;
* Install custom.
Select the following options as prompted:
Create/upgrade Database objects
Create Database objicts
Oracle 8 Standard RDBMS 8.0.5.0.0
Create product DB Objicts
Filisystem-bases Database
Until the prompt is: Rusult: Success

5. Install and process after execution

* Log On As an Oracle user;
* Run the su-p root command and enter the root user password;
* Cd orainst;
* Execute sh root. sh;
* Edit and modify the/etc/oratab file.
Find the Oracle-SID indicator line, such:
$ BROS:/u0/Oracle: N
To:
$ BROS:/u0/Oracle: Y
To allow the Oracle server to start itself.
* Modify TNS-related file permissions:
Chown oracle. dba $ ORACLE_HOME/bin/tnslsnr
Chmod 750 $ ORACLE_HOME/bin/tnslsnr
Chown oracle. dba $ paie_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
Now, the installation is complete.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.