{"id":3768,"date":"2019-07-12T21:07:55","date_gmt":"2019-07-12T13:07:55","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3768"},"modified":"2019-07-12T21:07:56","modified_gmt":"2019-07-12T13:07:56","slug":"sysctl","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/sysctl","title":{"rendered":"sysctl\u547d\u4ee4 – \u914d\u7f6e\u5185\u6838\u53c2\u6570"},"content":{"rendered":"\n
sysctl\u547d\u4ee4\u88ab\u7528\u4e8e\u5728\u5185\u6838\u8fd0\u884c\u65f6\u52a8\u6001\u5730\u4fee\u6539\u5185\u6838\u7684\u8fd0\u884c\u53c2\u6570\uff0c\u53ef\u7528\u7684\u5185\u6838\u53c2\u6570\u5728\u76ee\u5f55\u201c\/proc\/sys\u201d\u4e2d\u3002<\/p>\n\n\n\n
\u5b83\u5305\u542b\u4e00\u4e9bTCP\/ip\u5806\u6808\u548c\u865a\u62df\u5185\u5b58\u7cfb\u7edf\u7684\u9ad8\u7ea7\u9009\u9879\uff0c \u8fd9\u53ef\u4ee5\u8ba9\u6709\u7ecf\u9a8c\u7684\u7ba1\u7406\u5458\u63d0\u9ad8\u5f15\u4eba\u6ce8\u76ee\u7684\u7cfb\u7edf\u6027\u80fd\u3002\u7528sysctl\u53ef\u4ee5\u8bfb\u53d6\u8bbe\u7f6e\u8d85\u8fc7\u4e94\u767e\u4e2a\u7cfb\u7edf\u53d8\u91cf\u3002<\/p>\n\n\n\n
sysctl\u547d\u4ee4\u5bf9\u5185\u6838\u53c2\u6570\u7684\u4fee\u6539\u4ec5\u5728\u5f53\u524d\u751f\u6548\uff0c\u91cd\u542f\u7cfb\u7edf\u540e\u53c2\u6570\u4e22\u5931\u3002\u5982\u679c\u5e0c\u671b\u53c2\u6570\u6c38\u4e45\u751f\u6548\u53ef\u4ee5\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u201c\/etc\/sysctl.conf\u201d\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>sysctl [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u67e5\u770b\u6240\u6709\u53ef\u8bfb\u53d8\u91cf\uff1a <\/p>\n\n\n\n \u8bfb\u4e00\u4e2a\u6307\u5b9a\u7684\u53d8\u91cf\uff1a <\/p>\n\n\n\n \u4fee\u6539\u6307\u5b9a\u53d8\u91cf\u7684\u503c\uff1a<\/p>\n\n\n\n <\/p>\n","protected":false},"excerpt":{"rendered":" sysctl\u547d\u4ee4\u88ab\u7528\u4e8e\u5728\u5185\u6838\u8fd0\u884c\u65f6\u52a8\u6001\u5730\u4fee\u6539\u5185\u6838\u7684\u8fd0\u884c\u53c2\u6570\uff0c\u53ef\u7528\u7684\u5185\u6838\u53c2\u6570\u5728\u76ee\u5f55\u201c\/proc\/sys\u201d\u4e2d\u3002 \u5b83 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3768"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=3768"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3768\/revisions"}],"predecessor-version":[{"id":3817,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3768\/revisions\/3817"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-n<\/td> \u6253\u5370\u503c\u65f6\u4e0d\u6253\u5370\u5173\u952e\u5b57<\/td><\/tr> -e<\/td> \u5ffd\u7565\u672a\u77e5\u5173\u952e\u5b57\u9519\u8bef<\/td><\/tr> -N<\/td> \u4ec5\u6253\u5370\u540d\u79f0<\/td><\/tr> -w<\/td> \u5f53\u6539\u53d8sysctl\u8bbe\u7f6e\u65f6\u4f7f\u7528\u6b64\u9879 <\/td><\/tr> -p<\/td> \u4ece\u914d\u7f6e\u6587\u4ef6\u201c\/etc\/sysctl.conf\u201d\u52a0\u8f7d\u5185\u6838\u53c2\u6570\u8bbe\u7f6e<\/td><\/tr> -a<\/td> \u6253\u5370\u5f53\u524d\u6240\u6709\u53ef\u7528\u7684\u5185\u6838\u53c2\u6570\u53d8\u91cf\u548c\u503c<\/td><\/tr> -A<\/td> \u4ee5\u8868\u683c\u65b9\u5f0f\u6253\u5370\u5f53\u524d\u6240\u6709\u53ef\u7528\u7684\u5185\u6838\u53c2\u6570\u53d8\u91cf\u548c\u503c<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# sysctl -a<\/pre>\n\n\n\n
[root@linuxcool ~]# sysctl net.ipv6.neigh.lo.locktime\nnet.ipv6.neigh.lo.locktime = 0<\/pre>\n\n\n\n
[root@linuxcool ~]# sysctl net.ipv6.neigh.lo.locktime=1\nnet.ipv6.neigh.lo.locktime = 1 <\/pre>\n\n\n\n