2009年4月14日星期二

redhat 5.1 + oracle 11g + asm installation notebook

redhat 5.1 + oracle 11g + asm installation notebook

[root@crdb11gstd Server]# rpm -ivh elfutils-libelf-devel*.x86_64.rpm glibc-devel-2* gcc-4*.x86_64.rpm gcc-c++-4*.x86_64.rpm libstdc++-devel-4*.x86_64.rpm glibc-headers*.x86_64.rpm libgomp*.x86_64.rpm
warning: elfutils-libelf-devel-0.125-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package glibc-headers-2.5-18 is already installed
package libgomp-4.1.2-14.el5 is already installed
package glibc-devel-2.5-18 is already installed
package gcc-4.1.2-14.el5 is already installed
package libstdc++-devel-4.1.2-14.el5 is already installed
package gcc-c++-4.1.2-14.el5 is already installed
package elfutils-libelf-devel-static-0.125-3.el5 is already installed
package elfutils-libelf-devel-0.125-3.el5 is already installed


[root@crdb11gstd Server]# rpm -ivh compat-libstdc++-33* libaio-devel*.x86_64.rpm
warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package compat-libstdc++-33-3.2.3-61 is already installed



[root@crdb11gstd Server]# rpm -ivh sysstat*
warning: sysstat-7.0.0-3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:sysstat ########################################### [100%]
[root@crdb11gstd Server]#


[root@crdb11gstd Server]# /usr/sbin/groupadd oinstall
[root@crdb11gstd Server]# /usr/sbin/groupadd dba
[root@crdb11gstd Server]# /usr/sbin/useradd -m -g oinstall -G dba oracle
[root@crdb11gstd Server]# id oracle
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)

[root@crdb11gstd Server]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app



[root@crdb11gstd Server]# cat >> /etc/sysctl.conf <> kernel.shmmni = 4096
> kernel.sem = 250 32000 100 128
> fs.file-max = 65536
> net.ipv4.ip_local_port_range = 1024 65000
> net.core.rmem_default=4194304
> net.core.wmem_default=262144
> net.core.rmem_max=4194304
> net.core.wmem_max=262144
> EOF
[root@crdb11gstd Server]# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144
[root@crdb11gstd Server]#


[root@crdb11gstd Server]# cat >> /etc/security/limits.conf <> oracle soft nproc 2047
> oracle hard nproc 16384
> oracle soft nofile 1024
> oracle hard nofile 65536
> EOF



[root@crdb11gstd Server]# cat >> /etc/pam.d/login <> session required /lib/security/pam_limits.so
> EOF
[root@crdb11gstd Server]#


[root@crdb11gstd Server]# cat >> /etc/profile <> if [ \$USER = "oracle" ]; then
> if [ \$SHELL = "/bin/ksh" ]; then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> umask 022
> fi
> EOF
[root@crdb11gstd Server]#


[root@crdb11gstd Server]# cat >> /etc/csh.login <> if ( \$USER == "oracle" ) then
> limit maxproc 16384
> limit descriptors 65536
> umask 022
> endif
> EOF
[root@crdb11gstd Server]#



[root@crdb11gstd Server]# uname -r
2.6.18-53.el5
[root@crdb11gstd Server]# uname -a
Linux crdb11gstd.localdomain 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
[root@crdb11gstd Server]#

[root@crdb11gstd Server]# uname -rm
2.6.18-53.el5 x86_64


http://www.oracle.com/technology/software/tech/linux/asmlib/rhel5.html

* oracleasm-support-2.1.3-1.el5.x86_64.rpm
* oracleasmlib-2.0.4-1.el5.x86_64.rpm

oracleasm-2.6.18-53.el5-2.0.4-1.el5.x86_64.rpm


[root@crdb11gstd software]# rpm -Uvh oracleasm-support-2.1.3-1.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@crdb11gstd software]# rpm -Uvh oracleasm-2.6.18-53.el5-2.0.4-1.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-53.el5########################################### [100%]
[root@crdb11gstd software]# rpm -Uvh oracleasmlib-2.0.4-1.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@crdb11gstd software]#


[root@crdb11gstd init.d]# ./oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]


[root@crdb11gstd init.d]# ./oracleasm
Usage: ./oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
[root@crdb11gstd init.d]# ./oracleasm createdisk VOL1 /dev/sda2
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@crdb11gstd init.d]# ./oracleasm createdisk VOL2 /dev/sda3
Marking disk "VOL2" as an ASM disk: [ OK ]
[root@crdb11gstd init.d]# ./oracleasm createdisk VOL3 /dev/sda5
Marking disk "VOL3" as an ASM disk: [ OK ]
[root@crdb11gstd init.d]# ./oracleasm createdisk VOL4 /dev/sda6
Marking disk "VOL4" as an ASM disk: [ OK ]
[root@crdb11gstd init.d]# ./oracleasm listdisks
VOL1
VOL2
VOL3
VOL4
[root@crdb11gstd init.d]#



接下来就是按照asm方式安装oracle software
dbca创建数据库了,不做过多描述了

没有评论:

发表评论