技术分享 |
四、修改配置内核参数文件 |
发布时间:2018-10-15 18:30:39 浏览次数:次 来源:太原网站制作 作者:太原服务器虚拟化 字体:大 中 小 |
导读: 在节点racnode1、racnode2修改以下配置文件1、编辑/etc/hosts文件,配置内容如下:每行为一个主机,每行由三部份组成,每个部份由空格隔开。其中#号开头的行做说明,不被系统解释。第一部份:网络IP地址。第二部份:主机名.... 在节点racnode1、racnode2修改以下配置文件 1、编辑/etc/hosts文件,配置内容如下: 每行为一个主机,每行由三部份组成,每个部份由空格隔开。其中#号开头的行做说明,不被系统解释。 第一部份:网络IP地址。 第二部份:主机名.域名,注意主机名和域名之间有个半角的点。 第二部份:主机名(主机名别名) ,其实就是主机名。 当然每行也可以是两部份,就是主机IP地址和主机名;比如 192.168.1.195 debian
[root@racnode1 network-scripts]# cat /etc/hosts 127.0.0.1 localhost ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
#racnode1 192.168.0.110 racnode1 192.168.0.201 racnode1-vip 172.10.30.101 racnode1-priv
#racnode2 192.168.0.111 racnode2 192.168.0.202 racnode2-vip 172.10.30.102 racnode2-priv
#scan-ip 192.168.0.200 scan-cluster 2、修改OS系统标识---此处不改好像也能通过了 oracle默认不支持CentOS系统安装,Oracle Database 11g Release 2 的 OS要求参考: https://docs.oracle.com/cd/E11882_01/install.112/e47689/pre_install.htm#LADBI1106 我安装是64位数据库,On Linux x86-64:Red Hat Enterprise Linux 7 (RHEL 7) 另外,CentOS7.0.1511 基于 RHEL7.2 参考:http://www.linuxidc.com/Linux/2015-12/126283.htm 修改文件 /etc/RedHat-release # cat /proc/version Linux version 3.10.0-327.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Nov 19 22:10:57 UTC 2015 # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) #cp /etc/redhat-release /etc/redhat-release.bak----用完再改回去 # vi /etc/redhat-release # cat /etc/redhat-release redhat-7 3、selinux的配置文件-关停 查看SELinux状态: #sestatus ##如果SELinux status参数为enabled即为开启状态 SELinux status: enabled getenforce ##也可以用这个命令检查
1、临时关闭(不用重启机器): setenforce 0 ##设置SELinux 成为permissive模式 ##setenforce 1 设置SELinux 成为enforcing模式
2、修改配置文件需要重启机器: 修改/etc/selinux/config 文件,将SELINUX=enforcing改为SELINUX=disabled [root@db02 ~]# vim /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. #SELINUX=enforcing SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted 需要重启电脑 4、修改/etc/pam.d/login echo "session required /lib64/security/pam_limits.so" >>/etc/pam.d/login echo "session required pam_limits.so" >>/etc/pam.d/login 5、修改.bash_profile内容并设置显示地址 这是后来加入的,没试验,里面的display可以在安装时临时实现 设置参数: $ su - root # mkdir /mount_point/tmp # chmod 775 /mount_point/tmp # exit
$ vi .bash_profile 加入行: TEMP=/mount_point/tmp TMPDIR=/mount_point/tmp export TEMP TMPDIR 加入行:umask 022 加入行:DISPLAY=local_IP:0.0 ; export DISPLAY local_IP为你要将安装视图所显示的桌面地址
检查设置参数 $ umask $ env | more $ echo $DISPLAY $ echo $TEMP $ echo $TMPDIR 6、修改limits.conf cp /etc/security/limits.conf /etc/security/limits.conf.bak vi /etc/security/limits.conf 添加以下内容: 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 10240
7、修改root环境变量 /etc/profile cp /etc/profile /etc/profile.bak vi /etc/profile 在文件最后添加以下内容: #set oracle rac env 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
8、修改/etc/sysctl.conf cp /etc/sysctl.conf /etc/sysctl.conf.bak vi /etc/sysctl.conf 添加以下内容: fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 1054472192 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
sysctl -p 使之生效。 上一篇文章:三、RAC的IP规划
|
![]() ![]() |