zoukankan      html  css  js  c++  java
  • 第2步:配置系统安装环境

      1. 2.1 修改内核参数
      2. [root@sgdb1~]# vim /etc/sysctl.conf(node1node2)
        ——添加
        # Controls the Oracle parameters
        fs.aio-max-nr = 1048576
        fs.file-max = 6815744
        # (备注:2G内存使用如下值:2G/4K=4194304/8,大内存将16换成内存GB)
        kernel.shmall = 2097152
        #(备注:16G内存使用如下值:16*1024*1024*1024-1=17179869183/8,大内存将16换成内存GB)
        kernel.shmmax = 17179869183/8
        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
        net.ipv4.tcp_wmem = 262144 262144 262144
        net.ipv4.tcp_rmem = 4194304 4194304 4194304
         
    修改完毕系统参数后,以下命令使内核参数生效
    代码1
    [root@sgdb1~]# sysctl –p
      1. 2.2 修改系统资源限制
    代码2
    [root@sgdb1~]# vim /etc/security/limits.conf(node1node2)
    ——添加
    # Controls the Oracle parameters
    oracle soft nproc 16384
    oracle hard nproc 16384
    oracle soft nofile 65536
    oracle hard nofile 65536
    grid soft nproc 16384
    grid hard nproc 16384
    grid soft nofile 65536
    grid hard nofile 65536    
    注意:RHEL6.*CPU的最大线程数由配置文/etc/security/limits.d/90-nproc.conf限定了上限,需要将该行注释。
    代码3
    [root@sgdb1~]# vim /etc/security/limits.d/90-nproc.conf(node1node2)
    ——修改
    # Default limit for number of user's processes to prevent
    # accidental fork bombs.
    # See rhbz #432903 for reasoning.
    #*    soft    nproc     1024
      1. 2.3 修改shell配置
    代码4
    [root@sgdb1~]# vim /etc/pam.d/login(node1node2)
    ——添加
    session required pam_limits.so
    [root@sgdb1~]# vim /etc/profile(node1node2)
    ——添加
    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
    [root@sgdb1~]# vim /etc/csh.login(node1node2)
    ——添加
    if ( $USER = "oracle" || $USER = "grid" ) then
    limitmaxproc 16384
    limit descriptors 65536
    endif
      1. 2.4 配置网络环境
    网卡IP找主机工程师申请,以下列出作为案例的hosts文件内容
    代码5
    [root@sgdb1~]# vim /etc/hosts(node1node2)
    ——添加
    # public
    192.168.243.71  sgdb1
    192.168.243.72  sgdb2
    # private
    10.10.10.71    sgdb1-priv
    10.10.10.72    sgdb2-priv
    # virtual
    192.168.243.73   sgdb1-vip
    192.168.243.74   sgdb2-vip
    # scan
    192.168.243.75   sgdb-scan
      1. 2.5 配置ntp服务
    可以选择用NTP服务器,也可以手动修改各个节点时间,使时间差不超过2分钟为安全,也可以修改NTP服务配置文件。
    代码1
    [root@sgdb1 ~]# vim /etc/ntp.conf(node1node2)
    # server开头这一行修改为时间服务器
    server 196.168.243.81
     
  • 相关阅读:
    c语言中srand和rand函数 生成随机数总结
    枚举类型
    VS2008快捷键使用技巧
    PV实现同步
    PV操作(深入显出)
    数字在排序数组中出现的次数
    两个链表的第一个公共结点
    数组中的逆序对
    第一个只出现一次的字符位置
    丑数
  • 原文地址:https://www.cnblogs.com/wuwanyu/p/8275532.html
Copyright © 2011-2022 走看看