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

Oracle DataBase single instance using ASM case (2)-- Environment preparation of Oracle 11g

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

Share

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

Oracle DataBase single instance using ASM case (2)-- Environment preparation of Oracle 11g

System environment:

Operating system: RedHat EL5 (64)

Oracle software: Oracle 11gR2, Oracle GI

For Oracle 11g to use ASM as a storage system, you must build an environment for Oracle GI.

1. Configure the system environment

1) establish users and groups (need to establish grid users)

[root@node1 ~] # groupadd-g 200 oinstall

[root@node1] # groupadd-g 201 dba

[root@node1] # groupadd-g 202 oper

[root@node1] # groupadd-g 203 asmadmin

[root@node1 ~] # groupadd-g 204 asmoper

[root@node1 ~] # groupadd-g 205 asmdba

[root@node1] # useradd-u 200-g oinstall-G dba,asmdba,oper oracle

[oracle@node1 ~] $id oracle

Uid=200 (oracle) gid=200 (oinstall) groups=200 (oinstall), 201 (dba), 202 (oper), 205 (asmdba)

[root@node1] # useradd-u 201-g oinstall-G asmadmin,asmdba,asmoper,oper,dba grid

2) set up the corresponding installation directory

[root@node1] # mkdir-p / u01/app/oraInventory

[root@node1] # chown-R grid:oinstall / u01/app/oraInventory/

[root@node1] # chmod-R 775 / u01/app/oraInventory/

[root@node1] # mkdir-p / u01/11.2.0/grid

[root@node1] # chown-R grid:oinstall / u01/11.2.0/grid/

[root@node1] # chmod-R 775 / u01/11.2.0/grid/

[root@node1] # mkdir-p / u01/app/oraInventory/

[root@node1] # mkdir-p / u01/app/oracle

[root@node1] # mkdir-p / u01/app/oracle/cfgtoollogs

[root@node1] # mkdir-p / u01/app/oracle/product/11.2.0/db_1

[root@node1] # chown-R oracle:oinstall / u01/app/oracle

[root@node1] # chmod-R 775 / u01/app/oracle

3) set user environment variables

Oracle users:

Export EDITOR=vi

Export ORACLE_SID=prod

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

Umask 022

Grid users:

Export EDITOR=vi

Export ORACLE_SID=+ASM

Export ORACLE_BASE=/u01/app/oracle

Export GRID_HOME=/u01/11.2.0/grid

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export THREADS_FLAG=native

Export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

Umask 022

4) configure system kernel parameters

[root@node1 ~] # / etc/sysctl.conf

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmall = 2097152

Kernel.shmmax = 536870912

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@node1 ~] # cat / etc/security/limits.conf

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Oracle soft stack 10240

Grid soft nproc 2047

Grid hard nproc 16384

Grid soft nofile 1024

Grid hard nofile 65536

Grid soft stack 10240

[root@node1 ~] # cat / etc/pam.d/login

Session required / lib/security/pam_limits.so

[root@node1 ~] # / etc/profile

If [$USER = "oracle"] | | [$USER = "grid"]; then

If [$SHELL = "/ bin/ksh"]; then

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

Fi

5) install the required software packages

Configure the yum environment:

[root@node1 yum.repos.d] # cd / etc/yum.repos.d

[root@node1 yum.repos.d] # cat yum.repo

[Base]

Name=Red Hat Enterprise Linux

Baseurl= file:///media/Server

Enabled=1

Gpgcheck=0

Gpgkey= file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Mount RH EL5, install ISO, and install the following software packages:

Libaio-0.3.106-5

Libaio-devel-0.3.106-5

Libaio-0.3.106-5

Sysstat-7.0.2-3.el5

Unix2dos-2.2-26.2.3.el5

UnixODBC-2.2.11-7.1

UnixODBC-kde-2.2.11-7.1

Unix2dos-2.2-26.2.3.el5

Dos2unix-3.1-27.2.el5

UnixODBC-devel-2.2.11-7.1

6) Network environment

[root@bjsrv ~] # cat / etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost

192.168.8.128 bjsrv

2. Configure the ASM storage environment

1) create a disk partition

[root@node1 ~] # fdisk-l

Disk / dev/sdc: 21.4 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/ dev/sdc1 1 487 3911796 83 Linux

/ dev/sdc2 488 974 3911827 + 83 Linux

/ dev/sdc3 975 2610 13141170 5 Extended

/ dev/sdc5 975 1461 3911796 83 Linux

/ dev/sdc6 1462 1948 3911796 83 Linux

/ dev/sdc7 1949 2192 1959898 + 83 Linux

/ dev/sdc8 2193 2436 1959898 + 83 Linux

/ dev/sdc9 2437 2610 1397623 + 83 Linux

2) install ASM software package

(ASM package needs to be installed for Linux and Windows, which can be downloaded from Oracle OTN. Note that it matches the kernel of the Linux system)

Http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html

[root@bjsrv] # uname-a

Linux bjsrv 2.6.18-194.el5 # 1 SMP Tue Mar 16 21:52:39 EDT 2010 x86 "64 GNU/Linux

[root@bjsrv asm] # ls-l

-rwxr--r-- 1 oracle oinstall 137486 May 26 04:01 oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm

-rwxr--r-- 1 oracle oinstall 14176 May 26 03:48 oracleasmlib-2.0.4-1.el5.x86_64.rpm

-rwxr--r-- 1 oracle oinstall 90225 May 26 03:48 oracleasm-support-2.1.8-1.el5.x86_64.rpm

[root@bjsrv asm] # rpm-vih oracleasm-support-2.1.8-1.el5.x86_64.rpm

Warning: oracleasm-support-2.1.8-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... # [100%]

1:oracleasm-support # # [100%]

[root@bjsrv asm] # rpm-vih oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm

Warning: oracleasm-2.6.18-194.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... # [100%]

1:oracleasm-2.6.18-194.el### [100%]

[root@bjsrv asm] # rpm-ivh oracleasmlib-2.0.4-1.el5.x86_64.rpm

Warning: oracleasmlib-2.0.4-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... # [100%]

1:oracleasmlib # # [100%]

3) configure ASM

[root@bjsrv asm] # service 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 [grid]:

Default group to own the driver interface [asmadmin]:

Start Oracle ASM library driver on boot (yzone) [y]:

Scan for Oracle ASM disks on boot (yzone) [y]:

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver: [OK]

Scanning the system for Oracle ASMLib disks: [OK]

4) create ASM disk

[root@bjsrv asm] # service oracleasm createdisk ASM_DSK1 / dev/sdc1

Marking disk "ASM_DSK1" as an ASM disk: [OK]

[root@bjsrv asm] # service oracleasm createdisk ASM_DSK2 / dev/sdc2

Marking disk "ASM_DSK2" as an ASM disk: [OK]

[root@bjsrv asm] # service oracleasm createdisk ASM_DSK3 / dev/sdc5

Marking disk "ASM_DSK3" as an ASM disk: [OK]

[root@bjsrv asm] # service oracleasm createdisk ASM_DSK4 / dev/sdc6

Marking disk "ASM_DSK4" as an ASM disk: [OK]

[root@bjsrv asm] # service oracleasm listdisks

ASM_DSK1

ASM_DSK2

ASM_DSK3

ASM_DSK4

[root@bjsrv asm] #

@ at this point, the system environment is basically ready

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