1, Modify the destination
Our goal is: Let the maximum number of files a user logs on every Linux system after the system is open we set good.
But I have to say here is: Unfortunately, a lot of this on-line ulimit settings modify resource limits of the article, but the article did not work.
This goal into two objectives:
1.1, set to take effect for the root user login system
This objective can be achieved not difficult
1.2, set to take effect for all users
This is very troublesome, and will fix your system to the whole bad, because you want to re-compile the Linux kernel for the job!
So on balance, I only achieved the first goal, the second goal because the risk is too great, I think if I knew this before, so I installed the system would do first when I deal with this, but now I I felt it was too late.
2, modify the place
2.1, modify /etc/security/limits.conf
Modify its contents by vi /etc/security/limits.conf, in the final document was added (the value can also define your own):
* Soft nofile = 65536
* Hard nofile = 65536
root soft nofile 65536
root hard nofile 65536
* Indicates that the configuration is valid for all users, root user wants to add two lines in particular.
2.2, edit / etc / profile
By vi / etc / profile modifications added at the end the following
ulimit -n 65536
Then sign back into effect.
In fact, only modify / etc / profile to take effect, but I still recommend to /etc/security/limits.conf also change it.
Finally, to emphasize that, if you want to make changes to take effect for all users, so it seems you have to recompile the Linux kernel job.