ITPub博客

首页 > 数据库 > Oracle > Oracle 11g clone安装

Oracle 11g clone安装

原创 Oracle 作者:lucyne 时间:2015-09-08 16:29:05 0 删除 编辑
1.chang os hostname
[root@QD-137 ~]# hostname bf_test_qd_119.167.137.14_cnc
[root@QD-137 ~]# vi /etc/sysconfig/network
[root@QD-137 ~]# vi /etc/hosts

2.chang disk type
[root@QD-137 ~]# umount /home
[root@QD-137 ~]# mkfs.ext3 /dev/sda7 -L /U01
[root@QD-137 ~]# mkdir -p /U01/app/oracle
[root@QD-137 ~]# vi /etc/fstab 
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/usr              /usr                    ext3    defaults        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
/dev/shm     /tmp    tmpfs    rw,bind    0 0
LABEL=/U01     /U01   ext3   defaults,noatime,nodiratime    1 2
[root@QD-137 oracle]# mount /U01/
[root@QD-137 oracle]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             7.9G  4.9G  2.6G  66% /
/dev/sda6             7.9G  202M  7.3G   3% /var
/dev/sda5             7.9G  2.0G  5.5G  27% /usr
/dev/sda1             122M   12M  104M  10% /boot
tmpfs                  16G  4.0K   16G   1% /dev/shm
/dev/shm               16G  4.0K   16G   1% /tmp
/dev/sda7             497G  198M  471G   1% /U01

3.install rpm for oracle 11g
[root@QD-137 ~]#rpm -ivh *.rpm

4.Creating user
[root@QD-137 home]# groupadd oinstall
[root@QD-137 home]# groupadd dba
[root@QD-137 home]# chattr -i /etc/passwd /etc/shadow
[root@QD-137 home]# useradd -g oinstall -G dba  oracle

5.Configuring Kernel Parameters for Linux
[root@QD-137 home]# vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388608
kernel.shmmax = 34359738368
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 = 1048586
[root@QD-137 home]# sysctl -p

6.Checking Resource Limits for the Oracle Software Installation Users
[root@QD-137 home]# vi /etc/security/limits.conf 
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  65536
oracle              hard    nofile  65536
oracle              soft    stack   10240

7.dir and bash
[root@NJ-43 U01]# su - oracle
[oracle@bf_5001_nj_180 ~]$ vi .bash_profile  
export ORACLE_BASE=/U01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.3/db_1
export ORACLE_SID=bfodb
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATH
export LANG="en_US.UTF-8"
export NLS_LANG=american_AMERICA.UTF8
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
stty erase ^H

[root@QD-137 home]# scp oracle_1123.tar 10.32.137.14:/U01/app/oracle
[root@QD-137 oracle]# tar -xf oracle_1123.tar
[root@QD-137 home]# chown -R oracle:oinstall /U01/
[root@QD-137 home]# chmod -R 775 /U01/
[root@NJ-43 U01]# usermod  -d /U01/app/oracle oracle

8.clone
[oracle@bf_test_qd_119 bin]$ cd $ORACLE_HOME/clone/bin/
[oracle@bf_test_qd_119 bin]$ perl clone.pl ORACLE_BASE=/U01/app/oracle ORACLE_HOME=/U01/app/oracle/product/11.2.3/db_1  ORACLE_HOME_NAME=db_1
./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/U01/app/oracle" "ORACLE_HOME=/U01/app/oracle/product/11.2.3/db_1" "ORACLE_HOME_NAME=db_1" -silent -noConfig -nowait 
Starting Oracle Universal Installer...


Checking swap space: must be greater than 500 MB.   Actual 16386 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-03-21_05-09-02PM. Please wait ...Oracle Universal Installer, Version 11.2.0.3.0 Production
Copyright (C) 1999, 2011, Oracle. All rights reserved.


You can find the log of this install session at:
 /U01/app/oracle/oraInventory/logs/cloneActions2012-03-21_05-09-02PM.log
.................................................................................................... 100% Done.


Installation in progress (Wednesday, March 21, 2012 5:09:10 PM CST)
...............................................................................                                                 79% Done.
Install successful


Linking in progress (Wednesday, March 21, 2012 5:09:16 PM CST)
Link successful


Setup in progress (Wednesday, March 21, 2012 5:09:46 PM CST)
Setup successful


End of install phases.(Wednesday, March 21, 2012 5:10:08 PM 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/app/oracle/oraInventory/orainstRoot.sh' 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/oracle/oraInventory/orainstRoot.sh
/U01/app/oracle/product/11.2.3/db_1/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts
    
The cloning of db_1 was successful.
Please check '/U01/app/oracle/oraInventory/logs/cloneActions2012-03-21_05-09-02PM.log' for more details.

9.run sh scripts
[root@bf_test_qd_119 ~]# /U01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /U01/app/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.


Changing groupname of /U01/app/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@bf_test_qd_119 ~]# /U01/app/oracle/product/11.2.3/db_1/root.sh
Check /U01/app/oracle/product/11.2.3/db_1/install/root_bf_test_qd_119.167.137.13_cnc_2012-03-20_17-22-51.log for the output of root script




[root@QD-137 home]# usermod -d /home/oracle oracle
[root@QD-137 home]# chattr +i /etc/passwd /etc/shadow

10.建库(备库不需要这步)
[oracle@bf_5001_nj_180 templates]$ cd /U01/app/oracle/product/11.2.3/db_1/bin/
[oracle@bf_5001_nj_180 bin]$ ./dbca -silent -createDatabase -templateName /U01/app/oracle/product/11.2.3/db_1/assistants/dbca/templates/General_Purpose.dbc -gdbname bfodb -sid bfodb  -characterSet UTF8
Enter SYS user password: 
 
Enter SYSTEM user password: 
 
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/U01/app/oracle/cfgtoollogs/dbca/bfodb/bfodb.log" for further details.
[oracle@bf_5001_nj_180 bin]$ ps -ef | grep ora
root     25299 22099  0 11:19 pts/0    00:00:00 su - oracle
oracle   25300 25299  0 11:19 pts/0    00:00:00 -bash
root     27514 27403  0 13:32 pts/1    00:00:00 su - oracle
oracle   27515 27514  0 13:32 pts/1    00:00:00 -bash
oracle   27679     1  0 13:34 ?        00:00:00 ora_pmon_bfodb
oracle   27681     1  0 13:34 ?        00:00:00 ora_psp0_bfodb
oracle   27683     1  0 13:34 ?        00:00:00 ora_vktm_bfodb
oracle   27687     1  0 13:34 ?        00:00:00 ora_gen0_bfodb
oracle   27689     1  0 13:34 ?        00:00:00 ora_diag_bfodb
oracle   27691     1  0 13:34 ?        00:00:00 ora_dbrm_bfodb
oracle   27693     1  0 13:34 ?        00:00:00 ora_dia0_bfodb
oracle   27695     1  0 13:34 ?        00:00:00 ora_mman_bfodb
oracle   27697     1  0 13:34 ?        00:00:00 ora_dbw0_bfodb
oracle   27699     1  0 13:34 ?        00:00:00 ora_dbw1_bfodb
oracle   27701     1  0 13:34 ?        00:00:00 ora_lgwr_bfodb
oracle   27703     1  0 13:34 ?        00:00:00 ora_ckpt_bfodb
oracle   27705     1  0 13:34 ?        00:00:00 ora_smon_bfodb
oracle   27707     1  0 13:34 ?        00:00:00 ora_reco_bfodb
oracle   27709     1  0 13:34 ?        00:00:00 ora_mmon_bfodb
oracle   27711     1  0 13:34 ?        00:00:00 ora_mmnl_bfodb
oracle   27713     1  0 13:34 ?        00:00:00 ora_d000_bfodb
oracle   27715     1  0 13:34 ?        00:00:00 ora_s000_bfodb
oracle   27725     1  0 13:34 ?        00:00:00 ora_qmnc_bfodb
oracle   27749     1  0 13:34 ?        00:00:00 ora_cjq0_bfodb
oracle   27751     1  0 13:34 ?        00:00:00 ora_q000_bfodb
oracle   27753     1  0 13:34 ?        00:00:00 ora_q001_bfodb
oracle   27773 25300  0 13:34 pts/0    00:00:00 ps -ef
oracle   27774 25300  0 13:34 pts/0    00:00:00 grep ora

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26390465/viewspace-1794506/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
. . 一个 DBA. . .

注册时间:2012-01-06

  • 博文量
    84
  • 访问量
    741660