码迷,mamicode.com
首页 > 数据库 > 详细

Oracle 11203 + ASM安装 for HP UX

时间:2015-06-11 16:17:33      阅读:836      评论:0      收藏:0      [点我收藏+]

标签:

一,安装前准备

1.创建所需组和用户

  1. /usr/sbin/groupadd -g 1000 oinstall
  2. /usr/sbin/groupadd -g 1020 asmadmin
  3. /usr/sbin/groupadd -g 1021 asmdba
  4. /usr/sbin/groupadd -g 1022 asmoper
  5. /usr/sbin/groupadd -g 1031 dba
  6. /usr/sbin/groupadd -g 1032 oper
  7. useradd -u 1100-g oinstall -G dba,asmadmin,asmdba -d /home/grid -m grid
  8. ##上面grid用户要是不在dba用户组的话,在dbca建库的时候会报错,具体见下文报错信息
  9. useradd -u 1101-g oinstall -G dba,asmdba -d /home/oracle -m oracle
  10. passwd grid
  11. passwd oracle

这里密码默认:grid/grid oracle/oracle

2.创建所需目录

  1. mkdir -p /oracle/app/11.2.0/grid
  2. mkdir -p /oracle/app/grid
  3. chown -R grid:oinstall /oracle
  4. mkdir /oracle/app/oracle
  5. chown oracle:oinstall /oracle/app/oracle
  6. chmod -R 775/u01
  7. chown grid:oinstall /oracle/app
  8. chmod -R 775/oracle/app

3.检查符合的连接是否存在,如果不存在则需要创建

  1. cd /usr/lib
  2. ln -s libX11.3 libX11.sl
  3. ln -s libXIE.2 libXIE.sl
  4. ln -s libXext.3 libXext.sl
  5. ln -s libXhp11.3 libXhp11.sl
  6. ln -s libXi.3 libXi.sl
  7. ln -s libXm.4 libXm.sl
  8. ln -s libXp.2 libXp.sl
  9. ln -s libXt.3 libXt.sl
  10. ln -s libXtst.2 libXtst.sl

4.修改内核参数

  1. kctune -h -B nproc=8192
  2. kctune -h -B semmnu=8188
  3. kctune -h -B semmni=4096
  4. kctune -h -B maxuprc=4091
  5. kctune -h -B filecache_min=2%
  6. kctune -h -B filecache_max=2%
  7. kctune -h -B shmmax=34359738368
  8. kctune -h -B maxssiz=401604608
  9. kctune -h -B maxfiles_lim=63488
  10. kctune -h -B maxdsiz_64bit=4396972765184
  11. kctune -h -B max_thread_proc=5000
  12. kctune -h -B maxdsiz=4294963200
  13. kctune -h -B maxfiles=8192
  14. kctune -h -B maxssiz_64bit=2147483648
  15. kctune -h -B swchunk=8192
  16. kctune -h -B max_async_ports=6000
  17. kctune -h -B nkthread=28704
  18. kctune -h -B semmns=32768
  19. kctune -h -B shmmni=16384
  20. kctune -h -B ksi_alloc_max=32768
  21. kctune -h -B ncsize=35840
  22. kctune -h -B ninode=34816
  23. kctune -h -B shmseg=512

重启系统生效!
下面是oracle官方推荐值:

ParameterRecommended Formula or Value
ksi_alloc_max 32768
executable_stack 0
max_thread_proc 1024
maxdsiz 1073741824 (1 GB)
maxdsiz_64bit 2147483648 (2 GB)
maxssiz 134217728 (128 MB)
maxssiz_64bit 1073741824 (1 GB)
maxuprc 3686
msgmni 4096
msgtql 4096
ncsize 35840
maxfiles_lim 63488
maxfiles 1024
nflocks 4096
ninode 34816
nkthread 7184
nproc 4096
semmni 4096
semmns 8192
semmnu 4092
semvmx 32767
shmmax 1073741824
shmmni 4096
shmseg 512
tcp_smallest_anon_port 9000
tcp_largest_anon_port 65500
udp_smallest_anon_port 9000
udp_largest_anon_port 65500

5.设置环境变量

  1. Oracle用户
  2. export ORACLE_BASE=/oracle/app/11.2.0
  3. export ORACLE_HOME=/oracle/app/11.2.0/oracle
  4. export ORACLE_UNQNAME=TTSS
  5. export ORACLE_SID=TTSS
  6. export PATH=$ORACLE_HOME/bin:$PATH
  7. grid用户
  8. export ORACLE_BASE=/oracle/app/grid
  9. export ORACLE_HOME=/oracle/app/11.2.0/grid
  10. export ORACLE_SID=+ASM
  11. export PATH=$ORACLE_HOME/bin:$PATH

6.扫描可用磁盘

  1. TTSS#[/usr/lib]/usr/sbin/ioscan -m dsf
  2. Persistent DSF Legacy DSF(s)
  3. ========================================
  4. /dev/rdisk/disk755 /dev/rdsk/c10t13d6
  5. /dev/rdsk/c7t13d6
  6. /dev/rdsk/c16t13d6
  7. /dev/rdsk/c13t13d6
  8. /dev/rdisk/disk756 /dev/rdsk/c10t13d7
  9. /dev/rdsk/c7t13d7
  10. /dev/rdsk/c16t13d7
  11. /dev/rdsk/c13t13d7
  12. /dev/rdisk/disk757 /dev/rdsk/c10t14d0
  13. /dev/rdsk/c7t14d0
  14. /dev/rdsk/c16t14d0
  15. /dev/rdsk/c13t14d0
  16. /dev/rdisk/disk758 /dev/rdsk/c10t14d1
  17. /dev/rdsk/c7t14d1
  18. /dev/rdsk/c16t14d1
  19. /dev/rdsk/c13t14d1
  20. /dev/rdisk/disk759 /dev/rdsk/c10t14d2
  21. /dev/rdsk/c7t14d2
  22. /dev/rdsk/c16t14d2
  23. /dev/rdsk/c13t14d2
  24. /dev/rdisk/disk760 /dev/rdsk/c10t14d3
  25. /dev/rdsk/c7t14d3
  26. /dev/rdsk/c16t14d3
  27. /dev/rdsk/c13t14d3
  28. /dev/rdisk/disk761 /dev/rdsk/c10t14d4
  29. /dev/rdsk/c7t14d4
  30. /dev/rdsk/c16t14d4
  31. /dev/rdsk/c13t14d4
  32. /dev/rdisk/disk762 /dev/rdsk/c10t14d5
  33. /dev/rdsk/c7t14d5
  34. /dev/rdsk/c16t14d5
  35. /dev/rdsk/c13t14d5
  36. /dev/rdisk/disk763 /dev/rdsk/c10t14d6
  37. /dev/rdsk/c7t14d6
  38. /dev/rdsk/c16t14d6
  39. /dev/rdsk/c13t14d6
  40. /dev/rdisk/disk764 /dev/rdsk/c10t14d7
  41. /dev/rdsk/c7t14d7
  42. /dev/rdsk/c16t14d7
  43. /dev/rdsk/c13t14d7
  44. /dev/rdisk/disk765 /dev/rdsk/c10t15d0
  45. /dev/rdsk/c7t15d0
  46. /dev/rdsk/c16t15d0
  47. /dev/rdsk/c13t15d0
  48. /dev/rdisk/disk766 /dev/rdsk/c10t15d1
  49. /dev/rdsk/c7t15d1
  50. /dev/rdsk/c16t15d1
  51. /dev/rdsk/c13t15d1
  52. /dev/rdisk/disk767 /dev/rdsk/c10t15d2
  53. /dev/rdsk/c7t15d2
  54. /dev/rdsk/c16t15d2
  55. /dev/rdsk/c13t15d2
  56. /dev/rdisk/disk768 /dev/rdsk/c10t15d3
  57. /dev/rdsk/c7t15d3
  58. /dev/rdsk/c16t15d3
  59. /dev/rdsk/c13t15d3
  60. /dev/rdisk/disk769 /dev/rdsk/c10t15d4
  61. /dev/rdsk/c7t15d4
  62. /dev/rdsk/c16t15d4
  63. /dev/rdsk/c13t15d4
  64. /dev/rdisk/disk770 /dev/rdsk/c10t15d5
  65. /dev/rdsk/c7t15d5
  66. /dev/rdsk/c16t15d5
  67. /dev/rdsk/c13t15d5
  68. /dev/rtape/tape1_BEST /dev/rmt/c5t3d0BEST
  69. /dev/rtape/tape1_BESTn /dev/rmt/c5t3d0BESTn
  70. /dev/rtape/tape1_BESTb /dev/rmt/c5t3d0BESTb
  71. /dev/rtape/tape1_BESTnb /dev/rmt/c5t3d0BESTnb
  72. /dev/rdisk/disk771 /dev/rdsk/c10t15d6
  73. /dev/rdsk/c7t15d6
  74. /dev/rdsk/c16t15d6
  75. /dev/rdsk/c13t15d6
  76. /dev/rdisk/disk772 /dev/rdsk/c10t15d7
  77. /dev/rdsk/c7t15d7
  78. /dev/rdsk/c16t15d7
  79. /dev/rdsk/c13t15d7
  80. /dev/rdisk/disk773 /dev/rdsk/c11t0d0
  81. /dev/rdsk/c8t0d0
  82. /dev/rdsk/c17t0d0
  83. /dev/rdsk/c14t0d0
  84. /dev/pt/pt6 /dev/rscsi/c9t0d0
  85. /dev/rscsi/c6t0d0
  86. /dev/rscsi/c15t0d0
  87. /dev/rscsi/c12t0d0
  88. /dev/rdisk/disk774 /dev/rdsk/c11t0d1
  89. /dev/rdsk/c8t0d1
  90. /dev/rdsk/c17t0d1
  91. /dev/rdsk/c14t0d1
  92. /dev/rdisk/disk775 /dev/rdsk/c11t0d2
  93. /dev/rdsk/c8t0d2
  94. /dev/rdsk/c17t0d2
  95. /dev/rdsk/c14t0d2
  96. /dev/rdisk/disk776 /dev/rdsk/c11t0d3
  97. /dev/rdsk/c8t0d3
  98. /dev/rdsk/c17t0d3
  99. /dev/rdsk/c14t0d3
  100. /dev/rdisk/disk777 /dev/rdsk/c11t0d4
  101. /dev/rdsk/c8t0d4
  102. /dev/rdsk/c17t0d4
  103. /dev/rdsk/c14t0d4
  104. /dev/rdisk/disk778 /dev/rdsk/c11t0d5
  105. /dev/rdsk/c8t0d5
  106. /dev/rdsk/c17t0d5
  107. /dev/rdsk/c14t0d5

赋权

  1. chown grid:oinstall /dev/rdisk/disk*
  2. chmod 660/dev/rdisk/disk*

7.系统补丁要求

QPKAPPS
QPKBASE

  1. #/usr/sbin/swlist -l bundle |grep QPK
  2. QPKAPPS B.11.31.1303.391ApplicationsPatchesfor HP-UX 11i v3,March2013
  3. QPKBASE B.11.31.1303.391BaseQualityPackBundlefor HP-UX 11i v3,March2013
  4. /usr/sbin/swlist -l patch | more
  5. PHKL_39747
  6. PHKL_39310
  7. PHKL_39311

8.上传软件

  1. TTSS#[/oracle/software]ls -l
  2. total 8592778
  3. -rw-r-----1 root sys 1826501696Jun814:59 p10404530_112030_HPUX-IA64_1of7.zip
  4. -rw-r-----1 root sys 1281422213Jun814:57 p10404530_112030_HPUX-IA64_2of7.zip
  5. -rw-r-----1 root sys 1288957032Jun815:00 p10404530_112030_HPUX-IA64_3of7.zip
  6. TTSS#[/oracle/software]chown oracle:oinstall *1of7.zip
  7. TTSS#[/oracle/software]chown oracle:oinstall *2of7.zip
  8. TTSS#[/oracle/software]chown grid:oinstall *3of7.zip

二,安装grid软件

直接用grid用户登录图形界面

技术分享

测试图形界面的可用性
技术分享

进入到解压的grid目录,执行./runInstaller
技术分享

跳过软件更新
技术分享

选择仅安装软件
技术分享

选择Sample Chinese
技术分享

选择合适的用户组,默认
技术分享

选择安装目录,
技术分享

清单目录
技术分享

预安装检查,有需要修改的参数点击Fix and Check again,有的参数需要重启,那么重启。

技术分享

可以省略上面的内核参数配置,直接走到这一步的时候执行脚本即可

执行完成后,点击OK

技术分享

开始安装
技术分享

技术分享

技术分享

三,安装数据库软件

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

ASMCA创建asm磁盘组
技术分享

技术分享

技术分享

密码:Grid123
技术分享

技术分享

解决:
//注意:如果上述在执行./root.sh后没有执行,/u01/app/11.2.0/grid/crs/install/roothas.pl
//那么将会出现:
Oracle Grid Infrastructure is not configured properly. ASMCA needs Oracle Grid Infrastructure to configure ASM.
解决:执行/u01/app/11.2.0/grid/crs/install/roothas.pl
技术分享
然后再点击创建
技术分享
技术分享
技术分享
技术分享
技术分享
技术分享

四,dbca建库

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享
密码:Oracle123
技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

五,安装过程成遇到的错误

1. 到97%的时候报下面的错误:

技术分享

分析参考:

  1. DBCA创建ASM数据库时遇到ORA-01031
  2. 单机ASM数据库DBCA建库96%时报错PRCR-1079,ORA-01031,CRS-2674

报上面的错误,是由于权限问题,grid用户不能使用srvctl启动数据库,可以忽略,但是退出后需要在sqlplus中使用startup命令启动数据库

修改grid用户的属组,加入到dba组
停止数据库和ASM实例,和GI软件
oracle用户
sqlplus --- > shutdown immediate
grid用户
sqlplus / as sysasm ----> shutdown immediate
crs_stop -all
crsctl stop has
不停干净的话,修改权限会报:
技术分享

2.asmca创建磁盘组的时候扫不到全部的磁盘

首先保证所有的磁盘权限没问题,即拥有者和属组,还有权限,一般是660

  1. dd if=/dev/zero of=/dev/rdisk/disk681 count=10 count=1024

有些盘不能被asm扫到,使用上面的命令格式化一下,可以了!

删除磁盘组
技术分享
在sysasm中查看(不容易啊)
技术分享

3.安装的过程中遇到这个错误,可以忽略(一个oracle的组件失败,如果不用这个组件的话直接Ignore)

技术分享

 

Oracle 11203 + ASM安装 for HP UX

标签:

原文地址:http://www.cnblogs.com/haoxiaoyu/p/605b6f76e85cc0b529a49b9aa7099f52.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!