Linux 6.5(Oracle 11.2.0.4)单实例ASM安装

Linux 6.5(Oracle 11.2.0.4)单实例ASM安装

1、解析主机、配置网络等
/etc/hosts
 /etc/sysconfig/network

/etc/init.d/NetworkManager stop
 chkconfig NetworkManager off
 iptables -F
 service iptables save
 sed -ri 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
 2、配置yum
 cd /etc/yum.repos.d/
 touch yum_oel5.repo
 vi yum_oel5.repo

添加以下内容:
[oel6]
 name=oel6
 baseurl=file:///mnt/Server
 gpgcheck=0
 enabled=1

yum clean all
 yum repolist
 yum list

yum install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc- gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh ksh compat-libcap1

Pdksh 一定要先装,不然后面会报错的
3、修改系统参数
 调整内核参数,并使其生效
vi /etc/sysctl.conf
 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
 fs.aio-max-nr = 1048576

sysctl -p

修改limits.conf

vi /etc/security/limits.conf

oracle settings

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 1024

修改/etc/pam.d/login
 vi /etc/pam.d/login
 session required /lib/security/pam_limits.so
 session required pam_limits.so

修改/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

修改/etc/csh.login

if ( $USER == "oracle" ) then
 limit maxproc 16384
 limit deors 65536
 endif
 4、
--添加用户和组(非Oracle Linux环境配置)

groupadd -g 501 oinstall
 groupadd -g 502 dba
 groupadd -g 503 oper
 groupadd -g 504 asmadmin
 groupadd -g 505 asmdba
 groupadd -g 506 asmoper

useradd -u 500 -g oinstall -G dba,asmdba,asmadmin,oper oracle
 useradd -u 507 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid

注意,oper组不是必须的,dba,asmdba,asmadmin必须有

--修改grid和oracle用户密码

passwd oracle
 passwd grid

--配置环境变量

grid:

export ORACLE_SID=+ASM
 export ORACLE_BASE=/home/u01/grid
 export ORACLE_HOME=$ORACLE_BASE/11.2.0
 export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin/:
 export NLS_LANG=American_america.ZHS16GBK
 export TEMP=/tmp
 export TMP=/tmp
 export TMPDIR=/tmp
 umask 022

oracle:

ORACLE_SID=ydasm; export ORACLE_SID
 ORACLE_BASE=/home/u01/oracle; export ORACLE_BASE
 ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
 GRID_HOME=/home/u01/grid/11.2.0; export GRID_HOME
 NLS_DATE_FORMAT="YYYY:MM:DD HH24:MI:SS"; export NLS_DATE_FORMAT
 NLS_LANG=american_america.ZHS16GBK; export NLS_LANG
 PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$GRID_HOME/bin export PATH
 export NLS_LANG=American_america.ZHS16GBK
 export TEMP=/tmp
 export TMPDIR=/tmp
 umask 022

主要是配置几个环境变量必须
mkdir -p /home/u01/grid/11.2.0
 mkdir -p /home/u01/grid
 mkdir -p /home/u01/oracle/product/11.2.0/db_1
 chown -R oracle:oinstall /home/u01
 chmod -R 775 /home/u01
 5、上传Oracle安装介质到/u01/tmp目录下
mkdir -p /u01/tmp

p13390677_112040_Linux-x86-64_1of7.zip
 p13390677_112040_Linux-x86-64_2of7.zip
 p13390677_112040_Linux-x86-64_3of7.zip
 6、vi /etc/RedHat-release

Red Hat Enterprise Linux Server release 4.0 (Santiago)
 7、安装grid组件

--利用udev绑定磁盘

for Linux 6.x
 for i in b c d;
 do
 echo "KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u /dev/\$name",
 RESULT=="/sbin/scsi_id -g -u /dev/sd$i",, OWNER="grid",
 GROUP="asmadmin", MODE="0660""
 done

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/37c72913adc6fca14d2125b1390c0094.html