惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
Recent Commits to openclaw:main
Recent Commits to openclaw:main
I
Intezer
Attack and Defense Labs
Attack and Defense Labs
P
Privacy International News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
Lohrmann on Cybersecurity
C
Cybersecurity and Infrastructure Security Agency CISA
V2EX - 技术
V2EX - 技术
AWS News Blog
AWS News Blog
O
OpenAI News
L
LINUX DO - 最新话题
N
News | PayPal Newsroom
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
A
Arctic Wolf
Spread Privacy
Spread Privacy
G
GRAHAM CLULEY
T
Tor Project blog
博客园_首页
Know Your Adversary
Know Your Adversary
有赞技术团队
有赞技术团队
S
Secure Thoughts
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
T
Tailwind CSS Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Visual Studio Blog
J
Java Code Geeks
Cisco Talos Blog
Cisco Talos Blog
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security Affairs
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
宝玉的分享
宝玉的分享
量子位
Last Week in AI
Last Week in AI
月光博客
月光博客
罗磊的独立博客
S
SegmentFault 最新的问题

博客园 - 追梦华仔

Openfire服务器MySQL优化 SSL 握手协议 非对称密码学(Asymmetric Cryptography)- 转载 Visual Studio 2008下载 Visual Studio 2008 提示“无法识别工具版本4.0” 改造MUC实现Openfire群 Openfire S2S 经验分享 注册Jmail组件的三种方法 读取excel文件的时候 出错提示:外部表不是预期的格式 - 追梦华仔 - 博客园 System.Runtime.InteropServices.COMException: 服务器出现意外情况 Excel表格导入出错,提示“拒绝访问”的错误,ExcelObj = new Excel.Application(); 在 ASP.NET 中执行 URL 重写 XP下如何解决“ASP.NET 未被授权访问所请求的资源”的问题 - 追梦华仔 - 博客园 无法在web服务器上启动调试 您不具备调试此应用程序的权限 - 追梦华仔 - 博客园 Server Application Error ---Http 500错误解决方法 用Lucene实现在检索结果中再检索 [转载]Ruby on Rails:开源技术将深入企业 Lucene.Net中按时间范围查询,结果没有查到数据 Lucene.Net.Search.Highlight.FragmentQueue 中的派生方法 LessThan 不能减少访问
放开Linux内核对用户进程可打开文件数和TCP连接的限制
追梦华仔 · 2015-07-15 · via 博客园 - 追梦华仔

一、 检查linux内核
uname -a
lsb_release -a

二、 用户进程可打开文件数限制
1) vim /etc/security/limits.conf
*       -      nofile           65535
*       -      nproc           65535

在/etc/security/limits.d/90-nproc.conf中修改最大文件数和进程数
*   soft  nproc   65534
*   hard  nproc   65534

ulimit -a

2) vim /etc/pam.d/login
[root@tcl-inside2 ~]# vim /etc/pam.d/login
session required /lib64/security/pam_limits.so

3) cat /proc/sys/fs/file-max
查看Linux系统级的最大打开文件数限制

4) less /etc/profile
在文件中查找是否使用了ulimit-n限制了用户可同时打开的最大文件数量,如果找到,则删除这行命令

三、放开内核对TCP连接的限制
1) 装载ip_conntrack模块
因为内核没有加载ip_conntrack模块,手动加载即可:
modprobe ip_conntrack (手动装载模块)
echo "modprobe ip_conntrack" >> /etc/rc.local(添加自启动)

2) vim /etc/sysctl.conf 
[root@tcl-inside2 ~]# vim /etc/sysctl.conf
net.ipv4.ip_local_port_range = 1024 65000

#net.ipv4.netfilter.ip_conntrack_max=655360
net.nf_conntrack_max=655360
#net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=1200
net.netfilter.nf_conntrack_tcp_timeout_established=10

3) sysctl -p
执行sysctl命令:sysctl -p