1 Oracle Enterprise Linux6.3下安装Oracle11g Grid ASM
1.1 查看版本信息
cat /etc/redhat-release
uname -a
1.2 添加Oracle用户
useradd oracle -u 600
useradd grid -u 601
1.3 添加Oracle用户组
groupadd -g 1000 oinstall
groupadd -g 1001 dba
groupadd -g 1002 oper
groupadd -g 1003 asmadmin
groupadd -g 1004 asmoper
groupadd -g 1005 asmdba
groupadd -g 1006 orauser
1.4 修改Oracle用户所属组
usermod -g oinstall -G dba,asmdba oracle
usermod -g oinstall -G dba,asmdba,oper,oinstall,asmadmin grid
1.5 设置密码
passwd oracle  (oracle)
passwd grid (grid)
1.6 创建目录
mkdir /u01
mkdir -p /u01/soft(存放grid和数据库软件)
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle/product/11.2.0/grid
mkdir -p /u01/app/oracle/product/11.2.0/db_1
1.7 解压缩安装文件
Grid文件:
unzip /mnt/hgfs/SoftWare/oracle11g_linux64_11.2.0.3.0/p10404530_112030_Linux-x86-64_3of7.zip
1.8 设置目录所有者
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/soft/grid
chown -R oracle:oinstall /u01/app/oracle
chown -R grid:oinstall /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oracle/product/11.2.0/grid
chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1
1.9 更改文件权限
chmod -R 775 /u01/soft/grid
chmod -R 775 /u01/app/oracle/product/11.2.0/grid
chmod -R 775 /u01/app/oracle/product/11.2.0/db_1
chmod -R 775 /u01/app/oraInventory
1.10 查看安装的包
rpm -qa binutils
rpm -q compat-libstdc++-33(rpm -qa compat-libstdc++*)
rpm -qa | grep compat-
rpm -qa | grep elfutils
rpm -qa gcc
rpm -qa gcc-c++
rpm -qa glibc
rpm -qa glibc-common
rpm -qa glibc-devel
rpm -qa libaio
rpm -qa libaio-devel(需要安装)
rpm -qa libgcc
rpm -qa libstdc++
rpm -qa libstdc++-devel
rpm -qa make
rpm -qa sysstat
rpm -qa unixODBC
rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel
rpm -q glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl-devel sysstat
1.11 安装缺少的包
下载:
1、 libaio-devel-0.3.105-2.i386.rpm
2、 ksh-20100621-16.el6.x86_64.rpm
linux安装数据库
3、 numactl-devel-2.0.7-3.el6.x86_64.rpm
放到: K:\SoftWare\OracleEnterpriseLinux6.3\rpm下
cd /mnt/hgfs/SoftWare/OracleEnterpriseLinux6.3/rpm
4、执行
rpm -Uvh libaio-devel-0.3.107-10.el6.x86_64.rpm
rpm -Uvh ksh-20100621-16.el6.x86_64.rpm
rpm -Uvh numactl-devel-2.0.7-3.el6.x86_64.rpm
1.12 修改系统用户资源权限
vi /etc/profile,增加:
#oracle
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
1.13 设置内核参数
1.13.1 修改
vi /f,添加:
#kernel.shmall = 2097152(已有)
#kernel.shmmax = 2147483648(已有)
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
_default = 262144
_max = 4194304
wmem_default = 262144
wmem_max = 1048576
net.ipv4.ip_local_port_range = 9000 65500
fs.suid_dumpable = 1
fs.file-max = 6815744
fs.aio-max-nr = 1048576
1.13.2 查看内核参数
/sbin/sysctl -a | grep fs.aio-max-nr
1.13.3 使内核参数生效
/sbin/sysctl -p
1.14 修改oracle 用户shell 限制
vi /etc/f,增加:
#add by lcs for oracle
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
1.15 oracle用户限制,登录
vi /etc/pam.d/login
#add by lcs for oracle
session required pam_limits.so
1.16 设置磁盘配置策略
vi /etc/sysconfig/selinux
#modify by lcs for oracle
#old SELINUX=enforcing
SELINUX=disabled
1.17 重新启动系统
reboot
1.18 Oracle asm设置
1.18.1 下载oracle asm安装文件
位置:K:\SoftWare\OracleEnterpriseLinux6.3\rpm
1、 oracleasm-support-2.1.5-1.el6.x86_64.rpm;
2、 oracleasmlib-2.0.4-1.el6.x86_64.rpm
1.18.2 安装
cd /mnt/hgfs/SoftWare/OracleEnterpriseLinux6.3/rpm
3、 rpm –Uvh oracleasmlib-2.0.4-1.el6.x86_64.rpm
4、 rpm –Uvh oracleasm-support-2.1.5-1.el6.x86_64.rpm
1.18.3 oracleasm配置
5、 配置: /etc/init.d/oracleasm configure
信息:
Default user to own the driver interface [grid]: grid
Default group to own the driver interface [dba]: asmadmin
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                    [  OK  ]
Scanning the system for Oracle ASMLib disks:              [  OK  ]
1.18.4 通过vmware增加磁盘
1、 增加磁盘:在vmware中settings下通过:hareware-add disk,增加2个10g的磁盘分区
1.18.5 创建分区
2、 通过:fdisk –l看到Disk /dev/sdb: 10.7 GB;Disk /dev/sdc: 10.7 GB

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。