Ubuntu系统设置普通用户最大文件打开数
2024-09-08 17:29:06
背景:
Elasticsearch启动报错:
ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
解决方案:
一、临时修改:
vim /etc/profile
添加 ulimit -SHn 1048576
然后用普通用户执行 source /etc/profile
二、永久修改:
vim /etc/sysctl.conf
添加:fs.file-max = 1048576
执行 sysctl -p
vim /etc/security/limits.conf
添加:
* hard nofile 1048576
* soft nofile 1048576
root hard nofile 1048576
root soft nofile 1048576
再执行:
sed -i '/DefaultLimitNOFILE/c DefaultLimitNOFILE=1048576' /etc/systemd/*.conf
systemctl daemon-reexec
然后注销退出重新登录(注销如果不生效就重启一下)
验证:ulimit -Hn
最新文章
- 用angular怎么缓存父页面数据
- leetcode-javascript
- HTML 学习笔记 CSS(选择器2)
- hihocoder 1138 Islands Travel dijkstra+heap 难度:2
- java中四种引用类型
- C#将对象转换成JSON字符串,Newtonsoft.Json (JSON.NET)
- 利用OpenXml生成Word2007文档
- setSingleChoiceItems和setPositiveButton两者触发时期
- V4L2驱动的移植与应用(二)
- 学习Mathematica
- .Net NPOI 上传excel文件、提交后台获取excel里的数据
- IDEA 配置datasource,提升编码效率,让你在 Mapper.xml 中编写sql可以飞起来~
- jquery操作checkBox 一次取消选中后不能再选中
- Python基础知识摘要
- .NET控件集ComponentOne 2018V3发布:新增图表动画及迷你图
- vue mapbox 地图 demo
- 2018.12.31 bzoj3992: [SDOI2015]序列统计(生成函数+ntt+快速幂)
- Fedora16的双显卡切换问题
- 可扩展的Web系统和分布式系统(Scalable Web Architecture and Distributed Systems)
- 20165310_JavaExp1