apxs.xml.ko revision 0ad489b182ebb3789322345e22cf750f88ae167a
<?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: 1.3 -->
<!--
Copyright 2004 The Apache Software Foundation
Licensed 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>��
������ ��ɾ�� ����Ѵ�. �����Ϸ� Ư���� �ɼ��� �߰��Ҷ�
����Ѵ�.</dd>
<dt><code>-Wl,<var>linker-flags</var></code></dt>
<dd>�� �ɼ��� �߰� �ɼ� <var>linker-flags</var>��
��Ŀ ��ɾ�� ����Ѵ�. ��Ŀ Ư���� �ɼ��� �߰��Ҷ�
����Ѵ�.</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 />
gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c<br />
ld -Bshareable -o mod_foo.so mod_foo.o<br />
$ _
</example>
<p>�׸��� �� ������ü�� �о���̴� <directive
module="mod_so">LoadModule</directive> ���þ ����ġ
������ �߰��Ѵ�. <code>apxs</code>�� �ڵ����� ������ü��
"modules" ���丮�� ��ġ�ϰ� <code>httpd.conf</code> ������
�˸°� �����Ͽ� ������ �۾��� ��ģ��. ���� ���� �����Ѵ�:</p>
<example>
$ apxs -i -a mod_foo.c<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 />
$ _
</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/mod_foo.c<br />
$ _
</example>
<p>�׷��� �ٷ� �ߺ� ����� ������ü�� �������Ͽ� ����ġ
������ �е����Ѵ�:</p>
<example>
$ cd foo<br />
$ make all reload<br />
apxs -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 />
apxs -i -a -n "foo" mod_foo.so<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>������ ����ġ �ҽ� �ۿ��� <code>apxs</code>�� ����Ͽ�
PHP3�� ���� ������ ����� �������� �� �ִ�:</p>
<example>
$ cd php3<br />
$ /configure --with-shared-apache=/apache-1.3<br />
$ apxs -c -o libphp3.so mod_php3.c libmodphp3-so.a<br />
gcc -fpic -DSHARED_MODULE -I/tmp/apache/include -c mod_php3.c<br />
ld -Bshareable -o libphp3.so mod_php3.o libmodphp3-so.a<br />
$ _
</example>
<p><code>apxs</code>�� �ڵ����� C �ҽ����ϰ� ������Ʈ������
�����Ѵ�. C �ҽ����ϸ� �������ϰ� ������ ������Ʈ������
��ũ�Ҷ� ����Ѵ�.</p>
</section>
</manualpage>