linux装11g asm rac

  • A+
所属分类:技术

chatGPT账号

1、检查系统环境
内存>=1.5GB
grep MemTotal /proc/meminfo
grep "model name" /proc/cpuinfo
grep SwapTotal /proc/meminfo
free
df -k /dev/shm/
uname -m
df -h /tmp
df -h
uname -r

2、安装软件包
rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel \
gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio \
libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

rac1&rac2
cp libaio-devel* sysstat* unixODBC-2* unixODBC-devel* /root/rpm
rpm -ivh *.rpm --nodeps

3、修改系统参数
vi /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

sysctl -p

vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

vi /etc/pam.d/login
session required pam_limits.so

vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

rac1&rac2
vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.56.11 rac1
192.168.56.22 rac2
10.10.10.11 rac1priv
10.10.10.22 rac2priv
192.168.56.123 rac1vip
192.168.56.124 rac2vip
192.168.56.125 racscanip

4、增加组、用户、目录
groupadd -g 1000 oinstall
groupadd -g 1100 asmadmin
groupadd -g 1200 dba
groupadd -g 1300 asmdba
groupadd -g 1301 asmoper
useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -d /home/grid grid
useradd -u 1101 -g oinstall -G dba,asmdba -d /home/oracle oracle

echo grid | passwd --stdin grid
echo oracle | passwd --stdin oracle
mkdir -p /oracle/app/oraInventory
chown -R grid:oinstall /oracle/app/oraInventory
chmod -R 775 /oracle/app/oraInventory

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

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

mkdir -p /oracle/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /oracle/app/oracle/product/11.2.0/db_1
chmod -R 775 /oracle/app/oracle/product/11.2.0/db_1

5、配置环境变量、互信
rac1
su - grid
vi .bash_profile
export ORACLE_SID=+ASM1
export ORACLE_BASE=/oracle/app/grid
export ORACLE_HOME=/oracle/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH

rac2
su - grid
vi .bash_profile
export ORACLE_SID=+ASM2
export ORACLE_BASE=/oracle/app/grid
export ORACLE_HOME=/oracle/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH

rac1
root用户执行
/software/grid/sshsetup/sshUserSetup.sh -user grid -hosts "node1 node2" -advanced -noPromptPassphrase
/software/grid/sshsetup/sshUserSetup.sh -user oracle -hosts "node1 node2" -advanced -noPromptPassphrase

rac1&rac2
su - grid
ssh rac1 date
ssh rac2 date
ssh rac1priv date
ssh rac2priv date

su - oracle
ssh rac1 date
ssh rac2 date
ssh rac1priv date
ssh rac2priv date
6、配置裸设备
vi /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sdb",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd",RUN+="/bin/raw /dev/raw/raw3 %N"
KERNEL=="raw*",OWNER="grid" GROUP="asmadmin",MODE="0660"

start_udev
ls -l /dev/raw
chown grid:oinstall /dev/sdb*
chmod 660 /dev/sdb*
7、开始安装
cd /soft/grid/
./runInstaller

step 5 of 16
SCAN NAME:racscanip
step 6 of 16
rac1 rac1vip
rac2 rac2vip
step 7 of 16
eth0 172.168.56.0 public
eth1 10.10.10.0 private
step 8 of 16
Oracle ASM
step 9 of 16
Disk Group Name:griddg
Redundancy:External
Disk Path:/dev/raw/raw3
step 13 of 16
Oracle Base:/oracle/app/grid
Software Location:/oracle/11.2.0/grid

本文由 路远 首发于【路远网http://www.luyuan.io)】未经允许不得以任何方式转载,违者必将追究法律责任。

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的电报
  • 这是我的电报扫一扫
  • weinxin
chatGPT账号
路远

发表评论

您必须登录才能发表评论!