科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网服务器频道虚拟化/云计算通过VMWARE虚拟机搭建Oracle 10g R2 R

通过VMWARE虚拟机搭建Oracle 10g R2 R

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

本文讲解了通过VMWARE虚拟机搭建Oracle 10g R2 R的过程。

来源:IT认证考试 2010年9月24日

关键字:

  • 评论
  • 分享微博
  • 分享邮件

在本页阅读全文(共9页)

  Pre-installation of Oracle 10g

  ● Verify the package

  “rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \ gnome-libs libsstdc++ libstdc++-devel make pdksh sysstat xscreensaver”

  All of the packages are installed.

  ● Change the /etc/hosts

  Add the bold lines:

  vi /etc/hosts 127.0.0.1 localhost.localdomain localhost #Public IP 192.168.10.101 rac01 192.168.10.102 rac02 #Virtual IP 192.168.10.10 rac01-vip 192.168.10.20 rac02-vip #Private IP 10.10.10.101 rac01-priv 10.10.10.102 rac02-priv

  ● Create the Oracle Groups and User Account

  [root@node1 ~]# groupadd oinstall [root@node1 ~]# groupadd dba [root@node1 ~]# useradd -d /home/oracle -g oinstall -G dba oracle [root@node1 ~]# passwd oracle password is “nhy67ujm” [root@node1 ~]# id oracle uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)

  The user ID and group ID must be the same on all nodes. So add user ID at node2 as following:

  [root@node2 ~]# groupadd –g 502 oinstall [root@node2 ~]# groupadd –g 503 dba [root@node2 ~]# useradd –d /home/oracle –u 501 -g oinstall –G dba oracle

  ● Modify the init parameter file of oracle user

  [root@node1 ~]# vi /home/oracle/.bash_profile #Add as following: #ORACLE Settings export TMP=/tmp export TEMP=$TMP export TMPDIR=$TMP export ORACLE_BASE=/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORACLE_SID=pcard1 export ORACLE_TERM=xterm export ORACLE_CRS_HOME=$ORACLE_BASE/crs_home export CRS_HOME=$ORACLE_CRS_HOME export NLS_LANGUAGE=AMERICAN export PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$ORACLE_CRS_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib/ export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib #ulimit -u 16384 -n 65536 umask 022 [root@node1 ~]# mkdir /oracle [root@node1 ~]# chown oracle.oinstall /oracle

  Modify the kernel parameter

  [root@node1 ~]# vi /etc/sysctl.conf kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 658576 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 1048576 net.core.wmem_max = 1048576

  Change the limits of oracle user

  [root@node1 ~]# vi /etc/security/limits.conf #Add: oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 [root@node1 ~]# vi /etc/pam.d/login #Add: session required /lib/security/pam_limits.so

  Create Shared Disks

  [root@node1 ~]# fdisk /dev/sdb

  The red bold characters are those need to input. Command (m for help): n

  Command (m for help): p

  1

  Enter

  Enter

  Command (m for help): w

  Repeat above steps (sdc,sdd,sde…)。 Once all the disks are portioned, the result can be seen by the following command:

  ls /dev sd*

  /dev/sda /dev/sdb /dev/sdd /dev/sdf /dev/sdh /dev/sdj /dev/sdl

  /dev/sda1 /dev/sdb1 /dev/sdd1 /dev/sdf1 /dev/sdh1 /dev/sdj1 /dev/sdl1

  /dev/sda2 /dev/sdc /dev/sde /dev/sdg /dev/sdi /dev/sdk

  /dev/sda3 /dev/sdc1 /dev/sde1 /dev/sdg1 /dev/sdi1 /dev/sdk1

  Edit /etc/sysconfig/rawdevices, add the following lines:

  vi /etc/sysconfig/rawdevices

  /dev/raw/raw1 /dev/sdb1

  /dev/raw/raw2 /dev/sdc1

  /dev/raw/raw3 /dev/sdd1

  /dev/raw/raw4 /dev/sde1

  /dev/raw/raw5 /dev/sdf1

  /dev/raw/raw6 /dev/sdg1

  /dev/raw/raw7 /dev/sdh1

  /dev/raw/raw8 /dev/sdi1

  /dev/raw/raw9 /dev/sdj1

  /dev/raw/raw10 /dev/sdk1

  /dev/raw/raw11 /dev/sdl1

  Restart the rawdevices service using the following command.

  service rawdevices restart

  Modify the default setting:

  chkconfig rawdevices on

  Run the following commands and add them the /etc/rc.local file.

  chown root:oinstall /dev/raw/raw1

  chown root:oinstall /dev/raw/raw2

  chown oracle:oinstall /dev/raw/raw3

  chown oracle:oinstall /dev/raw/raw4

  chown oracle:oinstall /dev/raw/raw5

  chown oracle:oinstall /dev/raw/raw6

  chown oracle:oinstall /dev/raw/raw7

  chown oracle:oinstall /dev/raw/raw8

  chown oracle:oinstall /dev/raw/raw9

  chown oracle:oinstall /dev/raw/raw10

  chown oracle:oinstall /dev/raw/raw11

  chmod 660 /dev/raw/raw1

  chmod 660 /dev/raw/raw2

  chmod 644 /dev/raw/raw3

  chmod 644 /dev/raw/raw4

  chmod 644 /dev/raw/raw5

  chmod 660 /dev/raw/raw6

  chmod 660 /dev/raw/raw7

  chmod 660 /dev/raw/raw8

  chmod 660 /dev/raw/raw9

  chmod 660 /dev/raw/raw10

  chmod 660 /dev/raw/raw11

  或者:修改 /etc/udev/permissions.d/50-udev.per missions。原始设备在引导时会重新映射。默认情况下,在引导时原始设备的拥有者将更改为 root 用户。如果拥有者不是 oracle 用户,则 ASM 在访问共享分区时会出现问题。在 /etc/udev/permissions.d/50-udev.permissions 中为原始行”raw/*:root:disk:0660″添加注释,然后添加一个新行”raw/*:oracle:dba:0660″。

 

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章