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-ASM installation tutorial

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

Share

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

There are a lot of repetitions between installing ASM database and installing RAC, so the installation document of RAC is changed and the ASM-managed database is successfully installed. The installation environment is CENTOS 6.5_64 bit and the database to be installed is version 11 gr2.

The installation steps are as follows:

Create operating system groups and users

groupadd -g 501 oinstall

groupadd -g 502 dba

groupadd -g 504 asmadmin

groupadd -g 506 asmdba

groupadd -g 507 asmoper

useradd -u 501 -g oinstall -G dba,asmadmin,asmdba,asmoper grid

useradd -u 502 -g oinstall -G dba,asmdba oracle

Change user password

passwd grid

passwd oracle

2. vim /etc/hosts edit file

192.168.62.102 asm

3. Configure kernel parameters and resource limits for oracle and grid users

vim /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 4294967295

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 = 1048576

/sbin/sysctl -p

vim /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

vim /etc/pam.d/login

session required pam_limits.so

vim /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

umask 022

fi

4. Turn off SELINUX function

vim /etc/selinux/config

SELINUX=disabled

restart the system

[/etc/init.d/oracleasm createdisk DATA1 /dev/sdb1 error reported in this step, solved after restart]

4. Create relevant paths for GI database software

#Create Inventory Path

mkdir -p /u01/app/oraInventory

chown -R grid:oinstall /u01/app/oraInventory

chmod -R 775 /u01/app/oraInventory

#Create GI Home Directory

mkdir -p /u01/app/grid

chown -R grid:oinstall /u01/app/grid

chmod -R 775 /u01/app/grid

#Create database home directory

mkdir -p /u01/app/oracle

mkdir /u01/app/oracle/cfgtoollogs

chown -R oracle:oinstall /u01/app/oracle

chmod -R 775 /u01/app/oracle

#Switch to the corresponding user action

# vim ~/.bash_profile

#Grid Add

export ORACLE_SID=+ASM

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/11.2.0/grid

export PATH=$ORACLE_HOME/bin:$PATH

#oracleAdd

export ORACLE_SID=orcl

export ORACLE_UNQNAME=orcl

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export PATH=$ORACLE_HOME/bin:$PATH

5. Confirm that the following OS packages are installed

sh yum.sh

yum install binutils* -y

yum install compat* -y

yum install elfutils* -y

yum install gcc* -y

yum install glibc* -y

yum install kernel* -y

yum install ksh* -y

yum install libaio* -y

yum install libgcc* -y

yum install libgomp* -y

yum install libstdc* -y

yum install make* -y

yum install sysstat* -y

yum install unixODBC* -y

yum install libcap* -y

yum install -y compat-libcap1*

yum install -y compat-libstdc*

6. Use fdisk /dev/sdb to allocate disk space, and allocate 10 GB of space into three disks: /dev/sdb1,/dev/sdb2, and/dev/sdb3.

n p w

Device Boot Start End Blocks Id System

/dev/sdb1 1 393 3156741 83 Linux

/dev/sdb2 394 786 3156772+ 83 Linux

/dev/sdb3 787 1179 3156772+ 83 Linux

7. Close the firewall

/etc/init.d/iptables stop;

chkconfig iptables off;

Install asmlib and create ASM disks

Download oracleasm, find the relevant version download at the following address:

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

yum -y install kmod-oracleasm.x86_64

rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm

rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm

9. Create ASM hard disk

/etc/init.d/oracleasm configure

Default user to own the driver interface [oracle]: grid

Default group to own the driver interface [oinstall]:

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

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

/etc/init.d/oracleasm enable

/etc/init.d/oracleasm createdisk DATA1 /dev/sdb1

/etc/init.d/oracleasm createdisk DATA2 /dev/sdb2

/etc/init.d/oracleasm createdisk DATA3 /dev/sdb3

/etc/init.d/oracleasm listdisks

10. Install GI

Switch to grid User:

exprot LANG=en_US

Go to the package folder and execute./ runInstaller, the next is through the interface operation, follow the interface prompts step by step down.

When Adding daemon to inittab appears while executing root.sh script, immediately execute the following command using root in another window (otherwise root.sh script will fail):

/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/nullbs=1024 count=1,

until it gets stuck.

11. Install database software

Switch to oracle user

exprot LANG=en_US

Go to the database folder and execute./ runInstaller, follow the interface prompts step by step.

12. dbca creates an instance

When creating an instance, select ASM for storage type, and select the same as for normal installation.

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

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report