Linux???????????????
???????????? ???????[ 2015/8/7 10:15:44 ] ??????????????
????1 ??????????????
???????“sysctl -a”???????????????????????????????????????????500?????????????????????????net.ipv4??net.ipv6??net.core??vm??fs??dev.parport??dev.cdrom ??dev.raid??kernel?????????linux????????????????????????????????????????????????
???????е???????????????????/usr/src/linux/Documentation/sysctl?е???????????????????????????????????2??????????????
????2 ????????????÷???
????????Linux?????????????????????У??????????????????????????????????Ч????????????????????????á??????????????????????
????2.1 ???????????
?????????????????????
????1?????“sysctl -w ??????=?”????
?????????????net.ipv4.ip_forward???????1?????????“sysctl -w net.ipv4.ip_forward=1”??
????2????????????????proc???
??????????λ??/proc/sys/??£?????????????????????·????????“/”??“.”????????????????/proc/sys/net/ip_forward??????????net.ipv4.ip_forward??
?????????net.ipv4.ip_forward???????1?????????“echo “1” > /proc/sys/net/ipv4/ip_forward”??
???????????proc???????????????????????????????echoд??????????????????????????echo???proc????????????????
????2.2 ??????????
???????????????????????/etc/sysctl.conf????С????????????????vi??sysctl.conf????????????????????????????????????????=??????磬??net.ipv4.ip_forward???????1????sysctl.conf???????????????????
????net.ipv4.ip_forward=1
??????????ú????б??檔??????“sysctl -p ?????????”?????????Ч????????????????????????????????????????????“sysctl -p”??
???????????????????????????????????????Ч????????????????????????????У????????????????????????????????ò????Ч??????????????????Ч??????????????boot.sysctl???????????????????????????????????????????????????????д????????????????/etc/rc.local????????????????ò????Ч??
???????????????????????????????????????????????????“sysctl -p”?????????е?????????????????Ч??
????3 ?????????????????
????3.1 ??????????????
?????????????????????????????????fs.file-max??file-nr??fs.file-max??????????????????????????file-nr????????????file-max?????????????????????????????????????????????????????????????????????????
????suse11lwb:/home/zxin10/steven # sysctl -a|grep fs.file-nr
????fs.file-nr = 5152 0 6815744
?????????????????????????????????????????????????????????á?????????????????????????????????????Solaris??????????????????HP-UX???У?????Solaris???????????????HP-UX?????????????????????????з??????????1???й????????
??????????????????????????????
????1???????????????????????????????????????????/proc/sys/fs/file-max??????????????????????????á?
????# cat /proc/sys/fs/file-max
?????????????С?? ??????/etc/sysctl.conf???????????????
????2????/etc/security/limits.conf?????????????????? ??????????????
????#???????????????? ??????????С?
????* - nofile 2048
????????????????????????????????2048?? ???"nofile"??????????????????????????μ?hard??soft???????????????????Ч?????????????????????趨????????"-"????趨?? ??hard??soft?趨???????趨??????????soft???????????趨??????soft???????????????Ч?????????hard?????????????????????????????????soft?????????????hard???????????root????????????hard???????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11