设置参数

ast login: Mon May 14 15:32:24 2018 from 10.153.4.18
[root@centos65-min-template ~]# ll
total 24
-rw-------. 1 root root 1211 Jan  5 08:40 anaconda-ks.cfg
-rw-r--r--. 1 root root 9458 Jan  5 08:40 install.log
-rw-r--r--. 1 root root 3161 Jan  5 08:39 install.log.syslog
-rw-------. 1 root root  624 May 11 08:32 nohup.out
[root@centos65-min-template ~]# sysctl -w fs.file-max=2097152
fs.file-max = 2097152
You have new mail in /var/spool/mail/root
[root@centos65-min-template ~]# sysctl -w fs.nr_open=2097152
fs.nr_open = 2097152
[root@centos65-min-template ~]# echo 2097152 > /proc/sys/fs/nr_open
[root@centos65-min-template ~]# ulimit -n 1048576
[root@centos65-min-template ~]# vim /etc/security/limits.conf
You have new mail in /var/spool/mail/root
[root@centos65-min-template ~]# sysctl -w net.core.somaxconn=32768
net.core.somaxconn = 32768
[root@centos65-min-template ~]# sysctl -w net.ipv4.tcp_max_syn_backlog=16384
net.ipv4.tcp_max_syn_backlog = 16384
[root@centos65-min-template ~]# sysctl -w net.core.netdev_max_backlog=16384
net.core.netdev_max_backlog = 16384
[root@centos65-min-template ~]# sysctl -w net.ipv4.ip_local_port_range='1000 65535'
net.ipv4.ip_local_port_range = 1000 65535
[root@centos65-min-template ~]# sysctl -w net.core.rmem_default=262144
net.core.rmem_default = 262144
[root@centos65-min-template ~]# sysctl -w net.core.wmem_default=262144
net.core.wmem_default = 262144
[root@centos65-min-template ~]# sysctl -w net.core.rmem_max=16777216
net.core.rmem_max = 16777216
[root@centos65-min-template ~]# sysctl -w net.core.wmem_max=16777216
net.core.wmem_max = 16777216
[root@centos65-min-template ~]# sysctl -w net.core.optmem_max=16777216
net.core.optmem_max = 16777216
[root@centos65-min-template ~]# sysctl -w net.ipv4.tcp_rmem='1024 4096 16777216'
net.ipv4.tcp_rmem = 1024 4096 16777216
[root@centos65-min-template ~]# sysctl -w net.ipv4.tcp_wmem='1024 4096 16777216'
net.ipv4.tcp_wmem = 1024 4096 16777216
[root@centos65-min-template ~]# sysctl -w net.nf_conntrack_max=1000000
net.nf_conntrack_max = 1000000
[root@centos65-min-template ~]# sysctl -w net.netfilter.nf_conntrack_max=1000000
net.netfilter.nf_conntrack_max = 1000000
[root@centos65-min-template ~]# sysctl -w net.netfilter.nf_conntrack_tcp_timeout_time_wait=30
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 30
[root@centos65-min-template ~]# sysctl -w  net.ipv4.tcp_max_tw_buckets=1048576
net.ipv4.tcp_max_tw_buckets = 1048576
You have new mail in /var/spool/mail/root
[root@centos65-min-template ~]# net.ipv4.tcp_fin_timeout = 15
-bash: net.ipv4.tcp_fin_timeout: command not found
[root@centos65-min-template ~]#  sysctl -w  net.ipv4.tcp_fin_timeout = 15
error: "net.ipv4.tcp_fin_timeout" must be of the form name=value
error: Malformed setting "="
error: "15" must be of the form name=value
[root@centos65-min-template ~]# sysctl -w net.ipv4.ip_local_port_range="500 65535"
net.ipv4.ip_local_port_range = 500 65535
[root@centos65-min-template ~]# echo 1000000 > /proc/sys/fs/nr_open
[root@centos65-min-template ~]# echo 2097152 > /proc/sys/fs/nr_open
You have new mail in /var/spool/mail/root
[root@centos65-min-template ~]# 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值