ÓÃtab¼üÇл»µ½¡°È·ÈÏ¡±±£´æ¡£ 4) ½øÈë¡°·À»ðǽÅäÖá±£¬½«¡°·À»ðǽ¡±Ç°ÃæµÄ¡°*¡±°´¿Õ¸ñ¼üÈ¡Ïûµô£»ÓÃtab¼üÇл»µ½
¡°È·ÈÏ¡±±£´æ¡£
5) Ñ¡ÔñÍ˳ö£¬Í˳öÎı¾¹¤¾ß¡£
33 / 47
4.5 ÐÞ¸ÄÃÜÂë²ßÂÔ
ÐÞ¸Ä/etc/pam.d/system-authÎļþ£¬½ûÓø´ÔÓÃÜÂ룬ÔÊÐíʹÓüòµ¥ÃÜÂë¡£ [root@smart etc]#vi /etc/pam.d/system-auth
34 / 47
½«ºìÉ«×ÖÌåµÄÄÚÈÝ×¢Ê͵ô£»ÐÂÔöÀ¶É«×ÖÌåµÄÄÚÈÝ
#password required pam_passwdqc.so min=disabled,40,8,8,8 max=40 retry=3 password required pam_cracklib.so try_first_pass retry=99
ʹÓá°passwd+Óû§Ãû¡±µÄ·½Ê½ÐÞ¸ÄÃÜÂë¡£
4.6 Äں˲ÎÊýÅäÖÃ
Äں˲ÎÊýµÄÅäÖü´ÎªÐÞ¸Äsysctl.confÎļþ¡£
[root@smart etc]#vi /etc/sysctl.conf ---ÔÚ¸ÃÎļþÖÐÔö¼ÓÒÔÏÂÄÚÈÝ
net.ipv4.neigh.default.gc_thresh1=512 net.ipv4.neigh.default.gc_thresh2=2048 net.ipv4.neigh.default.gc_thresh3=4096
net.ipv4.ip_local_port_range=1024 65535 net.core.rmem_max=16777216 net.core.wmem_max=16777216
net.ipv4.tcp_rmem=4096 87380 16777216 net.ipv4.tcp_wmem=4096 65536 16777216 net.ipv4.tcp_fin_timeout=10 net.ipv4.tcp_tw_recycle=1 net.ipv4.tcp_timestamps=0
net.ipv4.tcp_window_scalling=0
35 / 47
net.ipv4.tcp_sack=0
net.core.netdev_max_backlog=30000 net.ipv4.tcp_no_metrics_save=1 net.core.somaxconn=262144
net.ipv4.tcp_max_orphans=262144 net.ipv4.tcp_max_syn_backlog=262144 net.ipv4.tcp_synack_retries=2 net.ipv4.tcp_syn_retries=2 vm.overcommit_memory=1 fs.file-max=2000000 fs.nr_open=2000000
±£´æÍ˳öºó£¬ÖØÆô»òÒÔrootÓû§Ö´ÐС°sysctl -p¡±ÑéÖ¤²¢Ê¹²ÎÊýÉúЧ¡£ [root@smart etc]#sysctl ¨Cp
ÉèÖóɹ¦£¬ÔòÕýÈ·Êä³ösysctlÖеÄÄÚÈÝ¡£
4.7 ÐÞ¸Ä×ÊÔ´ÏÞÖÆ
´ò¿ªÎļþÅäÖÃ/etc/security/limits.conf ---ÔÚ¸ÃÎļþÖÐÔö¼ÓÒÔÏÂÄÚÈÝ
smart soft nproc 4096 smart hard nproc 16384 smart soft nofile 65536 smart hard nofile 65536
//ulimit -aÏÔʾÓû§¿ÉÒÔʹÓõÄ×ÊÔ´ÏÞÖÆ
4.8 NTP¶ÔʱÅäÖÃ
Ìرð˵Ã÷£ºntpd·þÎñºÍntpdate·þÎñÊÇ»¥³âµÄ£¬ÔÚÅäÖÃʱÐè×¢ÒâÇø·Ö¡£
4.8.1 Ntp·þÎñÆ÷ÅäÖÃ
ºìÉ«×ÖÌåÊÇÐèÒª±£ÁôµÄÄÚÈÝ¡£ À¶É«×ÖÌåÊÇ¿ÉÑ¡ÔñÊÇ·ñ±£Áô¡£ 1£© ÐÞ¸Äntp.confÅäÖÃÎļþ
[root@smart etc]#vi /etc/ntp.conf
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
driftfile /var/lib/ntp/drift
36 / 47