Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

11g Clone installation for Oracle Learning

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

If you need to install more database servers, it is still slow and troublesome to install database software graphically. Oracle 11g provides a way to install Clone.

The steps are as follows:

Install Oracle on server A using the normal method.

Package the $ORACLE_HOME on machine A, db_home1.zip.

Prepare the environment of the B machine, such as establishing users, modifying kernel parameters, modifying environment variables, and so on.

Copy the zip package to server B and extract it to any directory.

Execute the Clone command

A pack on the machine

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

two。 Prepare the B machine 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 'oinstall','dba','oper', 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' oinstall','dba','oper'" echo "Plus 1 users named 'oracle' Also setting the Environment "groupadd-g 1000 oinstall groupadd-g 1300 dba groupadd-g 1301 oper useradd-u 1101-g oinstall-G dba Oper-d / home/oracle-s / bin/bash-c "Oracle Software Owner" oracleecho "oracle" | passwd-- stdin oracleecho "export TMP=/tmp" > > / home/oracle/.bash_profileecho 'export TMPDIR=$TMP' > > / home/oracle/.bash_profileecho "export ORACLE_SID=orcl" > > / home/oracle/.bash_profileecho "export ORACLE_BASE=/u01/app/oracle" > > / home/oracle/.bash_profileecho' export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_ 1'> > / home/oracle/.bash_profileecho 'export TNS_ADMIN=$ORACLE_HOME/network/admin' > > / home/oracle/.bash_profileecho' export PATH=/usr/sbin:$PATH' > > / home/oracle/.bash_profileecho 'export PATH=$ORACLE_HOME/bin:$PATH' > > / home/oracle/.bash_profileecho' export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib' > > / home/oracle/.bash_profileecho 'export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE _ HOME/rdbms/jlib' > > / home/oracle/.bash_profileecho "export EDITOR=vi" > > / home/oracle/.bash_profileecho "export LANG=en_US" > > / home/oracle/.bash_profileecho "export NLS_LANG=american_america.AL32UTF8" > > / home/oracle/.bash_profileecho "export NLS_DATE_FORMAT='yyyy/mm/dd hh34:mi:ss'" > > / home/oracle/.bash_profileecho "umask 022" > > / home/oracle/.bash_profileecho "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/oraclechown-R oracle:oinstall / u01chmod-R 775 / u01echo "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 lq 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.bakecho" oracle soft nproc 2047 "> / etc/security/limits.confecho" oracle hard nproc 16384 "> / etc/security/limits.confecho" oracle soft nofile 1024 "> > / etc/security/limits.confecho" oracle hard nofile 65536 "> / etc/security/limits.confecho" 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.confecho" fs.file-max = 6815744 "> > / etc/sysctl.confecho" kernel.shmall = 2097152 "> > / etc/sysctl.confecho" kernel.shmmax = 1054472192 "> / etc/sysctl.confecho" kernel.shmmni = 4096 "> > / etc/sysctl.confecho" kernel.sem = 25032000 100128 "> > / etc/sysctl. Confecho "net.ipv4.ip_local_port_range = 9000 65500" > > / etc/sysctl.confecho "net.core.rmem_default = 262144" > > / etc/sysctl.confecho "net.core.rmem_max = 4194304" > > / etc/sysctl.confecho "net.core.wmem_default = 262144" > > / etc/sysctl.confecho "net.core.wmem_max = 1048586" > > / etc/sysctl.confecho "net.ipv4.tcp_wmem = 262144 262144 262144" > / etc/sysctl.confecho "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 from 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)? YesWarning: Permanently added '192.168.199.163' (RSA) to the list of known hosts.root@192.168.199.163's password: db_1.zip 100% 2366MB 30.0MB/s 01:19

4. Extract the zip file

[root@localhost oracle] # unzip-d / db_1.zip [root@localhost oracle] # chown-R oracle.oinstall / u01 /

5. Execute the Clone command

[oracle@localhost ~] $cd / u01/app/oracle/product/11.2.0/db_1/clone/bin/ [Oracle @ localhost bin] $$ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE= "/ u01/app/oracle/" ORACLE_HOME= "/ u01/app/oracle/product/11.2.0/db_1" OSDBA_GROUP=dba OSOPER_GROUP=oper-defaultHomeName

The execution result is as follows

. / runInstaller-clone-waitForCompletion "ORACLE_BASE=/u01/app/oracle/", "ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1", "oracle_install_OSDBA=dba"oracle_install_OSOPER=oper"-defaultHomeName-defaultHomeName-silent-noConfig-nowait Starting Oracle Universal Installer...Checking swap space: must be greater than 500 MB. Actual 1999 MB PassedPreparing to launch Oracle Universal Installer from / tmp/OraInstall2015-08-22-05-13-13AM. Please wait... Oracle Universal Installer, Version 11.2.0.4.0 ProductionCopyright (C) 1999, 2013, Oracle. All rights reserved.You can find the log of this install session at: / u01/app/oraInventory/logs/cloneActions2015-08-22 0513-13AM.log. . 100% Done.Installation in progress (Saturday, August 22, 2015 5:13:31 AM CST). 78% Done.Install successfulLinking in progress (Saturday, August 22, 2015 5:13:38 AM CST) Link successfulSetup in progress (Saturday, August 22, 2015 5:13:41 AM CST) Setup successfulEnd of install phases. (Saturday, August 22, 2015 5:14:06 AM CST) WARNING:A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system.To register the new inventory please run the script'/ u01 with root privileges. If you do not register the inventory You may not be able to update or patch the products you installed.The following configuration scripts need to be executed as the "root" user./u01/app/oraInventory/orainstRoot.sh/u01/app/oracle/product/11.2.0/db_1/root.shTo execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts The cloning of OraHome1 was successful.Please check'/ u01/app/oraInventory/logs/cloneActions2015-08-22 root 05-13-13 AM.log 'for more details.

6. Use the root user to run the above two scripts

[root@localhost ~] # / u01/app/oraInventory/orainstRoot.sh [root@localhost ~] # / u01/app/oracle/product/11.2.0/db_1/root.sh

Installation complete!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report