# vi /etc/sysctl.conf
Append a config directive as follows:
fs.file-max = 100000
# vi /etc/security/limits.conf
Set httpd user soft and hard limits as follows:
httpd soft nofile 4096
httpd hard nofile 10240
Save and close the file. To see limits, enter:
# su - httpd
$ ulimit -Hn
$ ulimit -Sn
PS:好像需要重启才能生效
参考资料
http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/