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: 105989:586770 (outdated) -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <manualpage metafile="stopping.xml.meta">
25 <title>Áß´Ü°ú Àç½ÃÀÛ</title>
28 <p>ÀÌ ¹®¼´Â À¯´Ð½º·ù ½Ã½ºÅÛ¿¡¼ ¾ÆÆÄÄ¡¸¦ Áß´ÜÇÏ°í Àç½ÃÀÛÇÏ´Â
29 ³»¿ëÀ» ´ã°íÀÖ´Ù. À©µµ¿ìÁî NT, 2000, XP »ç¿ëÀÚ´Â <a
30 href="platform/windows.html#winsvc">¼ºñ½º·Î ¾ÆÆÄÄ¡
31 ½ÇÇàÇϱâ</a>¿¡¼, À©µµ¿ìÁî 9x¿Í ME »ç¿ëÀÚ´Â <a
32 href="platform/windows.html#wincons">ÄÝ¼Ö ÇÁ·Î±×·¥À¸·Î
33 ¾ÆÆÄÄ¡ ½ÇÇàÇϱâ</a>¿¡¼ Ç÷¡Æûº° ¾ÆÆÄÄ¡ Á¶ÀÛ¹ýÀ» ¾Ë ¼ö ÀÖ´Ù.</p>
36 <seealso><a href="programs/httpd.html">httpd</a></seealso>
37 <seealso><a href="programs/apachectl.html">apachectl</a></seealso>
39 <section id="introduction"><title>¼Ò°³</title>
41 <p>¾ÆÆÄÄ¡¸¦ Áß´ÜÇÏ°í Àç½ÃÀÛÇÏ·Á¸é ½ÇÇàÇÏ°í ÀÖ´Â
42 <code>httpd</code> ÇÁ·Î¼¼½º¿¡ ½Ã±×³ÎÀ» º¸³»¾ß ÇÑ´Ù. ½Ã±×³ÎÀ»
43 º¸³»´Â ¹æ¹ýÀº µÎ°¡Áö´Ù. Çϳª´Â À¯´Ð½º <code>kill</code>
44 ¸í·É¾î¸¦ »ç¿ëÇÏ¿© ÇÁ·Î¼¼½º¿¡ Á÷Á¢ ½Ã±×³ÎÀ» º¸³»´Â ¹æ¹ýÀÌ´Ù.
45 ½Ã½ºÅÛ¿¡ ¸¹Àº <code>httpd</code>°¡ ½ÇÇàµÇÁö¸¸, <directive
46 module="mpm_common">PidFile</directive>¿¡ pid°¡ ±â·ÏµÈ ºÎ¸ð¿Ü¿¡
47 ´Ù¸¥ ÇÁ·Î¼¼½º¿¡ ½Ã±×³Î(signal)À» º¸³»¸é ¾ÈµÈ´Ù. Áï, ºÎ¸ðÀÌ¿Ü¿¡
48 ´Ù¸¥ ÇÁ·Î¼¼½º¿¡ ½Ã±×³ÎÀ» º¸³¾ ÇÊ¿ä°¡ ¾ø´Ù´Â ¸»ÀÌ´Ù. ºÎ¸ð¿¡°Ô
49 º¸³¾ ¼ö ÀÖ´Â ½Ã±×³ÎÀº ¼¼°¡Áö·Î, ÀÌÁ¦ ¼³¸íÇÒ <code><a
50 href="#term">TERM</a></code>, <code><a
51 href="#hup">HUP</a></code>, <code><a
52 href="#graceful">USR1</a></code>ÀÌ´Ù.</p>
54 <p>´ÙÀ½°ú °°ÀÌ ºÎ¸ð¿¡°Ô ½Ã±×³ÎÀ» º¸³½´Ù:</p>
56 <example>kill -TERM `cat /usr/local/apache2/logs/httpd.pid`</example>
58 <p><code>httpd</code> ÇÁ·Î¼¼½º¿¡°Ô ½Ã±×³ÎÀ» º¸³»´Â ´Ù¸¥ ¹æ¹ýÀº
59 ¸í·ÉÇà ¿É¼Ç <code>-k</code>¸¦ »ç¿ëÇÏ´Â °ÍÀÌ´Ù. ¾Æ·¡¼ ¼³¸íÇÒ
60 <code>stop</code>, <code>restart</code>, <code>graceful</code>˼
61 <a href="programs/httpd.html">httpd</a> ½ÇÇàÆÄÀÏÀÇ ¾Æ±Ô¸ÕÆ®µéÀÌ´Ù.
62 ±×·¯³ª ÀÌ ¾Æ±Ô¸ÕÆ®µé·Î <code>httpd</code>¸¦ ½ÇÇàÇÏ´Â, <a
63 href="programs/apachectl.html">apachectl</a> ½ºÅ©¸³Æ®¸¦
66 <p><code>httpd</code>¿¡ ½Ã±×³ÎÀ» º¸³½ÈÄ, ´ÙÀ½ ¸í·É¾î·Î
67 ÁøÇà»óȲÀ» ¾Ë ¼ö ÀÖ´Ù:</p>
69 <example>tail -f /usr/local/apache2/logs/error_log</example>
71 <p>À§ ¿¹¸¦ ´ç½ÅÀÇ <directive
72 module="core">ServerRoot</directive>¿Í <directive
73 module="mpm_common">PidFile</directive> ¼³Á¤¿¡ ¾Ë¸Â°Ô ¼öÁ¤Ç϶ó.</p>
76 <section id="term"><title>´çÀå Áß´Ü</title>
78 <dl><dt>½Ã±×³Î: TERM</dt>
79 <dd><code>apachectl -k stop</code></dd>
82 <p><code>TERM</code>À̳ª <code>stop</code> ½Ã±×³ÎÀ» ºÎ¸ð¿¡°Ô
83 º¸³»¸é Áï½Ã ¸ðµç ÀÚ½ÄÀ» Á×ÀδÙ. ÀÚ½ÄÀ» ¿ÏÀüÈ÷ Á×À̴µ¥´Â
84 ¸î ÃÊ°¡ °É¸± ¼ö ÀÖ´Ù. ±×·±ÈÄ ºÎ¸ð°¡ Á¾·áÇÑ´Ù. ó¸®ÁßÀÎ ¿äûÀº
85 Áߴܵǰí, ´õ ÀÌ»ó ¿äûÀ» ¹ÞÁö¾Ê´Â´Ù.</p>
88 <section id="graceful"><title>Á¡ÀÝÀº Àç½ÃÀÛ</title>
90 <dl><dt>½Ã±×³Î: USR1</dt>
91 <dd><code>apachectl -k graceful</code></dd>
94 <p><code>USR1</code>À̳ª <code>graceful</code> ½Ã±×³ÎÀ»
95 ºÎ¸ð¿¡°Ô º¸³»¸é ºÎ¸ð ÇÁ·Î¼¼½º´Â Àڽĵ鿡°Ô ÇöÀç ¿äûÀ»
96 ó¸®ÇÑÈÄ Á¾·áÇ϶ó°í (ȤÀº ÇöÀç ¾Æ¹«°Íµµ ó¸®ÇÏÁö ¾Ê´Ù¸é
97 Áï½Ã Á¾·áÇ϶ó°í) <em>Á¶¾ðÇÑ´Ù</em>. ºÎ¸ð´Â ¼³Á¤ÆÄÀÏÀ»
98 ´Ù½ÃÀÐ°í ·Î±×ÆÄÀϵµ ´Ù½Ã ¿¬´Ù. ÀÚ½ÄÀÌ Á×À»¶§¸¶´Ù ºÎ¸ð´Â
99 Á×Àº ÀڽĴë½Å »õ·Î¿î ¼³Á¤ <em>¼¼´ë</em>¿¡ ±âÃÊÇÑ ÀÚ½ÄÀ»
100 ½ÇÇàÇÏ¿© Áï½Ã ¿äûÀ» ó¸®ÇÏ°Ô ÇÑ´Ù.</p>
102 <note>Á¡ÀÝÀº Àç½ÃÀÛ(graceful restart)À¸·Î <code>USR1</code>À»
103 »ç¿ëÇÒ ¼ö ¾ø´Â Ç÷¡Æû¿¡¼´Â ´ë½Å (<code>WINCH</code>¿Í °°Àº)
104 ´Ù¸¥ ½Ã±×³ÎÀ» »ç¿ëÇÒ ¼ö ÀÖ´Ù. <code>apachectl graceful</code>Àº
105 Ç÷¡Æû¿¡ ¾Ë¸ÂÀº ½Ã±×³ÎÀ» º¸³½´Ù.</note>
107 <p>Á¡ÀÝÀº Àç½ÃÀÛÀº Ç×»ó MPMÀÇ ÇÁ·Î¼¼½º Á¶Àý Áö½Ã¾î ¼³Á¤À»
108 °í·ÁÇÏ¿©, Àç½ÃÀÛµ¿¾È Ŭ¶óÀ̾ðÆ®¸¦ ¼ºñ½ºÇÏ´Â ÇÁ·Î¼¼½º³ª ¾²·¹µå°¡
109 Àû´çÇÑ ¼ö¸¦ À¯ÁöÇϵµ·Ï ¼³°èµÇ¾ú´Ù. °Ô´Ù°¡ <directive
110 module="mpm_common">StartServers</directive>´Â, ÀÏÃÊ ÈÄ
111 ÃÖ¼ÒÇÑ StartServers¸¸Å »õ·Î¿î ÀÚ½ÄÀÌ ¾È¸¸µé¾îÁö¸é ÀÚ½ÄÀÌ
112 StartServers °³°¡ µÇµµ·Ï »õ·Î ¸¸µç´Ù. Áï, ÇÁ·Î±×·¥Àº ¼¹öÀÇ
113 ÇöÀç ºÎÇÏ¿¡ ¾Ë¸ÂÀº ÀÚ½ÄÀÇ °³¼ö¸¦ À¯ÁöÇϸç,
114 <directive>StartServers</directive> ÆĶó¹ÌÅÍ·Î ÁöÁ¤ÇÑ ´ç½ÅÀÇ
117 <p><module>mod_status</module> »ç¿ëÀÚ´Â <code>USR1</code>À»
118 ¹ÞÀ»¶§ ¼¹ö Åë°è°¡ 0ÀÌ µÇÁö <strong>¾ÊÀ½À»</strong> ºÃÀ»
119 °ÍÀÌ´Ù. ¼¹ö´Â »õ·Î¿î ¿äûÀ» (¿î¿µÃ¼Á¦´Â À̵éÀ» Å¥¿¡ ´ã¾Æ¼
120 ¾î¶² °æ¿ì¿¡µµ ÀÒ¾î¹ö¸®Áö ¾Ê´Â´Ù) ó¸®ÇÏÁö ¸øÇÏ´Â ½Ã°£À»
121 ÃÖ¼ÒÈÇÏ°í ´ç½ÅÀÇ Æ©´× ÆĶó¹ÌÅ͸¦ Á¸ÁßÇϵµ·Ï ¸¸µé¾îÁ³´Ù.
122 À̸¦ À§ÇØ ¼¼´ë°£ ¸ðµç ÀÚ½ÄÀ» ±â·ÏÇÏ´Â <em>scoreboard</em>¸¦
125 <p>status ¸ðµâÀº ¶ÇÇÑ Á¡ÀÝÀº Àç½ÃÀÛ Àü¿¡ ½ÃÀÛÇÏ¿© ¾ÆÁ÷µµ
126 ¿äûÀ» ó¸®ÇÏ°í ÀÖ´Â ÀÚ½ÄÀ» <code>G</code>·Î ¾Ë·ÁÁØ´Ù.</p>
128 <p>ÇöÀç·Î´Â <code>USR1</code>À» »ç¿ëÇÏ´Â ·Î±×¼øȯ ½ºÅ©¸³Æ®°¡
129 Àç½ÃÀÛÀü¿¡ ¸ðµç ÀÚ½ÄÀÌ ·Î±×ÀÛ¼ºÀ» ¸¶ÃÆ´ÂÁö ¾Ë ¼ö ÀÖ´Â
130 ¹æ¹ýÀÌ ¾ø´Ù. ¿ì¸®´Â <code>USR1</code> ½Ã±×³ÎÀ» º¸³»°í
131 Àû´çÇÑ ½Ã°£ÀÌ Áö³ÈÄ ÀÌÀü ·Î±×¸¦ ´Ù·çµµ·Ï Á¦¾ÈÇÑ´Ù. ¿¹¸¦
132 µé¾î ³·Àº ´ë¿ªÆø »ç¿ëÀÚÀÇ °æ¿ì Á¢¼Ó ´ëºÎºÐÀÌ ¸¶Ä¡´Âµ¥ 10ºÐÀÌ
133 ¾È°É¸°´Ù¸é, ÀÌÀü ·Î±×¸¦ ´Ù·ç±âÀü¿¡ 15ºÐ ±â´Ù¸°´Ù.</p>
135 <note>¼³Á¤ÆÄÀÏ¿¡ ¿À·ù°¡ ÀÖ´Ù¸é Àç½ÃÀ۽à ºÎ¸ð´Â Àç½ÃÀÛÇÏÁö
136 ¾Ê°í ¿À·ù¸¦ ³»¸ç Á¾·áÇÑ´Ù. ¶Ç, Á¡ÀÝÀº Àç½ÃÀÛÀÇ °æ¿ì Á¾·áÇÒ¶§
137 ÀÚ½ÄÀÌ ½ÇÇàµÇµµ·Ï ³öµÐ´Ù. (ÀڽĵéÀº ÀÚ½ÅÀÇ ¸¶Áö¸· ¿äûÀ»
138 ó¸®ÇÏ°í "Á¡ÀÝ°Ô Á¾·áÇÑ´Ù".) ÀÌ´Â ¼¹ö¸¦ Àç½ÃÀÛÇÒ¶§
139 ¹®Á¦°¡ µÈ´Ù. ¼¹ö´Â ÀÚ½ÅÀÌ ±â´Ù¸± Æ÷Æ®¿¡ ¿¬°áÇÏÁö ¸øÇÑ´Ù.
140 Àç½ÃÀÛÀü¿¡ <code>-t</code> ¸í·ÉÇà ¿É¼Ç(<a
141 href="programs/httpd.html">httpd</a> Âü°í)À¸·Î ¼³Á¤ÆÄÀÏ
142 ¹®¹ýÀ» °Ë»çÇÒ ¼ö ÀÖ´Ù. ±×·¯³ª ÀÌ·± °Ë»çµµ ¼¹ö°¡ ¿Ã¹Ù·Î
143 Àç½ÃÀÛÇÒÁö¸¦ º¸ÀåÇÏÁö ¸øÇÑ´Ù. ¼³Á¤ÆÄÀÏÀÇ ¹®¹ýÀÌ ¾Æ´Ñ Àǹ̸¦
144 °Ë»çÇÏ·Á¸é root°¡ ¾Æ´Ñ »ç¿ëÀÚ·Î <code>httpd</code>¸¦ ½ÃÀÛÇغ¼ ¼ö ÀÖ´Ù.
145 root°¡ ¾Æ´Ï±â¶§¹®¿¡ (¾Æ´Ï¸é ÇöÀç ±× Æ÷Æ®¸¦ »ç¿ëÇÏ´Â
146 <code>httpd</code>°¡ ½ÇÇàµÇ±â¶§¹®¿¡) ¿À·ù°¡ ¾ø´Ù¸é ¼ÒÄÏ°ú
147 ·Î±×ÆÄÀÏÀ» ¿·Á°í ½ÃµµÇÏ´Â °úÁ¤¿¡¼ ½ÇÆÐÇÒ °ÍÀÌ´Ù. ´Ù¸¥
148 ÀÌÀ¯¶§¹®¿¡ ½ÇÆÐÇÑ´Ù¸é ¾Æ¸¶µµ ¼³Á¤ÆÄÀÏ¿¡ ¿À·ù°¡ ÀÖÀ» °ÍÀÌ´Ù.
149 Á¡ÀÝÀº Àç½ÃÀÛÀ» ÇϱâÀü¿¡ ¿À·ù¸¦ °íÃľßÇÑ´Ù.</note>
152 <section id="hup"><title>´çÀå Àç½ÃÀÛ</title>
154 <dl><dt>½Ã±×³Î: HUP</dt>
155 <dd><code>apachectl -k restart</code></dd>
158 <p><code>HUP</code>À̳ª <code>restart</code> ½Ã±×³ÎÀ»
159 ºÎ¸ð¿¡°Ô º¸³»¸é <code>TERM</code>°ú °°ÀÌ ¸ðµç ÀÚ½ÄÀ»
160 Á×ÀÌÁö¸¸ ºÎ¸ð´Â Á¾·áÇÏÁö ¾Ê´Â´Ù. ºÎ¸ð´Â ¼³Á¤ÆÄÀÏÀ» ´Ù½ÃÀаí
161 ·Î±×ÆÄÀÏÀ» ´Ù½Ã ¿¬´Ù. ±×¸®°í »õ·Î¿î ÀڽĵéÀ» ¸¸µé°í ¼ºñ½º¸¦
164 <p><module>mod_status</module> »ç¿ëÀÚ´Â <code>HUP</code>¸¦
165 º¸³»¸é ¼¹ö Åë°è°¡ 0ÀÌ µÊÀ» ¾Ë ¼ö ÀÖ´Ù.</p>
167 <note>¼³Á¤ÆÄÀÏ¿¡ ¿À·ù°¡ ÀÖ´Ù¸é Àç½ÃÀÛÀ» Çصµ ºÎ¸ð´Â Àç½ÃÀÛÇÏÁö
168 ¾Ê°í ¿À·ù¸¦ ³»¸ç Á¾·áÇÒ °ÍÀÌ´Ù. À̸¦ ÇÇÇÏ´Â ¹æ¹ýÀº À§¸¦ Âü°íÇ϶ó.</note>
171 <section id="race"><title>ºÎ·Ï: ½Ã±×³Î°ú ·¹À̽º ÄÁµð¼Ç</title>
173 <p>Apache 1.2b9 ÀÌÀü¿¡´Â Àç½ÃÀÛ°ú Á¾·á ½Ã±×³Î¿¡ °ü°èµÈ
174 <em>·¹À̽º ÄÁµð¼Ç(race condition)</em>ÀÌ ÀÖ¾ú´Ù. (·¹À̽º
175 ÄÁµð¼ÇÀº °£´ÜÇÑ ¼³¸íÇÏÀÚ¸é, ¾î¶² ÀÏÀÌ À߸øµÈ¶§ ÀϾ¼
176 ±â´ëÇÑ´ë·Î µ¿ÀÛÇÏÁö ¾Ê´Â ½Ã°£¿¡ ¹Î°¨ÇÑ ¹®Á¦´Ù.) "¿Ã¹Ù¸¥"
177 ±â´ÉÀÌ ÀÖ´Â ¾ÆÅ°ÅØÃÄ¿¡¼ ¿ì¸®´Â ÀÌ·± ¹®Á¦¸¦ ÃÖ´ëÇÑ ÇØ°áÇß´Ù.
178 ±×·¯³ª ¾î¶² ¾ÆÅ°ÅØÃÄ¿¡´Â ¾ÆÁ÷µµ ·¹À̽º ÄÁµð¼ÇÀÌ Á¸ÀçÇÔÀ»
181 <p><directive module="mpm_common">ScoreBoardFile</directive>À»
182 µð½ºÅ©¿¡ ÀúÀåÇÏ´Â ¾ÆÅ°ÅØÃÄ´Â scoreboard¸¦ ¸Á°¡Æ®¸± °¡´É¼ºÀÌ
183 ÀÖ´Ù. ±×·¯¸é (<code>HUP</code>ÈÄ) "bind: Address already in use"
184 ȤÀº (<code>USR1</code> ÈÄ) "long lost child came home!"ÀÌ
185 ¹ß»ýÇÒ ¼ö ÀÖ´Ù. ÀüÀÚ´Â ½É°¢ÇÑ ¿À·ùÀÌ°í, ÈÄÀÚ´Â ´ÜÁö ¼¹ö°¡
186 scoreboard slotÀ» ÀÒ°Ô ¸¸µç´Ù. ±×·¡¼ °Á¦ Àç½ÃÀÛÀ» ÁÙÀÌ°í
187 Á¡ÀÝÀº Àç½ÃÀÛÀ» »ç¿ëÇϱæ ÃßõÇÑ´Ù. ÀÌ ¹®Á¦´Â ÇØ°áÇϱ⠸ſì
188 Èûµé´Ù. ±×·¯³ª ´ÙÇàÈ÷µµ ´ëºÎºÐÀÇ ¾ÆÅ°ÅØÃÄ´Â scoreboard·Î ÆÄÀÏÀ»
189 »ç¿ëÇÏÁö ¾Ê´Â´Ù. ÆÄÀÏÀ» »ç¿ëÇÏ´Â ¾ÆÅ°ÅØÃĶó¸é <directive
190 module="mpm_common">ScoreBoardFile</directive> ¹®¼¸¦ Âü°íÇ϶ó.</p>
192 <p>¸ðµç ¾ÆÅ°ÅØÃÄ¿¡´Â Áö¼ÓµÇ´Â HTTP ¿¬°á (KeepAlive)¿¡¼
193 µÎ¹ø° ÀÌÈÄ ¿äûÀ» ó¸®ÇÏ´Â ÀڽĿ¡ ¾à°£ÀÇ ·¹À̽º ÄÁµð¼ÇÀÌ
194 ÀÖ´Ù. ÀÚ½ÄÀº ¿äûÁÙÀ» ÀÐÀº ÈÄ ¿äû Çì´õ¸¦ ÀбâÀü¿¡ Á¾·áÇÒ ¼ö
195 ÀÖ´Ù. ÀÌ ¹®Á¦´Â ³Ê¹« ´Ê°Ô ¹ß°ßÇÏ¿© 1.2 ¹öÀüÀÌ ³ª¿ÂÈÄ¿¡¾ß
196 ¼öÁ¤µÇ¾ú´Ù. ±×·¯³ª ³×Æ®¿÷ Áö¿¬À̳ª ¼¹ö ½Ã°£Á¦ÇѶ§¹®¿¡ KeepAlive
197 Ŭ¶óÀ̾ðÆ®´Â ÀÌ·± °æ¿ì¸¦ ¿¹»óÇؾßÇϱ⠶§¹®¿¡ ÀÌ·Ð»ó ¹®Á¦´Â
198 ¾ÈµÈ´Ù. ½ÇÁ¦·Î ¼¹ö¸¦ °Ë»çÇϱâÀ§ÇØ ÀÏÃÊ¿¡ 20¹ø Àç½ÃÀÛÇÏ´Â µ¿¾È
199 Ŭ¶óÀ̾ðÆ®°¡ ±úÁø ±×¸²À̳ª ºó ¹®¼¾øÀÌ »çÀÌÆ®¸¦ ¼º°øÀûÀ¸·Î
200 ÀоîµéÀÌ±æ ±â´ëÇÏÁö ¾Ê´Â´Ù¸é ¹®Á¦°¡ ¾ÈµÈ´Ù.</p>