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

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
W
WeLiveSecurity
C
Check Point Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
GbyAI
GbyAI
A
Arctic Wolf
NISL@THU
NISL@THU
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
M
MIT News - Artificial intelligence
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Microsoft Security Blog
Microsoft Security Blog
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tenable Blog
G
GRAHAM CLULEY
O
OpenAI News
S
Schneier on Security
Google Online Security Blog
Google Online Security Blog
Vercel News
Vercel News
宝玉的分享
宝玉的分享
Attack and Defense Labs
Attack and Defense Labs
T
The Blog of Author Tim Ferriss
量子位
aimingoo的专栏
aimingoo的专栏
The Cloudflare Blog
P
Privacy & Cybersecurity Law Blog
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 热门话题
博客园_首页
F
Full Disclosure
Recent Commits to openclaw:main
Recent Commits to openclaw:main
D
Docker
U
Unit 42
A
About on SuperTechFans
博客园 - 司徒正美
Hacker News - Newest:
Hacker News - Newest: "LLM"
人人都是产品经理
人人都是产品经理
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
Scott Helme
Scott Helme
TaoSecurity Blog
TaoSecurity Blog

博客园 - 追梦华仔

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