Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

[ת]°²×°linuxºóµÄÄں˵÷ÓÅ

kernel.shmall = 268435456
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.ip_local_port_range = 5000 65000
net.ipv4.tcp_mem = 786432 1048576 1572864
net.core.wmem_max = 873200
net.core.rmem_max = 873200
net.ipv4.tcp_wmem = 8192 436600 873200
net.ipv4.tcp_rmem = 32768 436600 873200
net.core.somaxconn = 256
net.core.netdev_max_backlog = 1000
net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_retries2 = 5
net.ipv4.tcp_keepalive_time = 500
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.conf.lo.arp_ignore = 0
net.ipv4.conf.lo.arp_announce = 0
net.ipv4.conf.all.arp_ignore = 0
net.ipv4.conf.all.arp_announce = 0
¼¸¸ö½âÊÍ£º
net.ipv4.tcp_syncookies = 1
#±íʾ¿ªÆôSYN Cookies¡£µ±³öÏÖSYNµÈ´ý¶ÓÁÐÒç³öʱ£¬ÆôÓÃcookiesÀ´´¦Àí£¬¿É·À·¶ÉÙÁ¿SYN¹¥»÷£¬Ä¬ÈÏΪ0£¬±íʾ¹Ø±Õ£»
net.ipv4.tcp_tw_reuse = 1
#±íʾ¿ªÆôÖØÓá£ÔÊÐí½«TIME-WAIT socketsÖØÐÂÓÃÓÚеÄTCPÁ¬½Ó£¬Ä¬ÈÏΪ0£¬±íʾ¹Ø±Õ£»
net.ipv4.tcp_tw_recycle = 1
#±íʾ¿ªÆôTCPÁ¬½ÓÖÐTIME-WAIT socketsµÄ¿ìËÙ»ØÊÕ£¬Ä¬ÈÏΪ0£¬±íʾ¹Ø±Õ¡£
net.ipv4.tcp_fin_timeout = 30
#±íʾÈç¹ûÌ×½Ó×ÖÓɱ¾¶ËÒªÇó¹Ø±Õ£¬Õâ¸ö²ÎÊý¾ö¶¨ÁËËü±£³ÖÔÚFIN-WAIT-2״̬µÄʱ¼ä¡£
net.ipv4.tcp_keepalive_time = 1200
#±íʾµ±keepaliveÆðÓõÄʱºò£¬TCP·¢ËÍkeepaliveÏûÏ¢µÄƵ¶È¡£È±Ê¡ÊÇ2Сʱ£¬¸ÄΪ20·ÖÖÓ¡£
net.ipv4.ip_local_port_range = 1024    65000
#±íʾÓÃÓÚÏòÍâÁ¬½ÓµÄ¶Ë¿Ú·¶Î§¡£È±Ê¡Çé¿öϺÜС£º32768µ½61000£¬¸ÄΪ1024µ½65000¡£
net.ipv4.tcp_max_tw_buckets = 5000
#±íʾϵͳͬʱ±£³ÖTIME_WAITÌ×½Ó×ÖµÄ×î´óÊýÁ¿£¬Èç¹û³¬¹ýÕâ¸öÊý×Ö£¬
#TIME_WAITÌ×½Ó×Ö½«Á¢¿Ì±»Çå³ý²¢´òÓ¡¾¯¸æÐÅÏ¢¡£Ä¬ÈÏΪ180000£¬¸ÄΪ5000¡£
#¶ÔÓÚApache¡¢NginxµÈ·þÎñÆ÷£¬Éϼ¸ÐеIJÎÊý¿ÉÒԺܺõؼõÉÙTIME_WAITÌ×½Ó×ÖÊýÁ¿£


Ïà¹ØÎĵµ£º

ת±È½Ï²»´íµÄlinuxÊÓƵ½²×ù

V] ÁãÆðµãѧϰLinuxϵÁÐÅàѵÊÓƵ -1 £¨º®±ù×÷Æ·£©
http://www.boobooke.com/v/bbk1301
[V] ÁãÆðµãѧϰLinuxϵÁÐÅàѵÊÓƵ -2 £¨º®±ù×÷Æ·£©
http://www.boobooke.com/v/bbk1304
[V] ÁãÆðµãѧϰLinuxϵÁÐÅàѵÊÓƵ -3 £¨º®±ù×÷Æ·£©
http://www.boobooke.com/v/bbk1305
[V] ÁãÆðµãѧϰLinuxϵÁÐÅàѵÊÓƵ -4 £¨º®±ù×÷Æ·£©
......

JavaÅжÏOSÊÇlinux»¹ÊÇwindows

public class Test {
public static void main(String aa[]) {
if (System.getProperty("os.name").equals("Linux")) {
System.out.println("linux");
} else if (System.getProperty("os.name").equals("Windows XP")) {
System.out.println("win ......

LinuxÏÂÍê³ÉµÄÒ»¸ö×÷Òµ³ÌÐò

Îĵµ´´½¨ÈÕÆÚ£º2010-02-18
    01    // P173: 2.±à³ÌÌâ (5)ÊäÈëÒ»¸ö×Ö·û´®£¬Í³¼ÆÓ¢ÎÄ×Öĸ¡¢¿Õ¸ñ¡¢Êý×ÖºÍÆäËû×Ö·ûµÄ¸öÊý¡£
    02   
    03    // The beginning of C program: test06-05.c.
    04  ......

LinuxÏ´´½¨Îļþ

ÊÔÒ»ÊÔ£¬ÆäʵºÜ¼òµ¥µÄ¡£
mkdir -m 775 filename
-m : ÉèÖÃÎļþµÄȨÏÞ¡£Ö±½ÓÉèÖ㬲»ÐèҪĬÈÏȨÏÞ¡£
[root@localhost home]# mkdir text1
[root@localhost home]# mkdir -m 777 text2
[root@localhost home]# ls -l
drwxr-xr-x 2 root root 4096 2010-1-19 08:03 text1
drwxrwxrwx 2 root root 4096 2010-1-19 08:04 ......

Linux°æ±¾Ò»ÀÀ



Linux
°æ±¾
Ò»ÀÀ
 
 
Linux
ÊÇÒ»Ì×Ãâ·ÑʹÓúÍ×ÔÓÉ´«²¥µÄÀà
Unix
²Ù×÷ϵͳ¡£ÎÒÃÇͨ³£Ëù˵µÄ
Linux
£¬Ö¸µÄÊÇ
GNU/Linux
£¬¼´²ÉÓÃ
Linux
Äں˵Ä
GNU
²Ù×÷ϵͳ¡£ÓÉÓÚ
Linux
ÊÇÒ»¸öÄںˣ¬ËüÖ»ÊDzÙ×÷ϵͳµÄºËÐÄ£¬¸ºÔð¿ØÖÆÓ²¼þ¡¢¹ÜÀíÎļþϵͳ¡¢³ÌÐò½ø³ÌµÈ¡£È»¶øÒ»¸öÍêÕûµÄ²Ù×÷ϵͳ²»½ö½öÊÇÄÚºË ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ