How to install Oracle11gClone

Source: Internet
Author: User
If you need to install a large number of database servers, the graphical installation of database software is still slow and troublesome. Oracle11g provides Clone security

If you need to install a large number of database servers, the graphical installation of database software is still slow and troublesome. Oracle 11g provides Clone security

If you need to install a large number of database servers, the graphical installation of database software is still slow and troublesome. Oracle 11g provides the Clone installation method.

The procedure is as follows:

1. Package on machine

[Root @ localhost oracle] # zip-r db_1.zip/u01/app/oracle/product/11.2.0/db_1/

2. Prepare the B server environment

[Root @ localhost inst_env_scripts] #./1preusers. sh

[Root @ localhost inst_env_scripts] #./2predir. sh

[Root @ localhost inst_env_scripts] #./3prelimits. sh

[Root @ localhost inst_env_scripts] #./4presysctl. sh

The script content is as follows:

[Root @ localhost inst_env_scripts] # cat 1preusers. sh

#! /Bin/bash

# Purpose: Create 3 groups named 'osinstall', 'dba ', 'hangzhou', plus 1 users named 'oracle '.

# Also setting the Environment

# Variable for oracle user.

# Variable for grid user.

# Usage: Log on as the superuser ('root'), and then execute the command: #./1preusers. sh

# Author: ding liqing

Echo "Now create 3 groups named 'osinstall', 'dba ', 'authorization '"

Echo "Plus 1 users named 'oracle ', Also setting the Environment"

Groupadd-g 1000 oinstall

Groupadd-g 1300 dba

Groupadd-g 1301 running

Useradd-u 1101-g oinstall-G dba, development-d/home/oracle-s/bin/bash-c "Oracle Software Owner" oracle

Echo "oracle" | passwd -- stdin oracle

Echo "export TMP =/tmp">/home/oracle/. bash_profile

Echo 'export TMPDIR = $ TMP '>/home/oracle/. bash_profile

Echo "export ORACLE_SID = orcl">/home/oracle/. bash_profile

Echo "export ORACLE_BASE =/u01/app/oracle">/home/oracle/. bash_profile

Echo 'export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1 '>/home/oracle/. bash_profile

Echo 'export TNS_ADMIN = $ ORACLE_HOME/network/admin'>/home/oracle/. bash_profile

Echo 'export PATH =/usr/sbin: $ path'>/home/oracle/. bash_profile

Echo 'export PATH = $ ORACLE_HOME/bin: $ path'>/home/oracle/. bash_profile

Echo 'export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib'>/home/oracle/. bash_profile

Echo 'export CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib '>/home/oracle/. bash_profile

Echo "export EDITOR = vi">/home/oracle/. bash_profile

Echo "export LANG = en_US">/home/oracle/. bash_profile

Echo "export NLS_LANG = american_america.AL32UTF8">/home/oracle/. bash_profile

Echo "export NLS_DATE_FORMAT = 'yyyy/mm/dd hh24: mi: ss'">/home/oracle/. bash_profile

Echo "umask 022">/home/oracle/. bash_profile

Echo "The Groups and users has been created"

Echo "The Environment for oracle also has been set successfully"

[Root @ localhost inst_env_scripts] # cat 2predir. sh

#! /Bin/bash

# Purpose: Create the necessary directory for oracle users and change the authention to oracle users.

# Usage: Log on as the superuser ('root'), and then execute the command: #./2predir. sh

# Author: ding liqing

Echo "Now create the necessary directory for oracle users and change the authention to oracle users ..."

Mkdir-p/u01/app/oracle

Chown-R oracle: oinstall/u01

Chmod-R 775/u01

Echo "The necessary directory for oracle users and change the authention to oracle users has been finished"


[Root @ localhost inst_env_scripts] # cat 3prelimits. sh

#! /Bin/bash

# Purpose: Change the/etc/security/limits. conf.

# Usage: Log on as the superuser ('root'), and then execute the command: #./3prelimits. sh

# Author: ding SCSI

Echo "Now modify the/etc/security/limits. conf, but backup it named/etc/security/limits. conf. bak before"

Cp/etc/security/limits. conf/etc/security/limits. conf. bak

Echo "oracle soft nproc 2047">/etc/security/limits. conf

Echo "oracle hard nproc 16384">/etc/security/limits. conf

Echo "oracle soft nofile 1024">/etc/security/limits. conf

Echo "oracle hard nofile 65536">/etc/security/limits. conf

Echo "Modifing the/etc/security/limits. conf has been succeed ."

# Usage: Log on as the superuser ('root'), and then execute the command: #./4presysctl. sh

# Author: ding liqing

Echo "Now modify the/etc/sysctl. conf, but with a backup named/etc/sysctl. bak"

Cp/etc/sysctl. conf/etc/sysctl. conf. bak

Echo "fs. aio-max-nr = 1048576">/etc/sysctl. conf

Echo "fs. file-max = 6815744">/etc/sysctl. conf

Echo "kernel. shmall = 2097152">/etc/sysctl. conf

Echo "kernel. shmmax = 1054472192">/etc/sysctl. conf

Echo "kernel. shmmni = 4096">/etc/sysctl. conf

Echo "kernel. sem = 250 32000 100 128">/etc/sysctl. conf

Echo "net. ipv4.ip _ local_port_range = 9000 65500">/etc/sysctl. conf

Echo "net. core. rmem_default = 262144">/etc/sysctl. conf

Echo "net. core. rmem_max = 4194304">/etc/sysctl. conf

Echo "net. core. wmem_default = 262144">/etc/sysctl. conf

Echo "net. core. wmem_max = 1048586">/etc/sysctl. conf

Echo "net. ipv4.tcp _ wmem = 262144 262144 262144">/etc/sysctl. conf

Echo "net. ipv4.tcp _ rmem = 4194304 4194304 4194304">/etc/sysctl. conf

Echo "Modifing the/etc/sysctl. conf has been succeed ."

Echo "Now make the changes take effect ....."

Sysctl-p


3. copy the zip package on machine A to machine B.

[Root @ localhost inst_env_scripts] # scp 192.168.199.163:/home/oracle/db_1.zip/home/oracle/

The authenticity of host' 192. 168.199.163 (192.168.199.163) 'can't be established.

RSA key fingerprint is cc: d0: c3: de: 37: 33: a7: cb: 91: 40: c5: 5f: 18: 07: 06: 9f.

Are you sure you want to continue connecting (yes/no )? Yes

Warning: Permanently added '192. 168.199.163 '(RSA) to the list of known hosts.

Root@192.168.199.163's password:

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.