:+:+: 사랑愛 - Ever after :+:+:

밋첼™'s Blog is powered by Tattertools

'Tomcat'에 해당되는 글 3건

  1. 2008.03.17 Apache Tomcat = 아파치 바람둥이? ^^
  2. 2007.11.09 hints on using Tomcat connector on AIX
  3. 2007.07.25 URL 접근 막기

개발하시는 분들께만 공감이 될 지도 모르겠습니다..;;

tomcat6 클러스터링 구성에 대해 구글검색을 하다가..

이 페이지 번역하기 beta 란 글을 보고.. 눌러봤습니다..

Apache Tomcat6 의 번역이... 이렇게 나옵니다...;;

<click 하시면 크게 볼 수 있어요^^>




단어를 충실하게 해석하는..

놀라운 번역시스템이네요..^^;;

'개발자愛 > JAVA' 카테고리의 다른 글

[Linux] ftp 명령어 모음  (0) 2008.03.20
Apache Tomcat = 아파치 바람둥이? ^^  (0) 2008.03.17
JAVA6 + Tomcat6  (2) 2008.03.12
[Linux] strings command  (0) 2008.03.11
HTML 특수문자코드표  (0) 2008.03.07
crontab : 윈도우의 스케줄러와 같은 역할을 하는 명령어  (0) 2008.03.04

댓글을 달아 주세요

hints on using Tomcat connector on AIX

  • mod_jk and Apache 1.3 with gcc
  • mod_jk and Apache 1.3 with gcc (same as prev, but slightly different tomcat source distribution and slightly different gcc)
  • mod_jk2 and Apache 2.0 with IBM's native compiler for AIX
  • Apache httpd 2.0.46, gcc, mod_jk2 from Tomcat 4.0.6
  • Apache httpd 2.0.46, gcc, mod_jk from jakarta-tomcat-connectors-jk-1.2.3-src.tar.gz

    mod_jk and Apache 1.3 with gcc

    software used for this build

  • AIX 5.1
  • gcc 2.9-aix43-010414 (from IBM-provided RPM)
  • GNU libtool 1.4.2, installed from source
  • GNU make, installed from IBM-provided RPM

    GNU make is definitely required. The connector fails to build with native AIX make, so make absolutely sure that GNU make is found in PATH prior to /usr/bin/make.

  • GNU automake 1.5, installed from source
  • GNU autoconf 2.53, installed from IBM-provided RPM
  • jakarta-tomcat-connectors-jk-1.2.3-src.tar.gz
  • IBM's java 1.3.1 filesets for AIX

    building Apache 1.3

    Build Apache as described here.

    building mod_jk

    $ cd jakarta-tomcat-connectors-jk-1.2.2-src/jk/native$ ./buildconf.sh$ ./configure --with-apxs=$HOME/1327_gcc/bin/apxs --with-java-home=/usr/java131
    Before running make, you need to edit apache-1.3/Makefile and update it for AIX. Replace this section:
    ## Compile part.#mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)         ${MOD_LINK} -o $@ -module -rpath ${libexecdir} $^
    with this, using your own Apache install path for the location of httpd.exp:
    ## Compile part.#mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)         ${MOD_LINK} -o $@ -Wl,-bI:/home/trawick/1327_gcc/libexec/httpd.exp -module -rpath ${libexecdir} $^
    Now we can really build:
    $ gmake
    You may just hit this obscure error during make if you originally configured libtool using IBM's C compiler for AIX:
    Waiting for jk_ajp12_worker.o.lock to be removed.
    The work-around is to edit libtool (whichever one is found in PATH) and change the setting of the variable need_locks to "warn", then run make again. Here is the section in the libtool script:
    # Must we lock files when doing compilation ?need_locks="yes"need_locks="warn"
    After make completes, the DSO is in the unlikely location apache-1.3/.libs/libmod_jk.so.0. Install it manually instead of using make install:
    $ cp -p apache-1.3/.libs/libmod_jk.so.0 /home/trawick/1327_gcc/libexec/mod_jk.so
    and add these lines to httpd.conf:
    LoadModule jk_module libexec/mod_jk.so...AddModule mod_jk.c
    (You don't need the AddModule directive unless you put the LoadModule after ClearModuleList... check out the docs at httpd.apache.org.)

    mod_jk and Apache 1.3 with gcc (alternate)

    software used for this build

  • AIX 5.1
  • gcc 2.9-aix51-020209-3 (from IBM-provided RPM)
  • GNU libtool 1.4.2, installed from source
  • GNU make, installed from IBM-provided RPM

    GNU make is definitely required. The connector fails to build with native AIX make, so make absolutely sure that GNU make is found in PATH prior to /usr/bin/make.

  • GNU automake 1.5, installed from source
  • GNU autoconf 2.53, installed from IBM-provided RPM
  • jakarta-tomcat-connectors-4.0.6-src.tar.gz
  • IBM's java 1.3.1 filesets for AIX

    building Apache 1.3

    Build Apache as described here. For this example, we'll assume that you installed it into $HOME/1328_gcc.

    building mod_jk

    $ cd jakarta-tomcat-connectors-4.0.6-src/jk/native$ ./buildconf.sh$ ./configure --with-apxs=$HOME/1328_gcc/bin/apxs --with-java-home=/usr/java131
    Before running make, you need to edit apache-1.3/Makefile and update it for AIX. Replace this section:
    ## Compile part.#mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)         ${MOD_LINK} -o $@ -module -rpath ${libexecdir} $^
    with this, using your own Apache install path for the location of httpd.exp:
    ## Compile part.#mod_jk.la: mod_jk.lo $(APACHE_OBJECTS)         ${MOD_LINK} -o $@ -Wl,-bI:/home/trawick/1327_gcc/libexec/httpd.exp -module -rpath ${libexecdir} $^
    Now we can really build:
    $ gmake
    You may just hit this obscure error during make if you originally configured libtool using IBM's C compiler for AIX:
    Waiting for jk_ajp12_worker.o.lock to be removed.
    The work-around is to edit libtool (whichever one is found in PATH) and change the setting of the variable need_locks to "warn", then run make again. Here is the section in the libtool script:
    # Must we lock files when doing compilation ?need_locks="yes"need_locks="warn"
    After make completes, the DSO is in the unlikely location apache-1.3/.libs/libmod_jk.so.0. Install it manually instead of using make install:
    $ cp -p apache-1.3/.libs/libmod_jk.so.0 /home/trawick/1327_gcc/libexec/mod_jk.so
    and add these lines to httpd.conf:
    LoadModule jk_module libexec/mod_jk.so...AddModule mod_jk.c
    (You don't need the AddModule directive unless you put the LoadModule after ClearModuleList... check out the docs at httpd.apache.org.)

    mod_jk2 and Apache 2.0 with IBM's native compiler for AIX

    Existing tarballs like jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz have syntax errors that prevent compiling the code with the native AIX compiler. We'll check out the most recent sources from CVS and apply a minimal patch and be sure to use the unpicky compiler flavor so that we don't have any unnecessary grief.

    If you downloaded from CVS prior to 20030403, or you use a tarball built prior to 20030403, then make sure you have downloaded this patch file since it is needed for the build.

    If you are using Apache 2.0.45, make sure you specified --enable-so on the configure invocation, since that works around a bug in 2.0.45 that broke DSOs.

    Other software needed:

  • IBM's C for AIX
  • GNU make (examples below invoke it via gmake
  • GNU patch (example below invokes it via /opt/freeware/bin/patch
  • GNU libtool (as needed for Apache 2)
  • GNU autoconf (ditto)
  • GNU automake (I used GNU automake 1.5, installed with the same prefix as libtool and autoconf)

    So do this to grab the sources.

    $ CVSROOT=:pserver:anoncvs@cvs.apache.org:/home/cvspublic cvs login(enter "anoncvs" for the password)$ CVSROOT=:pserver:anoncvs@cvs.apache.org:/home/cvspublic cvs co jakarta-tomcat-connectors
    At this point, we have the sources checked out. Change into the directory for mod_jk2, apply my patch file if using connector code older than 20030403, possibly edit server/apache2/Makefile.in, and build the configure script. If the patch fails to apply, it maybe that mod_jk2 is fixed in CVS already, or it may be that there are other changes to the code that needed to be patched.
    $ cd jakarta-tomcat-connectors/jk/native2# If using connector code from prior to 20030403, apply this patch:$ /opt/freeware/bin/patch < jk2_cc_patch_20030313# If using Apache older than 2.0.45, edit this line in# jk/native2/server/apache2/Makefile.in and change "-lapr-0" to "-lapr".# JK_LDFLAGS=-L${APACHE2_LIBDIR} -lcrypt -lapr-0 @PCRE_LIBS@$ ./buildconf.shlibtoolize --force --automake --copyaclocalautomake --copy --add-missingautomake: configure.in: installing `scripts/build/unix/install-sh'automake: configure.in: installing `scripts/build/unix/mkinstalldirs'automake: configure.in: installing `scripts/build/unix/missing'autoconf
    Now, run configure to customize the build for your machine. Adjust the --with-java-home and --with-apxs2 configure parameters shown below to point to your own java install and the apxs file from your Apache 2.0 installation.

    Note that even if you used xlc_r for compiling Apache, you'll need to use CC=cc_r instead of CC=xlc_r when configuring the connector because the connector has various signed-ness problems with character strings which xlc_r will treat as compile failures.

    $ CC=cc_r ./configure  --with-java-home=/usr/java131 --with-apxs2=/jeff/trawick/apacheinst/bin/apxs[lots of output not shown]
    Now run GNU make to build it (the make files are not compatible with native AIX make).
    $ gmake[lots of output not shown]
    If the build fails with a message like this:
    ld: 0706-006 Cannot find or open library file: -l apr-0        ld:open(): No such file or directory
    then you forgot to edit server/apache2/Makefile.in (see above).

    Now, manually grab the mod_jk2 DSO and rename it to something sane while copying it to the Apache modules directory. Because of libtool &^%$#@, on AIX it will be called libmod_jk2.so after the make completes.

    $ cd ../../jk/build/jk2/apache2$ cp -p libmod_jk2.so /jeff/trawick/apacheinst/modules/mod_jk2.so
    Add the appropriate LoadModule to Apache 2's configuration file and away you go.

    Apache httpd 2.0.46, gcc, mod_jk2 from Tomcat 4.0.6

    Source distributions I used:
    httpd-2.0.46.tar.gzjakarta-tomcat-connectors-4.1.24-src.tar.gz
    Support utilities I used:
    AIX 5.1 ML 02java 1.3.1IBM's RPM install of GCC gcc (gcc-2.9.aix51.020209-3)GNU libtool 1.4.2 installed from sourceIBM's RPM install of GNU autoconf (autoconf-2.53-1)GNU automake 1.5 installed from sourceIBM's RPM install of GNU make (make-3.79.1-3)
    I can't say definitively that those levels have to be used beyond the fact that this level of mod_jk2 fails to build with java < 1.3.1.

    In the examples below, /home/trawick/gcc_httpd_mod_jk2 is where I unpacked the source distributions and /home/trawick/gcc_httpd_mod_jk2/install is where I installed Apache. You'll need to adjust that, and perhaps other local customizations, as appropriate for your environment.

    building Apache

    If using Apache httpd >= 2.0.47, setting CPPFLAGS as shown in the example is not required.

    If using Apache httpd 2.0.45, add "--enable-so" to your configure invocation.

    Don't try it with older Apache httpd since apxs is broken on AIX until 2.0.45. Also, the Tomcat build relies on an APR rename that happened with 2.0.45.

    $ cd /home/trawick/gcc_httpd_mod_jk2$ gtar -xzf httpd-2.0.46.tar.gz$ cd httpd-2.0.46$ ./buildconf$ CPPFLAGS=-D_THREAD_SAFE CC=gcc ./configure --prefix=/home/trawick/gcc_httpd_mod_jk2/install --enable-mods-shared=most --with-expat=$PWD/srclib/apr-util/xml/expat$ make$ make install

    building mod_jk2

    $ cd /home/trawick/gcc_httpd_mod_jk2$ gtar -xzf jakarta-tomcat-connectors-4.1.24-src.tar.gz$ cd jakarta-tomcat-connectors-4.1.24-src$ cd jk/native2$ chmod +x ./buildconf.sh$ ./buildconf.sh$ CC=gcc ./configure --with-java-home=/usr/java131 --with-apxs2=/home/trawick/gcc_httpd_mod_jk2/install/bin/apxs
    Before running make, edit ../../jk/native2/server/apache2/Makefile and change the line
    MOD_LINK = $(LIBTOOL) --mode=link $(CC) -avoid-version -module -rpath --${APACHE2_LIBEXEC} $(LT_LDFLAGS) $(ALL_LDFLAGS)
    to
    MOD_LINK = $(LIBTOOL) --mode=link $(CC) -avoid-version -module -rpath ${APACHE2_LIBEXEC} $(LT_LDFLAGS) $(ALL_LDFLAGS) -Wl,-brtl

    Now, on with the build:

    $ gmake$ cd ../../jk/build/jk2/apache2$ cp -p libmod_jk2.so /home/trawick/gcc_httpd_mod_jk2/install/modules/
    Add the appropriate LoadModule to Apache 2's configuration file and away you go.

    Apache httpd 2.0.46, gcc, mod_jk from jakarta-tomcat-connectors-jk-1.2.3-src.tar.gz

    Build Apache as covered in the previous section.

    building mod_jk

    $ cd /home/trawick$ gtar -xzf jakarta-tomcat-connectors-jk-1.2.3-src.tar.gz$ cd jakarta-tomcat-connectors-jk-1.2.3-src/jk/native$ ./buildconf.sh$ CC=gcc ./configure --with-apxs=/home/trawick/gcc_httpd_mod_jk2/install/bin/apxs
    Before running make, edit apache-2.0/Makefile and change the line (around line 65)
    $(LIBTOOL) --mode=link ${COMPILE} -o $@ -module -rpath ${libexecdir} -avoid-version mod_jk.lo $(APACHE_OBJECTS)
    to read
    $(LIBTOOL) --mode=link ${COMPILE} -o $@ -module -rpath ${libexecdir} -avoid-version mod_jk.lo $(APACHE_OBJECTS) -Wl,-brtl
    being sure not to mess up the character at the start of the line. We're just adding the "-Wl,-brtl" at the end.

    A more appropriate fix was submitted to the Tomcat developers on 20030618, so hopefully this problem won't exist forever in the mod_jk distribution. The fix described above is fine for AIX and is easier to insert manually.

    Now, on with the build:

    $ gmake
    You may just hit this obscure error during make if you originally configured libtool using IBM's C compiler for AIX:
    Waiting for jk_something.o.lock to be removed.
    The work-around is to edit libtool (whichever one is found in PATH) and change the setting of the variable need_locks to "warn", then run gmake again. Here is the section in the libtool script:
    # Must we lock files when doing compilation ?need_locks="yes"need_locks="warn"
    After gmake completes successfully, install mod_jk.so into the Apache modules directory with this command:
    gmake install
    If you want to manually copy the DSO, do it like this, since the filename is not correct:
    $ cp -p apache-2.0/libmod_jk.so /home/trawick/gcc_httpd_mod_jk2/install/modules/mod_jk.so
    (This issue with the filename exists on at least AIX, Tru64, and HP-UX.)

    To load it into Apache, add the following directive to httpd.conf:

    LoadModule jk_module modules/mod_jk.so
  • 댓글을 달아 주세요

    URL 접근 막기

    개발자愛/JAVA 2007.07.25 15:17 by 밋첼™
    알고 있는 사항이지만..
    한번씩 떠오르지 않는 경우가 있는데...

    Tomcat 사용 중 접근 url 이 디렉토리일 경우...
    디렉토리 리스트를 보여주거나 또는 막고 싶다면 다음 옵션을 변경하면 된다..

    $CATALINA_HOME/conf/web.xml 를 열어보면

    <servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>
            org.apache.catalina.servlets.DefaultServlet
        </servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    init-param 의 listings 의 값을 조절하여 디렉토리 리스트를 보여줄수도 막을수도 있다

    참고사항으로.. 각 컨텍스트의 web.xml 이 아닌 카탈리나 홈 아래의 web.xml 이라는 것~

    '개발자愛 > JAVA' 카테고리의 다른 글

    이클립스 단축키 모음  (0) 2007.08.09
    Eclipse 팁  (0) 2007.08.09
    URL 접근 막기  (0) 2007.07.25
    IT맨, 내가 사직서를 쓴 이유  (2) 2007.06.15
    [GNU]AIX gcc 설치  (0) 2007.06.07
    리눅스 시스템 시간 설정하기  (0) 2007.05.16

    댓글을 달아 주세요

    1 
    BLOG main image
    :+:+: 사랑愛 - Ever after :+:+:
    제 사진은 예술이 아닌 추억의 부분입니다. 방법도 이론도 없으며, 즐겁게 담고 기록으로 남길뿐입니다 <Facebook> Mitchell Jung
    by 밋첼™

    카테고리

    분류 전체보기 (542)
    사랑愛 (177)
    사진愛_Photo (99)
    가족愛 (0)
    개발자愛 (64)
    음악愛 (15)
    그외愛 (179)
    리뷰愛 (8)

    달력

    «   2018/09   »
                1
    2 3 4 5 6 7 8
    9 10 11 12 13 14 15
    16 17 18 19 20 21 22
    23 24 25 26 27 28 29
    30            
    textcubeDesignMyselfget rss