1 <?xml version='1.0' encoding='EUC-KR' ?>
2 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="./style/manual.ko.xsl"?>
4 <!-- English Revision: 103425 -->
7 Copyright 2003-2004 The Apache Software Foundation
9 Licensed under the Apache License, Version 2.0 (the "License");
10 you may not use this file except in compliance with the License.
11 You may obtain a copy of the License at
13 http://www.apache.org/licenses/LICENSE-2.0
15 Unless required by applicable law or agreed to in writing, software
16 distributed under the License is distributed on an "AS IS" BASIS,
17 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 See the License for the specific language governing permissions and
19 limitations under the License.
22 <manualpage metafile="stopping.xml.meta">
24 <title>Áß´Ü°ú Àç½ÃÀÛ</title>
27 <p>ÀÌ ¹®¼´Â À¯´Ð½º·ù ½Ã½ºÅÛ¿¡¼ ¾ÆÆÄÄ¡¸¦ Áß´ÜÇÏ°í Àç½ÃÀÛÇÏ´Â
28 ³»¿ëÀ» ´ã°íÀÖ´Ù. À©µµ¿ìÁî NT, 2000, XP »ç¿ëÀÚ´Â <a
29 href="platform/windows.html#winsvc">¼ºñ½º·Î ¾ÆÆÄÄ¡
30 ½ÇÇàÇϱâ</a>¿¡¼, À©µµ¿ìÁî 9x¿Í ME »ç¿ëÀÚ´Â <a
31 href="platform/windows.html#wincons">ÄÝ¼Ö ÇÁ·Î±×·¥À¸·Î
32 ¾ÆÆÄÄ¡ ½ÇÇàÇϱâ</a>¿¡¼ Ç÷¡Æûº° ¾ÆÆÄÄ¡ Á¶ÀÛ¹ýÀ» ¾Ë ¼ö ÀÖ´Ù.</p>
35 <seealso><a href="programs/httpd.html">httpd</a></seealso>
36 <seealso><a href="programs/apachectl.html">apachectl</a></seealso>
38 <section id="introduction"><title>¼Ò°³</title>
40 <p>¾ÆÆÄÄ¡¸¦ Áß´ÜÇÏ°í Àç½ÃÀÛÇÏ·Á¸é ½ÇÇàÇÏ°í ÀÖ´Â
41 <code>httpd</code> ÇÁ·Î¼¼½º¿¡ ½Ã±×³ÎÀ» º¸³»¾ß ÇÑ´Ù. ½Ã±×³ÎÀ»
42 º¸³»´Â ¹æ¹ýÀº µÎ°¡Áö´Ù. Çϳª´Â À¯´Ð½º <code>kill</code>
43 ¸í·É¾î¸¦ »ç¿ëÇÏ¿© ÇÁ·Î¼¼½º¿¡ Á÷Á¢ ½Ã±×³ÎÀ» º¸³»´Â ¹æ¹ýÀÌ´Ù.
44 ½Ã½ºÅÛ¿¡ ¸¹Àº <code>httpd</code>°¡ ½ÇÇàµÇÁö¸¸, <directive
45 module="mpm_common">PidFile</directive>¿¡ pid°¡ ±â·ÏµÈ ºÎ¸ð¿Ü¿¡
46 ´Ù¸¥ ÇÁ·Î¼¼½º¿¡ ½Ã±×³Î(signal)À» º¸³»¸é ¾ÈµÈ´Ù. Áï, ºÎ¸ðÀÌ¿Ü¿¡
47 ´Ù¸¥ ÇÁ·Î¼¼½º¿¡ ½Ã±×³ÎÀ» º¸³¾ ÇÊ¿ä°¡ ¾ø´Ù´Â ¸»ÀÌ´Ù. ºÎ¸ð¿¡°Ô
48 º¸³¾ ¼ö ÀÖ´Â ½Ã±×³ÎÀº ¼¼°¡Áö·Î, ÀÌÁ¦ ¼³¸íÇÒ <code><a
49 href="#term">TERM</a></code>, <code><a
50 href="#hup">HUP</a></code>, <code><a
51 href="#graceful">USR1</a></code>ÀÌ´Ù.</p>
53 <p>´ÙÀ½°ú °°ÀÌ ºÎ¸ð¿¡°Ô ½Ã±×³ÎÀ» º¸³½´Ù:</p>
55 <example>kill -TERM `cat /usr/local/apache2/logs/httpd.pid`</example>
57 <p><code>httpd</code> ÇÁ·Î¼¼½º¿¡°Ô ½Ã±×³ÎÀ» º¸³»´Â ´Ù¸¥ ¹æ¹ýÀº
58 ¸í·ÉÇà ¿É¼Ç <code>-k</code>¸¦ »ç¿ëÇÏ´Â °ÍÀÌ´Ù. ¾Æ·¡¼ ¼³¸íÇÒ
59 <code>stop</code>, <code>restart</code>, <code>graceful</code>˼
60 <a href="programs/httpd.html">httpd</a> ½ÇÇàÆÄÀÏÀÇ ¾Æ±Ô¸ÕÆ®µéÀÌ´Ù.
61 ±×·¯³ª ÀÌ ¾Æ±Ô¸ÕÆ®µé·Î <code>httpd</code>¸¦ ½ÇÇàÇÏ´Â, <a
62 href="programs/apachectl.html">apachectl</a> ½ºÅ©¸³Æ®¸¦
65 <p><code>httpd</code>¿¡ ½Ã±×³ÎÀ» º¸³½ÈÄ, ´ÙÀ½ ¸í·É¾î·Î
66 ÁøÇà»óȲÀ» ¾Ë ¼ö ÀÖ´Ù:</p>
68 <example>tail -f /usr/local/apache2/logs/error_log</example>
70 <p>À§ ¿¹¸¦ ´ç½ÅÀÇ <directive
71 module="core">ServerRoot</directive>¿Í <directive
72 module="mpm_common">PidFile</directive> ¼³Á¤¿¡ ¾Ë¸Â°Ô ¼öÁ¤Ç϶ó.</p>
75 <section id="term"><title>´çÀå Áß´Ü</title>
77 <dl><dt>½Ã±×³Î: TERM</dt>
78 <dd><code>apachectl -k stop</code></dd>
81 <p><code>TERM</code>À̳ª <code>stop</code> ½Ã±×³ÎÀ» ºÎ¸ð¿¡°Ô
82 º¸³»¸é Áï½Ã ¸ðµç ÀÚ½ÄÀ» Á×ÀδÙ. ÀÚ½ÄÀ» ¿ÏÀüÈ÷ Á×À̴µ¥´Â
83 ¸î ÃÊ°¡ °É¸± ¼ö ÀÖ´Ù. ±×·±ÈÄ ºÎ¸ð°¡ Á¾·áÇÑ´Ù. ó¸®ÁßÀÎ ¿äûÀº
84 Áߴܵǰí, ´õ ÀÌ»ó ¿äûÀ» ¹ÞÁö¾Ê´Â´Ù.</p>
87 <section id="graceful"><title>Á¡ÀÝÀº Àç½ÃÀÛ</title>
89 <dl><dt>½Ã±×³Î: USR1</dt>
90 <dd><code>apachectl -k graceful</code></dd>
93 <p><code>USR1</code>À̳ª <code>graceful</code> ½Ã±×³ÎÀ»
94 ºÎ¸ð¿¡°Ô º¸³»¸é ºÎ¸ð ÇÁ·Î¼¼½º´Â Àڽĵ鿡°Ô ÇöÀç ¿äûÀ»
95 ó¸®ÇÑÈÄ Á¾·áÇ϶ó°í (ȤÀº ÇöÀç ¾Æ¹«°Íµµ ó¸®ÇÏÁö ¾Ê´Ù¸é
96 Áï½Ã Á¾·áÇ϶ó°í) <em>Á¶¾ðÇÑ´Ù</em>. ºÎ¸ð´Â ¼³Á¤ÆÄÀÏÀ»
97 ´Ù½ÃÀÐ°í ·Î±×ÆÄÀϵµ ´Ù½Ã ¿¬´Ù. ÀÚ½ÄÀÌ Á×À»¶§¸¶´Ù ºÎ¸ð´Â
98 Á×Àº ÀڽĴë½Å »õ·Î¿î ¼³Á¤ <em>¼¼´ë</em>¿¡ ±âÃÊÇÑ ÀÚ½ÄÀ»
99 ½ÇÇàÇÏ¿© Áï½Ã ¿äûÀ» ó¸®ÇÏ°Ô ÇÑ´Ù.</p>
101 <note>Á¡ÀÝÀº Àç½ÃÀÛ(graceful restart)À¸·Î <code>USR1</code>À»
102 »ç¿ëÇÒ ¼ö ¾ø´Â Ç÷¡Æû¿¡¼´Â ´ë½Å (<code>WINCH</code>¿Í °°Àº)
103 ´Ù¸¥ ½Ã±×³ÎÀ» »ç¿ëÇÒ ¼ö ÀÖ´Ù. <code>apachectl graceful</code>Àº
104 Ç÷¡Æû¿¡ ¾Ë¸ÂÀº ½Ã±×³ÎÀ» º¸³½´Ù.</note>
106 <p>Á¡ÀÝÀº Àç½ÃÀÛÀº Ç×»ó MPMÀÇ ÇÁ·Î¼¼½º Á¶Àý Áö½Ã¾î ¼³Á¤À»
107 °í·ÁÇÏ¿©, Àç½ÃÀÛµ¿¾È Ŭ¶óÀ̾ðÆ®¸¦ ¼ºñ½ºÇÏ´Â ÇÁ·Î¼¼½º³ª ¾²·¹µå°¡
108 Àû´çÇÑ ¼ö¸¦ À¯ÁöÇϵµ·Ï ¼³°èµÇ¾ú´Ù. °Ô´Ù°¡ <directive
109 module="mpm_common">StartServers</directive>´Â, ÀÏÃÊ ÈÄ
110 ÃÖ¼ÒÇÑ StartServers¸¸Å »õ·Î¿î ÀÚ½ÄÀÌ ¾È¸¸µé¾îÁö¸é ÀÚ½ÄÀÌ
111 StartServers °³°¡ µÇµµ·Ï »õ·Î ¸¸µç´Ù. Áï, ÇÁ·Î±×·¥Àº ¼¹öÀÇ
112 ÇöÀç ºÎÇÏ¿¡ ¾Ë¸ÂÀº ÀÚ½ÄÀÇ °³¼ö¸¦ À¯ÁöÇϸç,
113 <directive>StartServers</directive> ÆĶó¹ÌÅÍ·Î ÁöÁ¤ÇÑ ´ç½ÅÀÇ
116 <p><module>mod_status</module> »ç¿ëÀÚ´Â <code>USR1</code>À»
117 ¹ÞÀ»¶§ ¼¹ö Åë°è°¡ 0ÀÌ µÇÁö <strong>¾ÊÀ½À»</strong> ºÃÀ»
118 °ÍÀÌ´Ù. ¼¹ö´Â »õ·Î¿î ¿äûÀ» (¿î¿µÃ¼Á¦´Â À̵éÀ» Å¥¿¡ ´ã¾Æ¼
119 ¾î¶² °æ¿ì¿¡µµ ÀÒ¾î¹ö¸®Áö ¾Ê´Â´Ù) ó¸®ÇÏÁö ¸øÇÏ´Â ½Ã°£À»
120 ÃÖ¼ÒÈÇÏ°í ´ç½ÅÀÇ Æ©´× ÆĶó¹ÌÅ͸¦ Á¸ÁßÇϵµ·Ï ¸¸µé¾îÁ³´Ù.
121 À̸¦ À§ÇØ ¼¼´ë°£ ¸ðµç ÀÚ½ÄÀ» ±â·ÏÇÏ´Â <em>scoreboard</em>¸¦
124 <p>status ¸ðµâÀº ¶ÇÇÑ Á¡ÀÝÀº Àç½ÃÀÛ Àü¿¡ ½ÃÀÛÇÏ¿© ¾ÆÁ÷µµ
125 ¿äûÀ» ó¸®ÇÏ°í ÀÖ´Â ÀÚ½ÄÀ» <code>G</code>·Î ¾Ë·ÁÁØ´Ù.</p>
127 <p>ÇöÀç·Î´Â <code>USR1</code>À» »ç¿ëÇÏ´Â ·Î±×¼øȯ ½ºÅ©¸³Æ®°¡
128 Àç½ÃÀÛÀü¿¡ ¸ðµç ÀÚ½ÄÀÌ ·Î±×ÀÛ¼ºÀ» ¸¶ÃÆ´ÂÁö ¾Ë ¼ö ÀÖ´Â
129 ¹æ¹ýÀÌ ¾ø´Ù. ¿ì¸®´Â <code>USR1</code> ½Ã±×³ÎÀ» º¸³»°í
130 Àû´çÇÑ ½Ã°£ÀÌ Áö³ÈÄ ÀÌÀü ·Î±×¸¦ ´Ù·çµµ·Ï Á¦¾ÈÇÑ´Ù. ¿¹¸¦
131 µé¾î ³·Àº ´ë¿ªÆø »ç¿ëÀÚÀÇ °æ¿ì Á¢¼Ó ´ëºÎºÐÀÌ ¸¶Ä¡´Âµ¥ 10ºÐÀÌ
132 ¾È°É¸°´Ù¸é, ÀÌÀü ·Î±×¸¦ ´Ù·ç±âÀü¿¡ 15ºÐ ±â´Ù¸°´Ù.</p>
134 <note>¼³Á¤ÆÄÀÏ¿¡ ¿À·ù°¡ ÀÖ´Ù¸é Àç½ÃÀ۽à ºÎ¸ð´Â Àç½ÃÀÛÇÏÁö
135 ¾Ê°í ¿À·ù¸¦ ³»¸ç Á¾·áÇÑ´Ù. ¶Ç, Á¡ÀÝÀº Àç½ÃÀÛÀÇ °æ¿ì Á¾·áÇÒ¶§
136 ÀÚ½ÄÀÌ ½ÇÇàµÇµµ·Ï ³öµÐ´Ù. (ÀڽĵéÀº ÀÚ½ÅÀÇ ¸¶Áö¸· ¿äûÀ»
137 ó¸®ÇÏ°í "Á¡ÀÝ°Ô Á¾·áÇÑ´Ù".) ÀÌ´Â ¼¹ö¸¦ Àç½ÃÀÛÇÒ¶§
138 ¹®Á¦°¡ µÈ´Ù. ¼¹ö´Â ÀÚ½ÅÀÌ ±â´Ù¸± Æ÷Æ®¿¡ ¿¬°áÇÏÁö ¸øÇÑ´Ù.
139 Àç½ÃÀÛÀü¿¡ <code>-t</code> ¸í·ÉÇà ¿É¼Ç(<a
140 href="programs/httpd.html">httpd</a> Âü°í)À¸·Î ¼³Á¤ÆÄÀÏ
141 ¹®¹ýÀ» °Ë»çÇÒ ¼ö ÀÖ´Ù. ±×·¯³ª ÀÌ·± °Ë»çµµ ¼¹ö°¡ ¿Ã¹Ù·Î
142 Àç½ÃÀÛÇÒÁö¸¦ º¸ÀåÇÏÁö ¸øÇÑ´Ù. ¼³Á¤ÆÄÀÏÀÇ ¹®¹ýÀÌ ¾Æ´Ñ Àǹ̸¦
143 °Ë»çÇÏ·Á¸é root°¡ ¾Æ´Ñ »ç¿ëÀÚ·Î <code>httpd</code>¸¦ ½ÃÀÛÇغ¼ ¼ö ÀÖ´Ù.
144 root°¡ ¾Æ´Ï±â¶§¹®¿¡ (¾Æ´Ï¸é ÇöÀç ±× Æ÷Æ®¸¦ »ç¿ëÇÏ´Â
145 <code>httpd</code>°¡ ½ÇÇàµÇ±â¶§¹®¿¡) ¿À·ù°¡ ¾ø´Ù¸é ¼ÒÄÏ°ú
146 ·Î±×ÆÄÀÏÀ» ¿·Á°í ½ÃµµÇÏ´Â °úÁ¤¿¡¼ ½ÇÆÐÇÒ °ÍÀÌ´Ù. ´Ù¸¥
147 ÀÌÀ¯¶§¹®¿¡ ½ÇÆÐÇÑ´Ù¸é ¾Æ¸¶µµ ¼³Á¤ÆÄÀÏ¿¡ ¿À·ù°¡ ÀÖÀ» °ÍÀÌ´Ù.
148 Á¡ÀÝÀº Àç½ÃÀÛÀ» ÇϱâÀü¿¡ ¿À·ù¸¦ °íÃľßÇÑ´Ù.</note>
151 <section id="hup"><title>´çÀå Àç½ÃÀÛ</title>
153 <dl><dt>½Ã±×³Î: HUP</dt>
154 <dd><code>apachectl -k restart</code></dd>
157 <p><code>HUP</code>À̳ª <code>restart</code> ½Ã±×³ÎÀ»
158 ºÎ¸ð¿¡°Ô º¸³»¸é <code>TERM</code>°ú °°ÀÌ ¸ðµç ÀÚ½ÄÀ»
159 Á×ÀÌÁö¸¸ ºÎ¸ð´Â Á¾·áÇÏÁö ¾Ê´Â´Ù. ºÎ¸ð´Â ¼³Á¤ÆÄÀÏÀ» ´Ù½ÃÀаí
160 ·Î±×ÆÄÀÏÀ» ´Ù½Ã ¿¬´Ù. ±×¸®°í »õ·Î¿î ÀڽĵéÀ» ¸¸µé°í ¼ºñ½º¸¦
163 <p><module>mod_status</module> »ç¿ëÀÚ´Â <code>HUP</code>¸¦
164 º¸³»¸é ¼¹ö Åë°è°¡ 0ÀÌ µÊÀ» ¾Ë ¼ö ÀÖ´Ù.</p>
166 <note>¼³Á¤ÆÄÀÏ¿¡ ¿À·ù°¡ ÀÖ´Ù¸é Àç½ÃÀÛÀ» Çصµ ºÎ¸ð´Â Àç½ÃÀÛÇÏÁö
167 ¾Ê°í ¿À·ù¸¦ ³»¸ç Á¾·áÇÒ °ÍÀÌ´Ù. À̸¦ ÇÇÇÏ´Â ¹æ¹ýÀº À§¸¦ Âü°íÇ϶ó.</note>
170 <section id="race"><title>ºÎ·Ï: ½Ã±×³Î°ú ·¹À̽º ÄÁµð¼Ç</title>
172 <p>Apache 1.2b9 ÀÌÀü¿¡´Â Àç½ÃÀÛ°ú Á¾·á ½Ã±×³Î¿¡ °ü°èµÈ
173 <em>·¹À̽º ÄÁµð¼Ç(race condition)</em>ÀÌ ÀÖ¾ú´Ù. (·¹À̽º
174 ÄÁµð¼ÇÀº °£´ÜÇÑ ¼³¸íÇÏÀÚ¸é, ¾î¶² ÀÏÀÌ À߸øµÈ¶§ ÀϾ¼
175 ±â´ëÇÑ´ë·Î µ¿ÀÛÇÏÁö ¾Ê´Â ½Ã°£¿¡ ¹Î°¨ÇÑ ¹®Á¦´Ù.) "¿Ã¹Ù¸¥"
176 ±â´ÉÀÌ ÀÖ´Â ¾ÆÅ°ÅØÃÄ¿¡¼ ¿ì¸®´Â ÀÌ·± ¹®Á¦¸¦ ÃÖ´ëÇÑ ÇØ°áÇß´Ù.
177 ±×·¯³ª ¾î¶² ¾ÆÅ°ÅØÃÄ¿¡´Â ¾ÆÁ÷µµ ·¹À̽º ÄÁµð¼ÇÀÌ Á¸ÀçÇÔÀ»
180 <p><directive module="mpm_common">ScoreBoardFile</directive>À»
181 µð½ºÅ©¿¡ ÀúÀåÇÏ´Â ¾ÆÅ°ÅØÃÄ´Â scoreboard¸¦ ¸Á°¡Æ®¸± °¡´É¼ºÀÌ
182 ÀÖ´Ù. ±×·¯¸é (<code>HUP</code>ÈÄ) "bind: Address already in use"
183 ȤÀº (<code>USR1</code> ÈÄ) "long lost child came home!"ÀÌ
184 ¹ß»ýÇÒ ¼ö ÀÖ´Ù. ÀüÀÚ´Â ½É°¢ÇÑ ¿À·ùÀÌ°í, ÈÄÀÚ´Â ´ÜÁö ¼¹ö°¡
185 scoreboard slotÀ» ÀÒ°Ô ¸¸µç´Ù. ±×·¡¼ °Á¦ Àç½ÃÀÛÀ» ÁÙÀÌ°í
186 Á¡ÀÝÀº Àç½ÃÀÛÀ» »ç¿ëÇϱæ ÃßõÇÑ´Ù. ÀÌ ¹®Á¦´Â ÇØ°áÇϱ⠸ſì
187 Èûµé´Ù. ±×·¯³ª ´ÙÇàÈ÷µµ ´ëºÎºÐÀÇ ¾ÆÅ°ÅØÃÄ´Â scoreboard·Î ÆÄÀÏÀ»
188 »ç¿ëÇÏÁö ¾Ê´Â´Ù. ÆÄÀÏÀ» »ç¿ëÇÏ´Â ¾ÆÅ°ÅØÃĶó¸é <directive
189 module="mpm_common">ScoreBoardFile</directive> ¹®¼¸¦ Âü°íÇ϶ó.</p>
191 <p>¸ðµç ¾ÆÅ°ÅØÃÄ¿¡´Â Áö¼ÓµÇ´Â HTTP ¿¬°á (KeepAlive)¿¡¼
192 µÎ¹ø° ÀÌÈÄ ¿äûÀ» ó¸®ÇÏ´Â ÀڽĿ¡ ¾à°£ÀÇ ·¹À̽º ÄÁµð¼ÇÀÌ
193 ÀÖ´Ù. ÀÚ½ÄÀº ¿äûÁÙÀ» ÀÐÀº ÈÄ ¿äû Çì´õ¸¦ ÀбâÀü¿¡ Á¾·áÇÒ ¼ö
194 ÀÖ´Ù. ÀÌ ¹®Á¦´Â ³Ê¹« ´Ê°Ô ¹ß°ßÇÏ¿© 1.2 ¹öÀüÀÌ ³ª¿ÂÈÄ¿¡¾ß
195 ¼öÁ¤µÇ¾ú´Ù. ±×·¯³ª ³×Æ®¿÷ Áö¿¬À̳ª ¼¹ö ½Ã°£Á¦ÇѶ§¹®¿¡ KeepAlive
196 Ŭ¶óÀ̾ðÆ®´Â ÀÌ·± °æ¿ì¸¦ ¿¹»óÇؾßÇϱ⠶§¹®¿¡ ÀÌ·Ð»ó ¹®Á¦´Â
197 ¾ÈµÈ´Ù. ½ÇÁ¦·Î ¼¹ö¸¦ °Ë»çÇϱâÀ§ÇØ ÀÏÃÊ¿¡ 20¹ø Àç½ÃÀÛÇÏ´Â µ¿¾È
198 Ŭ¶óÀ̾ðÆ®°¡ ±úÁø ±×¸²À̳ª ºó ¹®¼¾øÀÌ »çÀÌÆ®¸¦ ¼º°øÀûÀ¸·Î
199 ÀоîµéÀÌ±æ ±â´ëÇÏÁö ¾Ê´Â´Ù¸é ¹®Á¦°¡ ¾ÈµÈ´Ù.</p>