Oracle 11g installation on Linux

Source: Internet
Author: User
Tags chmod dba

Oracle 11g installation on Linux
    1. Create the required users and groups

Vim mk_user.sh

GROUPADD-G 501 Oinstall
GROUPADD-G 502 DBA
GROUPADD-G 503 Oper
Useradd-u 501-g oinstall-g Dba,oper Oracle

SH mk_user.sh

    1. Create the desired directory
      Vim mk_dir.sh

Mkdir-p/u01/app/orainventory
Chmod-r 775/u01/app/orainventory
Mkdir-p/u01/app/oracle
Mkdir/u01/app/oracle/cfgtoollogs
Chown-r oracle:oinstall/u01
Chmod-r 775/u01/app/oracle
Mkdir-p/u01/app/oracle/product/11.2.0/dbhome_1
Chown-r Oracle:oinstall/u01/app/oracle/product/11.2.0/dbhome_1
Chmod-r 775/u01/app/oracle/product/11.2.0/dbhome_1

SH mk_dir.sh
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    1. Install the required installation package
      A. Attach the disc to the/MNT
      Mount/dev/cdrom/mnt
      B. Back up the original repo file and create a new repo file
      Mkdir/etc/yum.repo.d/bak
      Mv/etc/yum.repo.d/*.repo/etc/yum.repo.d/bak
      Vim/etc/yum.repo.d/cdrom.repo

[CDROM]
Name=cdrom
Baseurl=file:///mnt
Enabled=1
Gpgcheck=0
Multilib_policy=all

Save exit

Clean up the Yum cache and rebuild the new cache:
Yum Clean All
Yum Makecache

C. Install the required packages
Yum install binutils COMPAT-LIBCAPL compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc-2.5-24 Glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make-3.81 sysstat-7.0.2

Redhat need to be installed separately
Compat-libstdc++-33 and Pdksh
Pdksh is an old bag, the new Oracle uses the KSH package, but Oracle's check mechanism does not remove this check, so when the interface to install Oracle, there will be alarm information, we can ignore it, and then see if Ksh is installed, If you install Ksh without installation, you can use Ksh.

    1. Modify the Hosts file
      Vim/etc/hosts
      Adding IP and host names to the Hosts file

5. Modify/etc/sysctl.conf

Vim/etc/sysctl.conf

FS.AIO-MAX-NR = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 536870912
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048576

Sysctl–p make current changes effective

    1. Configure resource limits for Oracle users

Vim/etc/security/limits.conf

Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536

    1. Modify Profile File

Vim/etc/profile
Add the following content

if [$USER = "Oracle"] | | [$USER = "Grid"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Umask 022
Fi

    1. Modify user environment variables (operate under Oracle user)
      Vim. Bash_profile

#!/bin/bash
tmp=/tmp; Export TMP
Tmpdir= $TMP; Export TMPDIR
Oracle_base=/u01/app/oracle; Export Oracle_base
Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1; Export Oracle_home
Oracle_sid=prod; Export Oracle_sid
Oracle_unqname=prod; Export Oracle_unqname
Oracle_term=xterm; Export Oracle_term
Path=/usr/sbin: $PATH; Export PATH
Path= $ORACLE _home/bin: $PATH; Export PATH
Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib; Export Ld_library_path
Classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib;
Export CLASSPATH

After you save the exit, execute the following command to make the above settings effective immediately:
Source/home/oracle/.bash_profile

    1. Unpacking the installation package
      Unzip Linux.x64_11gR2_database_1of2.zip
      Unzip Linux.x64_11gR2_database_2of2.zip

    2. Installation
      If the operating system is in Chinese, the installation will be garbled can be executed before the installation
      Export Lang=en_us. UTF-8
      Then execute the./runinstaller

      Redhat 7.4 will be reported during installation
      Error in invoking target ' agent NMHS ' of makefile '/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk '.

Solve:
VI $ORACLE _HOME/SYSMAN/LIB/INS_EMAGENT.MK

Find the following line
$ (MK_EMAGENT_NMECTL)

Change this line to:
$ (MK_EMAGENT_NMECTL)-lnnz11

The first one is the letter L, and the last two is the number 1.

Oracle 11g installation on Linux

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.