使用ulimit -a 可以檢視當前系統的所有限制值,使用ulimit -n 可以檢視當前的最大開啟檔案數。
新裝的linux預設只有1024,當作負載較大的伺服器時,很容易遇到error: too many open files。因此,需要將其改大。
使用 ulimit -n 65535 可即時修改,但重啟後就無效了。(注ulimit -shn 65535 等效 ulimit -n 65535,-s指soft,-h指hard)
有如下三種修改方式:
1.在/etc/rc.local 中增加一行 ulimit -shn 65535
2.在/etc/profile 中增加一行 ulimit -shn 65535
3.在/etc/security/limits.conf最後增加如下兩行記錄
* soft nofile 65535
* hard nofile 65535
具體使用哪種,試試哪種有效吧,我在 centos中使用第1種方式無效果,使用第3種方式有效果,而在debian中使用第2種有效果
linux修改映象
1 首先備份系統自帶yum源配置檔案 etc yum repos d centos base repo root localhost mv etc yum repos d centos base repo etc yum repos d centos base repo backup 2 進入yum...
linux 修改映象源
deepin 系統修改源 deb camel main contrib non free deb camel main contrib no...
Linux修改時間
自 時間同步需要使用 udp123 埠,如果防火牆阻止此埠,會有以下報錯 no server suitable for synchroniz...