设为首页 收藏本站
查看: 1459|回复: 0

[经验分享] OCM_Session7_4_修改内核配置文件/etc/sysctl.conf

[复制链接]
发表于 2015-11-9 12:03:52 | 显示全部楼层 |阅读模式
  
四、修改内核配置文件--两个节点都要执行 这个在OCM环境已经配置好
参考官方文档:http://docs.oracle.com/cd/B19306_01/install.102/b14203/prelinux.htm
  To view the current value specified for these kernel parameters, and to change them if necessary, follow these steps:

  •   Enter the commands shown in the following table to view the current values of the kernel parameters:
    Note:
    Make a note of the current values and identify any values that you must change.ParameterCommandsemmsl, semmns, semopm, and semmni# /sbin/sysctl -a | grep sem  This command displays the value of the semaphore parameters in the order listed.
    shmall, shmmax, and shmmni# /sbin/sysctl -a | grep shmfile-max# /sbin/sysctl -a | grep file-maxip_local_port_range# /sbin/sysctl -a | grep ip_local_port_range  This command displays a range of port numbers.
    rmem_default, rmem_max, wmem_default, and wmem_max# /sbin/sysctl -a | grep net.core
  •   If the value of any kernel parameter is different from the recommended value, then complete the following process:
      Using any text editor, create or edit the /etc/sysctl.conf file,and add or edit lines similar to the following:
    Note:
    Include lines only for the kernel parameter values that you want to change. For the semaphore parameters (kernel.sem), you must specify all four values. However, if any of the current system parameter values are greater than the recommended values,then keep using the larger values.kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.rmem_max = 1048576 net.core.wmem_default = 262144 net.core.wmem_max = 1048576  By specifying the values in the /etc/sysctl.conf file, they persist when you restart the system.
      On Red Hat systems, to have these changes take effect immediately so that you do not have to restart the system, enter the following command:
    /sbin/sysctl -p
  •   Repeat steps 1 and 2 on all other nodes in the cluster.
      On SUSE systems only, enter the following command to cause the system to read the /etc/sysctl.conf file when it restarts:
    # /sbin/chkconfig boot.sysctl on
  •   On SUSE Linux Enterprise Server 9.0 only, set the kernel parameter disable_cap_mlock as follows:
    disable_cap_mlock = 1
  •   After updating the values of kernel parameters in the /etc/sysctl.conf file, either restart the computer, or run the command sysctl -p to make the changes in the /etc/sysctl.conf fileavailable in the active kernel memory.
      ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
      我的修改如下:
------------------------------------------------------------------------------------------rac1节点
[iyunv@rac1 ~]# cp /etc/sysctl.conf /etc/sysctl.conf.bak[iyunv@rac1 ~]# vi /etc/sysctl.conf# Kernel sysctl configuration file for Oracle Enterprise Linux## For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and# sysctl.conf(5) for more details.
# Controls IP packet forwardingnet.ipv4.ip_forward = 0
# Controls source route verification# See /usr/share/doc/kernel-doc-*/Documentation/networking/ip-sysctl.txtnet.ipv4.conf.default.rp_filter = 2
# Do not accept source routingnet.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernelkernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename# Useful for debugging multi-threaded applicationskernel.core_uses_pid = 1
# Controls the use of TCP syncookiesnet.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in byteskernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queuekernel.msgmax = 65536
# Controls the maximum shared segment size, in byteskernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pageskernel.shmall = 268435456
kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 262144net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 1048576"/etc/sysctl.conf" 47L, 1361C written[iyunv@rac1 ~]# sysctl -pnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 2net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1kernel.msgmnb = 65536kernel.msgmax = 65536kernel.shmmax = 4294967295kernel.shmall = 268435456kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 262144net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 1048576[iyunv@rac1 ~]#
--------------------------------------------------------------------------------------------------------------rac2节点
[iyunv@rac2 ~]# cp /etc/sysctl.conf /etc/sysctl.conf.bak[iyunv@rac2 ~]# vi /etc/sysctl.conf# Kernel sysctl configuration file for Oracle Enterprise Linux## For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and# sysctl.conf(5) for more details.
# Controls IP packet forwardingnet.ipv4.ip_forward = 0
# Controls source route verification# See /usr/share/doc/kernel-doc-*/Documentation/networking/ip-sysctl.txtnet.ipv4.conf.default.rp_filter = 2
# Do not accept source routingnet.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernelkernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename# Useful for debugging multi-threaded applicationskernel.core_uses_pid = 1
# Controls the use of TCP syncookiesnet.ipv4.tcp_syncookies = 1
# Controls the maximum size of a message, in byteskernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queuekernel.msgmax = 65536
# Controls the maximum shared segment size, in byteskernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pageskernel.shmall = 268435456
kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 262144net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 1048576"/etc/sysctl.conf" 47L, 1361C written[iyunv@rac2 ~]# sysctl -pnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 2net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1kernel.msgmnb = 65536kernel.msgmax = 65536kernel.shmmax = 4294967295kernel.shmall = 268435456kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096kernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default = 262144net.core.rmem_max = 1048576net.core.wmem_default = 262144net.core.wmem_max = 1048576[iyunv@rac2 ~]#
-----------------------------------------------------------------------------------------------------  
         版权声明:本文为博主原创文章,未经博主允许不得转载。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-137002-1-1.html 上篇帖子: OCM_Session1_6_Log File Management 下篇帖子: 疑问:【动态性能视图】v$fixed_table和v$fixed_view_definition
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表