Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

我的裝機設定清單:DNS、檔案數與線程數上限

每次新機器到手,這幾件事我會先做,寫下來當成自己的檢查清單。

DNS 解析

vi /etc/resolv.conf
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 202.106.0.20
nameserver 202.96.128.86
nameserver 202.96.128.143

打開檔案數限制

vi /etc/security/limits.conf
<user_name> - nofile 20000

系統最大線程數

CentOS 6 的預設值特別小,只有 1024,這點要格外注意:

vi /etc/security/limits.d/90-nproc.conf
* soft nproc 65535
ulimit -u   # 查看目前設定

hosts 設定

vi /etc/hosts

清單持續更新中。

Copyright © Linux教程網 All Rights Reserved