service ã³ãã³ãã«ã¤ãã¦èª¿ã¹ã¦ã¿ã
æ¥å㧠CentOS ãªãµã¼ãã触ããã¨ãå¤ããªããæè¿ service ã³ãã³ã(ä»¥ä¸ service)㧠daemon ã®èµ·åçãåºæ¥ãäºãç¥ã£ããDebian ããã£ã¨ä½¿ã£ã¦ãã身ã¨ãã¦ã¯å ¨ç¶ãªãã¿ãç¡ãã¦
% sudo /etc/init.d/hoge start
ã§å®è¡ããã®ã¨
% sudo /sbin/service hoge start
ã§å®è¡ãããã¨ã®éãã¯ãªãã ãããã¨æã£ããããã§ãservice ã®ã½ã¼ã¹*1ãèªãã§ã¿ãã¨ãããéãã便å©ãªæ©è½ããããã¨ãåãã£ãã
service ã§å®è¡ããæã¯ä¸é¨ã®ç°å¢å¤æ°ããå¼ãç¶ãããªã
/etc/init.d ã§å®è¡ããæã«ã¯ããã¹ã¦ã®ç°å¢å¤æ°ãæå¹ãªã¾ã¾å®è¡ãããã®ã«å¯¾ãã¦ãservice ã§å®è¡ããæã«ã¯ã以ä¸ã®ç°å¢å¤æ°ããå¼ãç¶ãããªãäºãåãã£ãã
- LANG
- PATH
- TERM
env ã³ãã³ãã® -i ãªãã·ã§ã³ã§ä¸è¨ç°å¢å¤æ°ä»¥å¤ãç¡å¹ã«ãã¦ããããã§ããã
ããã«ããã/etc/init.d 㨠service ã§ã¯ããããªããéãããããã¨ãåãã£ãã
service ã®ä¾¿å©ãªæ©è½
service ã«ã¯ /etc/init.d 以ä¸ã«ãããã¹ã¦ã® daemon ã®ç¶æ ã確èªã§ãããªãã·ã§ã³ãããã
% sudo /sbin/service --status-all
ãããå®è¡ããã¨ãdaemon ç¶æ ãä¸è¦§ã§è¡¨ç¤ºããããå人çã«ã¯ä¾¿å©ã ã¨æã£ãã
ã¾ã¨ã
ä»å調æ»ããã¾ã§ã/etc/init.d 㨠service ã¯ç価ãªãã®ã ã¨æã£ã¦ã¦ãèªåãæ £ãã¦ã/etc/init.d ã使ã£ã¦ããã©ãCentOS ã使ãæã«ã¯ service ã使ãããã«çµ±ä¸ããã®ãããæ°ãããã
*1:å®ä½ã¯ã·ã§ã«ã¹ã¯ãªãã