Linuxï¼CentOSï¼ã®æè¡æ å ±ãã¾ã¨ãã¦ãã¾ãã åºç¤ç¥èãTipsãåãµã¼ãã¹ã®è¨å®æ¹æ³ã®è§£èª¬ããã¦ããã¾ãã
æ¡å¤èº«è¿ãªï¼ LDAP å¤ãããåå¨ããã®ã§ããã使ç¨ããæ©ä¼ããªãã¨ãªããªãæ¦å¿µãç解ãããã¨ãã§ããªããããã³ã«ããã®ã²ã¨ã¤ãLDAPï¼Lightweight Directory Access Protocolï¼ã§ã¯ãªãã§ããããï¼å°ãªãã¨ãæ°å¹´åã®çè ã¯ããã§ãããLDAPã¯ãã¨ã«ããããã¨çºé³ãã¾ãã HTTPã¯ã©ã¤ã¢ã³ããHTTPãµã¼ãããããããLDAPã«ããµã¼ããã¯ã©ã¤ã¢ã³ãã¨ããæ¦å¿µãåå¨ãã¾ããLDAPãµã¼ãã¨ã¯ä¸è¨ã§è¨ãã°ãã¼ã¿ãã¼ã¹ãµã¼ããªã®ã§ãããåãããã«ãã¼ã¿ãã¼ã¹ã«åé¡ãããPostgreSQLãMySQLãOracleãªã©ã®RDBMSï¼Relational Data Base Management Systemï¼ã¨æ¯è¼ããã¨ãä¸é·ä¸çãããããã管ç対象ã®ãã¼ã¿ã«ãã£ã¦ä¸¡è ã®ä½¿ãåããè¡ãã®ãè³¢ãé¸æã§ãã ãã¨ãã°LDAPã¨ã¯ãã¼ã¿è¿½å ãåé¤ãããæ¤ç´¢ãé
ã©ã¡ããä¸æãã¡ã¤ã«ãä¿åãããã£ã¬ã¯ããªã ããã©ãã¡ããã¨èª¬æããã£ãã®ã§ã¡ã¢ã /tmp ã»åèµ·åããã¨ãã¡ã¤ã«ã¯æ¶ãã ã»å®æçã«åé¤ãããï¼10æ¥ï¼ /var/tmp ã»åèµ·åãã¦ããã¡ã¤ã«ã¯æ¶ããªã ã»å®æçã«åé¤ãããï¼30æ¥ï¼ CentOS 6.xã®å ´åã»ã»ã» åèµ·åå¾ã®å¦çã¯ã/etc/rc.d/rc.sysinit ã§è¡ãããã å®æçã«åé¤ããå¦çã¯ã/etc/cron.daily/tmpwatch ã§è¡ãããã ãããã®ç¨éã¯ãFHSï¼Filesystem Hierarchy Standard(ãã¡ã¤ã«ã·ã¹ãã é層æ¨æºï¼ã«è¨è¼ããã¦ããã Filesystem Hierarchy Standard http://www.pathname.com/fhs/ FHS 2.3ã«ããã¨ã»ã»ã» /tmpï¼P.15 The /tmp directory must be made
Dominic Alves æ®æ®µä½æ°ãªãå©ç¨ãã¦ãã/tmpã¨/var/tmpã æèãã¦ä½¿ãåãã¦ãæ¹ãåãã¦ãªãæ¹ãããã£ããããã¨æãã¾ãã Linuxã®ãã¡ã¤ã«ã·ã¹ãã ã¨ãã¦ã®åå¨æ義ããä¸æãã©ã«ãã¨ãã¦ã®æ©è½ãæ¹ãã¦æèãã㨠é常ã«ä¾¿å©ãªåå¨ã§ãã /tmpã¨/var/tmpã®éã ã/tmpã¨/var/tmpã®éãã«ã¤ãã¦è¿°ã¹ããã»ã»ã»ã¤ã³ãã©ã¨ã³ã¸ãã¢ã®å ¥ç¤¾è©¦é¨ã®åé¡ã«åºã¦ãããã§ããã ãã¦åç´ãªè§£çã§ãããã·ã¹ãã çãªãã¨ãè¨ãã°ä»¥ä¸ãããã§ãã(RHEL) /tmp /var/tmp ã©ã¡ãããã£ã¬ã¯ããªé ä¸ã¯tmpwatchã³ãã³ãã«ããç£è¦ãããã¡ã¤ã«ã®åé¤ãçµã¿è¾¼ã¾ãã¦ãã¾ãã $ cat /etc/cron.daily/tmpwatch #! /bin/sh flags=-umc /usr/sbin/tmpwatch "$flags" -x /tmp/.X1
GNUã®cpã使ã£ã¦å¤§éã®ãã¡ã¤ã«ãã³ãã¼ããã¨ãããcpã®è¨è¨ä¸ã®åé¡ã§ã極ãã¦ã³ãã¼ãé ãã£ãã¨ããã話ã My experience with using cp to copy a lot of files (432 millions, 39 TB) ããã俺ã¯æè¿ã大éã®ãã¡ã¤ã«ãã³ãã¼ããå¿ è¦ããã£ããã ããUNIXã¯20å¹´ããã£ã¦ãã俺ã®çµé¨ããããcpã®æåã«ã¯é©ãããããã俺ã®æè¦ã¯ã³ãã¥ããã£ã«å ±æãããã¹ãã ã¨æãã ç°å¢ï¼å¤ãDellã®ãµã¼ãã¼ï¼2ã³ã¢ãåæã¡ã¢ãª2GBã追å ãã¦10GBãUbuntu Trustyï¼ã¨ãæ°ããDellã®ã¹ãã¬ã¼ã¸æ ¼ç´æ©(MD 1200)ã«ããã12åã®4TBãã£ã¹ã¯ã§RAID 6ãè¨å®ãã¦ãã£ã¦ãå ¨ä½ã§40TBã®è¦é ãæã¡ãäºã¤ã®ãã©ã¤ããåæã«å¤±æãã¦ãåé¡ãªãç°å¢ããµã¼ãã¼ã¯é éå°ããã¯ã¢ããã«ä½¿ããã¦ãã¦ããã£ã¹ã¯ã¸ã®æ¸ãè¾¼ã¿ã
ï¼ è¥èãã¼ã¯ç®¡çè ã«æ§ãã ï¼ LinuxãUNIXãWindowsã®ãã¡ã¤ã«ãµã¼ãï¼ããªã³ããµã¼ãã¨ãã¦ãã¾ããã¨ãã§ãããSambaãã¯ãæ軽ã«ãã¡ã¤ã«å ±æç°å¢ãæ§ç¯ãããã¨ãã§ãããµã¼ã管çå ¥éã«ãã´ã£ããã§ããã¤ã³ã¿ã¼ãããä¸ã®é¢é£æ å ±ãè±å¯ã§ããããã£ããåºæã確ãããªãã¨èª¤ã£ãè¨å®ãæãæããããã¾ãã ãªã¼ãã³ã½ã¼ã¹ã»ã½ãªã¥ã¼ã·ã§ã³ã»ãã¯ããã¸æ ªå¼ä¼ç¤¾ 代表åç· å½¹ ãã¼ãã¢ã¼ããã¯ã å°ç°å èå¸ 2008/4/22 Windowsã¨ã®ãã¡ã¤ã«äº¤æãæ軽ã«å®ç¾ããSamba Sambaã¯ãLinuxãUNIXãWindowsã®ãã¡ã¤ã«ãµã¼ãï¼ããªã³ããµã¼ãã¨ãã¦ãã¾ããã¨ãã§ãããªã¼ãã³ã½ã¼ã¹ã½ããã¦ã§ã¢ï¼OSSï¼ã§ããSambaã®å°å ¥ã«ãã£ã¦ãLinuxã¨Windowsãæ··å¨ããç°å¢ã§ãæ軽ã«æ å ±å ±æãè¡ããããã«ãªãã¾ãã Sambaã¯ã大ãã以ä¸ã®4ã¤ã®æ©è½ãæä¾ãã¾
ä»æ¥ä¼ç¤¾ã®éçºãµã¼ãã§hitodeåã¨éãã§ã¦ãåãã¦ããããã»ã¹ã調ã¹ã¦ããã®ã§ã¡ã¢ã åãã¦ããããã»ã¹ãç¥ããã åºæ¬çã ps ax ps auxã¨ãããã¨ãã¡ã¢ãªä½¿ç¨éã¨ãããããè¦ããã åãã¦ããããã»ã¹ã®é¢ä¿ãå«ãã¦ç¥ããã pstreeã³ãã³ãã§ã§ãããã¨ããããã©ããªæãã«å®è¡ããã¦ããããµããªã¼ãç¥ãããæã¯ä»¥ä¸ã®ã³ãã³ãã pstree ããããæãããã¾ãã¦ããã®ã§ããããå±éãããæã¯-cãã¤ããã pstree -c ã³ãã³ãã®å¼æ°ã¨ãã表示ãããæã¯-aã¤ãã pstree -ac pidãç¥ãããæã¯-pã¤ãã pstree -acp 表示ãã¦ã¿ãã¨{}ã§å²ã¾ãã¦ãããã¤ããããã©ãããã¯å¤åthreadãªãã ããã¨æããlinuxã§ã¯threadã®idã¯pidã®ããã«ç®¡çããã¦ããã¿ããã ã¡ã¢ãªãCPUãæ¶è²»ãã¦ããããã»ã¹ãç¥ã topã¨ãã§ãããã
Winã§VPSããã®ã«å¿ è¦ãªã½ãã ä½ã¯ã¨ãããPuTTYãPuTTYã¯VPSã¨éä¿¡ããçºã®ã½ãããä»ã«ãTeraTermãªã©ãããã©ãããåãããªããªãPuTTYã Windowsã®sshã¯ã©ã¤ã¢ã³ãä¸å¼·ã®å人çãªæ¯è¼ | å ¨èªåããã¾ãæ© ãããã®ã³ã³ããã§ãµã¼ãã¼ãèµ·åãããWinã§PuTTYãèµ·åãã¦VPSãæä½ãããã³ã³ããã«ããããªã¢ã¼ãã³ã³ã½ã¼ã«ãã¯åºæ¬çã«ç·æ¥æã«ä½¿ããã®ãã¡ãªã¿ã«ç§ã¯ãµã¼ãã¼èµ·åå¾ã«ããã«ä¸ååèµ·åããªãã¨PuTTYã§å ¥ãã¾ããã§ããã PuTTYã§VPSã®ã³ã³ã½ã¼ã«ã表示ããã®ããMacã«ããããssh [email protected]ãã¨åãã§ããããã§ãããã¤ã³ã¹ãã¼ã«ãã¬ã·ã¬ã·é²ãã¾ãã ãããã¤ã³ã¹ãã¼ã«ã®è©²å½ç¯å² ãããã®VPSã¸æ¥ç¶ãã¦ã¿ãã ä½æ¥ç¨ã¦ã¼ã¶ã¼ãè¨å®ããã æ¥æ¬èªç¢ºèªã§åãã¾ããPuTTYã®æåã³ã¼ããEUCããUTF-8ã«å¤
ã¯ããã« ããããæ¸ãå 容ã¯ãã·ã§ã«ã¹ã¯ãªãããã°ãã°ãæ¸ãã¦ããç¾å ´(ãµã¼ãã¨ã³ã¸ãã¢ã»ã¤ã³ãã©ã¨ã³ã¸ãã¢)åãã®ãã®ã§ã¯ããã¾ããã å¹´ã«æ°åcrontabãããããããªç¾å ´(ãµã¼ãã«è©³ãããªãã¢ããªã±ã¼ã·ã§ã³ããã°ã©ããå¤æ°ãå ãããããªç¾å ´ã¨ããWebãã¶ã¤ããéããã°ã©ããcrontabãããããããããã£ãããããããªç¾å ´)ãæ³å®ãã¦ãã¾ãã >/dev/null 2>&1 ã®åé¡ç¹ ãã®è¨æ³ã®åé¡ç¹ã¯ããè¦ãã«ãããééãããããééã£ã¦ã¦ãæ°ã¥ããªããã¨ãããã¨ã§ãã åå¿è ãè¿·ãããè¦ç´ ããããªã«ããã¾ãã >/dev/nullã¯å ãå¾ã 1ã¨2ã¯ã©ã¡ããå ã &ã¯ã©ãã«æ¸ãã®ã ãã£ã¦ä¸è¨ã®ããã«å¤ç¨®å¤æ§ãªãã¹ãèµ·ããå¾ã¾ãã 2>&1 >/dev/null >/dev/null 1>&2 >/dev/null 2>1& >/dev/null &2>1 ãããã±ã£ã¨è¦ã¦
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}