Install Oracle 11g for Red Hat Enterprise Linux 6

Source: Internet
Author: User

 

1. Prepare servers and Operating Systems

Ii. Installation preparation

Check the redhat kernel version

[Root @ redhat ~] # Uname-r

2.6.32-131.0.15.el6.i686

 

Check the installation package

[Root @ redhat sysconfig] # rpm-qa | grep binutils

Binutils-2.20.51.0.2-5.20.el6.i686

Binutils-devel-2.20.51.0.2-5.20.el6.i686

[Root @ redhat sysconfig] # rpm-qa | grep compat-libstdc ++

Compat-libstdc ++-33-3.2.3-69.el6.i686

[Root @ redhat sysconfig] # rpm-qa | grep elfutils-libelf

Elfutils-libelf-0.152-1.el6.i686

Elfutils-libelf-devel-0.152-1.el6.i686

[Root @ redhat sysconfig] # rpm-qa | grep glibc

Glibc-headers-2.12-1.25.el6.i686

Glibc-devel-2.12-1.25.el6.i686

Glibc-2.12-1.25.el6.i686

Glibc-common-2.12-1.25.el6.i686

[Root @ redhat sysconfig] # rpm-qa | grep libaio

Libaio-0.3.107-10.el6.i686

[Root @ redhat sysconfig] # rpm-qa | grep libgcc

Libgcc-4.4.5-6.el6.i686

[Root @ redhat sysconfig] # rpm-qa | grep libstdc ++

Libstdc ++-4.4.5-6. el6.i686

Libstdc +-docs-4.4.5-6.el6.i686

Libstdc +-devel-4.4.5-6.el6.i686

[Root @ redhat sysconfig] # rpm-qa | grep sysstat

Sysstat-9.0.4-18.el6.i686

[Root @ redhat sysconfig] # rpm-qa | grep unixODBC

UnixODBC-devel-2.2.14-11.el6.i686

UnixODBC-2.2.14-11.el6.i686

 

Modify the kernel parameters and run sysctl-p to make the modification take effect.

[Root @ redhat ~] # Vi/etc/sysctl. conf

Kernel. shmall = 268435456

Kernel. shmmni = 4096

Kernel. sem = 250 32000 100 128

Net. ipv4.ip _ local_port_range = 1024 65000

Net. core. rmem_default = 4194304

Net. core. rmem_max = 4194304

Net. core. wmem_default = 262144

Net. core. wmem_max = 262144

Fs. aio-max-nr = 1048576

Fs. file-max = 6815744

 

 

Create oracle users and groups

[Root @ redhat ~] # Groupadd oinstall

[Root @ redhat ~] # Groupadd dba

[Root @ redhat ~] # Useradd-g oinstall-G dba oracle

[Root @ redhat ~] # Passwd oracle

Change the password of your oracle database.

New password:

Re-enter the new password:

Passwd: All authentication tokens have been successfully updated.

 

[Root @ redhat ~] # Mkdir-p/u01/oracle

[Root @ redhat ~] # Chown-R oracle: oinstall/u01/oracle

 

Set environment variables for oracle users

[Root @ redhat ~] # Su-l oracle

[Oracle @ redhat ~] $ Vi. bash_profile

 

TMP =/tmp; export TMP

TMPDIR = $ TMP; export TMPDIR

Export ORACLE_BASE =/u01/oracle

Export ORACLE_HOME = $ ORACLE_BASE/product/OraHome

Export ORACLE_SID = test

Export ORACLE_OWNER = oracle

Export PATH =/usr/sbin: $ ORACLE_HOME/bin: $ PATH

LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/local/lib

Export LD_LIBRARY_PATH

CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib

CLASSPATH = $ CLASSPATH: $ ORACLE_HOME/network/jlib

Export CLASSPATH

 

-- Execute the following command to make the configuration take effect immediately or use oracle user login to make the configuration take effect

$ Source $ HOME/. bash_profile

 

Set Shell Limits

A. Add the following lines to the/etc/security/limits. conf file:

Oracle soft nofile 65536

Oracle hard nofile 65536

Oracle soft nproc 16384

Hard nproc 16384

 

B. Add the following lines to the/etc/pam. d/login file, if not:

Session required/lib/security/pam_limits.so

Session required pam_limits.so

C. Add the following statement after/etc/profile:

Vi/etc/profile

If [$ USER = "oracle"]; then

If [$ SHELL = "/bin/ksh"]; then

Ulimit-p 16384

Ulimit-n 16384

Else

Ulimit-u 16384-n 16384

Fi

Fi

 

 

Iii. Install ORACLE software

[Root @ redhat ~] # Su-l oracle

[Oracle @ redhat ~] $ Cd database/

[Oracle @ redhat database] $./runInstaller

 

Select to install only the database software, and run as root during installation.

[Root @ redhat ~] #/Oracle/oraInventory/orainstRoot. sh

[Root @ redhat ~] #/Opt/oracle/product/OraHome/root. sh

Then, use netca and dbca to create listeners and databases.

 

 

Iv. Configuration after installation

Auto-start configuration of ORACLE11g Database

Modify the following two files

/Etc/oratab and $ ORACLE_HOME/bin/dbstart

[Root @ redhat ~] # Vi/etc/oratab

Set

Test:/u01/oracle/product/OraHome: N

Change

Test:/u01/oracle/product/OraHome: Y

 

[Root @ redhat ~] # Su-l oracle

[Oracle @ redhat ~] $ Cd $ ORACLE_HOME

[Oracle @ redhat OraHome] $ cd bin

[Oracle @ redhat bin] $ vi dbstart

Find the line ORACLE_HOME_LISTNER = $1 and change $1 to $ ORACLE_HOME.

 

Configure auto-start for oracle 11g

[Root @ redhat ~] # Vi/etc/rc. d/rc. local

Add the following content:

 

TMP =/tmp; export TMP

TMPDIR = $ TMP; export TMPDIR

Export ORACLE_BASE =/u01/oracle

Export ORACLE_HOME = $ ORACLE_BASE/product/OraHome

Export ORACLE_SID = test

Export ORACLE_OWNER = oracle

Export PATH =/usr/sbin: $ ORACLE_HOME/bin: $ PATH

LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/local/lib

Export LD_LIBRARY_PATH

CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib

CLASSPATH = $ CLASSPATH: $ ORACLE_HOME/network/jlib

Export CLASSPATH

Export NLS_LANG = "SIMPLIFIED CHINESE_CHINA.ZHS16GBK"

Su oracle-c "$ ORACLE_HOME/bin/dbstart"

Su oracle-c "$ ORACLE_HOME/bin/emctl start dbconsole"

 

 

5. Problems During Installation

1. Run./runInstaller. The Chinese Character box is displayed.

In the/usr/lib/jvm/java-1.6.0/jre/lib/directory, create the following directory fonts/fallback, copy a Chinese font to some directories, and name it zysong. ttf, install and add Parameters

./RunInstaller-jreLoc/usr/lib/jvm/java-1.6.0/jre can solve the Chinese box problem.

 

2. The Chinese font box appears when you run netca.

Copy zysong. ttf to the $ ORACLE_HOME/jdk/jre/lib/fonts/fallback directory to fix the garbled characters.

 

3. The error code "ORA-12532: TNS: invalid argument" is prompted when dbca is used to create the database, which is iptables does not open port 1521, in iptables, add the following entry-a input-p tcp -- dport 1521-j ACCEPT to solve the problem.

 

4. What is the Chinese character when running sqlplus? Error

Set the environment variable NLS_LANG

Export NLS_LANG = "SIMPLIFIED CHINESE_CHINA.ZHS16GBK"

 

And write it to The. bash_profile file under the oracle directory.

 

This article is from the "keyboard for life" blog

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.