apxs.xml.ko revision 1fc594205bd58583a2660536729eb684f5cb7932
<?xml version='1.0' encoding='EUC-KR' ?>
<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="/style/manual.ko.xsl"?>
<!-- English Revision: 105989:420993 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manualpage metafile="apxs.xml.meta">
<parentdocument href="./">Programs</parentdocument>
<title>apxs - APache eXtenSion ����</title>
<summary>
<p><code>apxs</code>�� ����ġ �������ؽ�Ʈ ��� ��������
(HTTP) ������ Ȯ������ �������ϰ� ��ġ�ϴ� �����̴�. ��
������ ���� �ҽ��� ������Ʈ<var>����</var>�� ������,
<module>mod_so</module>�� <directive
module="mod_so">LoadModule</directive> ���þ�� �����߿�
����ġ ������ �о���� �� �ִ� ���������ü(DSO)�� �����.</p>
<p>�׷��� �̷� Ȯ������ ����Ϸ��� �÷����� DSO �����
�����ϰ� ����ġ <code>httpd</code> ����������
<module>mod_so</module> ���� ���� �������ؾ� �Ѵ�.
<code>apxs</code> ������ �� ������ �������������� ��������
�ʴ´�. ���� ��ɾ �����Ͽ� ������ �����ϴ��� �˾ƺ�
�� �ִ�</p>
<example>
$ httpd -l
</example>
<p>��Ͽ� <module>mod_so</module> ����� ���;� �Ѵ�. ������
�����ϸ� <code>apxs</code> ������ DSO ����� ��ġ�Ͽ�
����ġ������ ����� ���� Ȯ���� �� �ִ�:</p>
<example>
$ apxs -i -a -c mod_foo.c<br />
gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c<br />
ld -Bshareable -o mod_foo.so mod_foo.o<br />
cp mod_foo.so /path/to/apache/modules/mod_foo.so<br />
chmod 755 /path/to/apache/modules/mod_foo.so<br />
[activating module `foo' in /path/to/apache/etc/httpd.conf]<br />
$ apachectl restart<br />
/path/to/apache/sbin/apachectl restart: httpd not running, trying to start<br />
[Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module<br />
/path/to/apache/sbin/apachectl restart: httpd started<br />
$ _
</example>
<p>�ƱԸ�Ʈ <var>files</var>���� C �ҽ����� (.c) �̳�
������Ʈ���� (.o), ���̺귯������ (.a)�� ����� �� �ִ�.
<code>apxs</code> ������ Ȯ���ڸ� ���� �ڵ����� C �ҽ�������
�������ϰ�, ������Ʈ�� ���������� ��ũ���� ����Ѵ�. �׷���
�������� ������Ʈ�� ����Ϸ��� �������� �о���� �� �ִ�
������ü�� ����ϱ����� �ݵ�� ������Ʈ�� ��ġ�����ڵ�(PIC,
position independent code)�� �������ؾ� �Ѵ�. GCC�� ���
<code>-fpic</code>�� ����ϸ� �ȴ�. �ٸ� C �����Ϸ��� ���?��
����ϰų� <code>apxs</code>�� ������Ʈ������ �������Ҷ�
����ϴ� �ɼ��� ����϶�.</p>
<p>����ġ�� DSO ���� ���� �� �ڼ��� ������
<module>mod_so</module> ������ ����ϰų�
<code>src/modules/standard/mod_so.c</code> �ҽ������� �о����.</p>
</summary>
<seealso><a href="apachectl.html">apachectl</a></seealso>
<seealso><a href="httpd.html">httpd</a></seealso>
<section id="synopsis"><title>����</title>
<p><code><strong>apxs</strong> -<strong>g</strong>
[ -<strong>S</strong> <var>name</var>=<var>value</var> ]
-<strong>n</strong> <var>modname</var></code></p>
<p><code><strong>apxs</strong> -<strong>q</strong>
[ -<strong>S</strong> <var>name</var>=<var>value</var> ]
<var>query</var> ...</code></p>
<p><code><strong>apxs</strong> -<strong>c</strong>
[ -<strong>S</strong> <var>name</var>=<var>value</var> ]
[ -<strong>o</strong> <var>dsofile</var> ]
[ -<strong>I</strong> <var>incdir</var> ]
[ -<strong>D</strong> <var>name</var>=<var>value</var> ]
[ -<strong>L</strong> <var>libdir</var> ]
[ -<strong>l</strong> <var>libname</var> ]
[ -<strong>Wc,</strong><var>compiler-flags</var> ]
[ -<strong>Wl,</strong><var>linker-flags</var> ]
<var>files</var> ...</code></p>
<p><code><strong>apxs</strong> -<strong>i</strong>
[ -<strong>S</strong> <var>name</var>=<var>value</var> ]
[ -<strong>n</strong> <var>modname</var> ]
[ -<strong>a</strong> ]
[ -<strong>A</strong> ]
<var>dso-file</var> ...</code></p>
<p><code><strong>apxs</strong> -<strong>e</strong>
[ -<strong>S</strong> <var>name</var>=<var>value</var> ]
[ -<strong>n</strong> <var>modname</var> ]
[ -<strong>a</strong> ]
[ -<strong>A</strong> ]
<var>dso-file</var> ...</code></p>
</section>
<section id="options"><title>�ɼ�</title>
<section id="options.common"><title>���� �ɼ�</title>
<dl>
<dt><code>-n <var>modname</var></code></dt>
<dd><code>-i</code> (install)�� <code>-g</code> (template
generation) �ɼ��� ����Ҷ� ���� ������ �����Ѵ�. ��
�ɼ��� ����Ͽ� ������ ���� �����Ѵ�. <code>-g</code>
�ɼ��� ����Ѵٸ� �� �ɼ��� �ݵ�� ����ؾ��ϰ�,
<code>-i</code> �ɼ��� ����Ѵٸ� <code>apxs</code> ������
�ҽ��� (������ �õ���) ���ϸ��� ������ �̸��� �����Ѵ�.</dd>
</dl>
</section>
<section id="options.query"><title>���� �ɼ�</title>
<dl>
<dt><code>-q</code></dt>
<dd><code>apxs</code>�� �������� �˾Ƴ���. <var>query</var>����
������ ����� �� �ִ�: <code>CC</code>, <code>CFLAGS</code>,
<code>CFLAGS_SHLIB</code>, <code>INCLUDEDIR</code>,
<code>LD_SHLIB</code>, <code>LDFLAGS_SHLIB</code>,
<code>LIBEXECDIR</code>, <code>LIBS_SHLIB</code>,
<code>SBINDIR</code>, <code>SYSCONFDIR</code>, <code>TARGET</code>.
<p>������ ���� �˾Ƴ��� ����Ѵ�.</p>
<example>
INC=-I`apxs -q INCLUDEDIR`
</example>
<p>���� ���, ����ġ C ��������� ���� �����Ѵٸ�
Makefile���� ���� ���� ����Ѵ�.</p></dd>
</dl>
</section>
<section id="options.conf"><title>���� �ɼ�</title>
<dl>
<dt><code>-S <var>name</var>=<var>value</var></code></dt>
<dd>�� �ɼ��� ������ ������ apxs ������ �����Ѵ�.</dd>
</dl>
</section>
<section id="options.template"><title>�ߺ�(template) �� �ɼ�</title>
<dl>
<dt><code>-g</code></dt>
<dd>�������丮 <var>name</var>�� ����� (<code>-n</code>
�ɼ� ���) �װ��� ���� �ΰ��� �����: �� ������
<code>mod_<var>name</var>.c</code>��� �ߺ� ���ҽ����Ϸ�,
�ڽ��� ����� ���鶧 �ߺ����� ����ϰų� apxs �����
�����غ��� ����Ѵ�. �ٸ� ������ �� ����� ���� �������ϰ�
��ġ�ϱ����� <code>Makefile</code>�̴�.</dd>
</dl>
</section>
<section id="options.dso"><title>DSO ������ �ɼ�</title>
<dl>
<dt><code>-c</code></dt>
<dd>�������� �����Ѵ�. ���� <var>files</var>���� C
�ҽ����ϵ�(.c)�� ������Ʈ����(.o)�� �������ϰ�,
<var>files</var>�� ������ ������Ʈ���ϵ�(.o�� .a)��
��ũ�Ͽ� ���������ü <var>dsofile</var>�� �����.
<code>-o</code> �ɼ��� ������������� <var>files</var>��
ù��° ���ϸ?�� �̸��� �����Ͽ� ����
<code>mod_<var>name</var>.so</code>�� ����Ѵ�.</dd>
<dt><code>-o <var>dsofile</var></code></dt>
<dd>���� ���������ü ���ϸ��� ���� �����Ѵ�. �̸���
���������ʰ� <var>files</var> ��Ͽ��� �̸��� ��������
���ϸ� ���������� <code>mod_unknown.so</code>�� �̸�����
����Ѵ�.</dd>
<dt><code>-D <var>name</var>=<var>value</var></code></dt>
<dd>�� �ɼ��� ������ ��ɾ�� ���� ����Ѵ�.
�����϶� �ڽ��� define�� �߰��Ѵ�.</dd>
<dt><code>-I <var>incdir</var></code></dt>
<dd>�� �ɼ��� ������ ��ɾ�� ���� ����Ѵ�.
�����϶� include�� ã�� ���丮�� �߰��Ѵ�.</dd>
<dt><code>-L <var>libdir</var></code></dt>
<dd>�� �ɼ��� ��Ŀ ��ɾ�� ���� ����Ѵ�.
�����϶� ���̺귯���� ã�� ���丮�� �߰��Ѵ�.</dd>
<dt><code>-l <var>libname</var></code></dt>
<dd>�� �ɼ��� ��Ŀ ��ɾ�� ���� ����Ѵ�.
�����϶� ����� ���̺귯���� �߰��Ѵ�.</dd>
<dt><code>-Wc,<var>compiler-flags</var></code></dt>
<dd>�� �ɼ��� �߰� �ɼ� <var>compiler-flags</var>��
<code>libtool --mode=compile</code> ��ɾ�� ����Ѵ�.
�����Ϸ� Ư���� �ɼ��� �߰��Ҷ� ����Ѵ�.</dd>
<dt><code>-Wl,<var>linker-flags</var></code></dt>
<dd>�� �ɼ��� �߰� �ɼ� <var>linker-flags</var>��
<code>libtool --mode=link</code> ��ɾ�� ����Ѵ�. ��Ŀ
Ư���� �ɼ��� �߰��Ҷ� ����Ѵ�.</dd>
</dl>
</section>
<section id="options.dsoinstall">
<title>DSO ��ġ�� ���� �ɼ�</title>
<dl>
<dt><code>-i</code></dt>
<dd>��ġ�� �����Ѵ�. ���� ���������ü�� ������
<var>modules</var> ���丮�� ��ġ�Ѵ�.</dd>
<dt><code>-a</code></dt>
<dd>����ġ <code>httpd.conf</code> �������Ͽ� ������
<directive module="mod_so">LoadModule</directive> ����
�߰��ϰų� �̹� �ִٸ� Ȱ��ȭ�Ͽ� ����� ����ϵ���
�����.</dd>
<dt><code>-A</code></dt>
<dd><code>-a</code>�� ���������, <directive
module="mod_so">LoadModule</directive> ���þ� �տ�
�칰����(<code>#</code>)�� ���δ�. <em>��</em>, �����
������������� ���߿� ����� �� �ֵ��� ����� �غ��Ѵ�.</dd>
<dt><code>-e</code></dt>
<dd>������ �����Ѵ�. <code>-a</code> Ȥ�� <code>-A</code>
�ɼǰ� ���� ����� �� ������, <code>-i</code> ��ɰ�
��������� ����� ��ġ�����ʰ� ����ġ
<code>httpd.conf</code> �������ϸ� �����Ѵ�.</dd>
</dl>
</section>
</section>
<section id="examples"><title>����</title>
<p>����ġ������ ����� Ȯ���ϴ� <code>mod_foo.c</code>���
����ġ ����� �ִٰ� ��������. ���� ���� ��ɾ ����Ͽ�
C �ҽ��� ����ġ ������ �о���� ������ü�� �������Ѵ�:</p>
<example>
$ apxs -c mod_foo.c<br />
/path/to/libtool --mode=compile gcc ... -c mod_foo.c<br />
/path/to/libtool --mode=link gcc ... -o mod_foo.la mod_foo.slo<br />
$ _
</example>
<p>�׸��� �� ������ü�� �о���̴� <directive
module="mod_so">LoadModule</directive> ���þ ����ġ
������ �߰��Ѵ�. <code>apxs</code>�� �ڵ����� ������ü��
"modules" ���丮�� ��ġ�ϰ� <code>httpd.conf</code> ������
�˸°� �����Ͽ� ������ �۾��� ��ģ��. ���� ���� �����Ѵ�:</p>
<example>
$ apxs -i -a mod_foo.la<br />
/path/to/instdso.sh mod_foo.la /path/to/apache/modules<br />
/path/to/libtool --mode=install cp mod_foo.la /path/to/apache/modules
...
chmod 755 /path/to/apache/modules/mod_foo.so<br />
[/path/to/apache/conf/httpd.conf���� `foo' ����� Ȱ��ȭ�Ѵ�]<br />
$ _
</example>
<p>�׷��� ������ ���� ����</p>
<example>
LoadModule foo_module modules/mod_foo.so
</example>
<p>�������Ͽ� ��ٸ� �߰��Ѵ�. �� ������ �⺻������ �������
�ʴ´ٸ� <code>-A</code> �ɼ��� ����Ѵ�. <em>��</em></p>
<example>
$ apxs -i -A mod_foo.c
</example>
<p>apxs�� ���� ����Ϸ��� ������ ���� ����ġ ��� �ߺ���
Makefile�� ���� �� �ִ�:</p>
<example>
$ apxs -g -n foo<br />
Creating [DIR] foo<br />
Creating [FILE] foo/Makefile<br />
Creating [FILE] foo/modules.mk<br />
Creating [FILE] foo/mod_foo.c<br />
Creating [FILE] foo/.deps<br />
$ _
</example>
<p>�׷��� �ٷ� �ߺ� ����� ������ü�� �������Ͽ� ����ġ
������ �е����Ѵ�:</p>
<example>
$ cd foo<br />
$ make all reload<br />
apxs -c mod_foo.c<br />
/path/to/libtool --mode=compile gcc ... -c mod_foo.c<br />
/path/to/libtool --mode=link gcc ... -o mod_foo.la mod_foo.slo<br />
apxs -i -a -n "foo" mod_foo.la<br />
/path/to/instdso.sh mod_foo.la /path/to/apache/modules<br />
/path/to/libtool --mode=install cp mod_foo.la /path/to/apache/modules
...
chmod 755 /path/to/apache/modules/mod_foo.so<br />
[/path/to/apache/conf/httpd.conf���� `foo' ����� Ȱ��ȭ�Ѵ�]<br />
apachectl restart<br />
/path/to/apache/sbin/apachectl restart: httpd not running, trying to start<br />
[Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module<br />
/path/to/apache/sbin/apachectl restart: httpd started<br />
$ _
</example>
</section>
</manualpage>