Centos 6 ulimit modification and sysctl Configuration

Source: Internet
Author: User

Cat <EOF>/etc/security/limits. conf

* Soft nofile 65536

* Hard nofile 65536

* Soft nproc Unlimited

* Hard nproc Unlimited

EOF


Cat <EOF>/etc/security/limits. d/90-nproc.conf

* Soft nproc Unlimited

Root soft nproc Unlimited

EOF


Log on to the machine again.


Cat <EOF>/etc/sysctl. conf

Net. ipv4.tcp _ fin_timeout = 30

Net. ipv4.tcp _ keepalive_time = 300

Net. ipv4.tcp _ syncookies = 1

Net. ipv4.tcp _ synack_retries = 2

Net. ipv4.tcp _ tw_reuse = 1

Net. ipv4.tcp _ tw_recycle = 1

Net. ipv4.tcp _ max_syn_backlog = 4096

Net. ipv4.tcp _ max_tw_buckets = 50000

Net. nf_conntrack_max = 6553600

Net. netfilter. nf_conntrack_max = 6553600


Sysctl-P execution takes effect


Error:

Error: "net. Bridge. bridge-nf-call-ip6tables" is an unknown key

Error: "net. Bridge. Bridge-NF-call-iptables" is an unknown key

Error: "net. Bridge. Bridge-NF-call-arptables" is an unknown key

 

The solution is as follows:

Modprobe Bridge

Echo "modprobe bridge">/etc/rc. Local



Error: "net. ipv4.ip _ conntrack_max" is an unknown key

Error: "net. ipv4.netfilter. ip_conntrack_max" is an unknown key

Error: "net. ipv4.netfilter. ip_conntrack_tcp_timeout_established" is an unknown key


Solution:

Modprobe ip_conntrack

Echo "modprobe ip_conntrack">/etc/rc. Local


Modprobe (module probe)


Function Description: automatically processes the module that can be loaded.


Syntax: modprobe [-acdlrtvv] [-- help] [module File] [Symbol name = symbol value]


Note: modprobe can load specified modules or a group of dependent modules. modprobe determines the modules to be loaded Based on the dependency generated by depmod. if an error occurs during the loading process, the entire group of modules will be uninstalled in modprobe.


Parameters:

-A or -- all load all modules.

-C or -- show-conf displays the settings of all modules.

-D or -- debug uses the troubleshooting mode.

-L or -- List displays available modules.

The-R or -- remove module is automatically detached when it is idle.

-T or -- type specifies the module type.

-V or -- verbose displays detailed information during execution.

-V or -- version displays version information.

-Help: displays help.



Centos5 netfilter parameter configuration file directory:/proc/sys/NET/IPv4/Netfilter/ip_conntrack_max

Centos6 netfilter parameter configuration file directory:/proc/sys/NET/Netfilter/nf_conntrack_max


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.