http://blog.chinaunix.net/uid-26694208-id-3184442.html
之前看过这个,可以移步了解下
https://blog.csdn.net/u010720661/article/details/63253509
看一下这个吧,写得挺详细的