[这个贴子最后由realice在 2002/09/03 05:29pm 编辑]
准备工作:
给系统打补丁先,去sunsolve.sun.com下载最新的Recommended patches
你的solaris当然要有c编译器喽,没有?
去sunfreeware下个gcc 3.2
顺便下载autoconf 2.5 / libtool 1.4 / m4 1.4
安装这些咚咚,记得将/usr/local/bin加入path..建议加在/usr/sbin之前
1. 安装apache1.3.26
很简单,tar出来.configure就好,加上参数 --enable-module=so
象这样: ./configure --prefix=/opt/apache1.3.26 --enable-module=so
然后make ; make install
2. 安装JDK1.4.01
需要下载相应sun os的jdk patch..然后默认安装
3. 安装tomcat4.04
在运行目录tar出来,添加CATALINA_HOME=...到你的环境变量
4. 编译mod_webapp.so
最麻烦的步骤开始了
去下载webapp-module-1.0-tc40-src.tar / apr_APACHE_2_0_35.tar
建议在/var/tmp下解开来
然后在webapp-module目录下运行
./configure --with-apxs=/opt/apache1.3.26/bin/apxs --with-apr=/var/tmp/apr
make
编译完成,你会在webapp-module../apache1.3/ 下找到mod_webapp.so
将它copy到apache1.3.26的linexec目录中
5. 完结篇
编辑httpd.conf,加入
LoadModule webapp_module libexec/mod_webapp.so
AddModule mod_webapp.c
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/
这就不用解释啦... 注意需要分行加入
运行tomcat , 运行apache
浏览http://localhost/examples 看到可爱的小猫了?
恭喜,成功啦
以上步骤在sparc solaris7 & 8环境下都编译成功
补充:原文是在快下班的时候写的,大概步骤就是这样了,其间也许会遇到小问题..
1. libtool/m4/autoconf都有,但是编译mod_webapp.so还是报错,无法解释as..
检查系统 路径,加入/usr/ccs/bin.. 搞定
2. apache编译安装完毕,运行报错..."can't find correct group id xxxx..."
检查httpd.conf,发现group是#1,改成nobody搞定(或者实际存在的group name)
cinc 回复于:2002-09-02 18:34:20 |
呵呵,好样的,请到 Java 版多做交流。:) |
realice 回复于:2002-09-03 17:30:54 |
刚才补充了一些想到的问题...呵呵 上周我也是看了N多E文,非常苦闷的说.. 希望大家都能成功搞定 |
czc9 回复于:2002-09-03 17:38:52 |
很好,基本上我也是这样做的,但是make没法通过,你能把编译好的mod_webapp.so for s7/8的发到我的邮箱上吗,谢谢 stdxzcc@21cn.com |
realice 回复于:2002-09-03 17:45:26 |
用apache2.04编译mod_webapp.so一直失败,说找不到apr...指定路径无用.. 有没有哪位兄弟有心得? |
wudicc 回复于:2002-09-03 17:59:57 |
按照 realice 写的,我出现了这样问题: # build/ltconfig: build/ltconfig: cannot open build/ltconfig:: not found 请问 realice 这该怎样解决?谢谢!!!! |
race 回复于:2002-09-03 21:55:41 |
有空 我也找台ULTRA80去试去 |
study12 回复于:2002-09-04 08:17:44 |
我现在都成功编译了mod_webapp.so,但无法用。 |
realice 回复于:2002-09-04 11:42:30 |
to wudicc: 你在哪一步报这个错? to study12: 编译完就成功99%啦,呵呵,你看看在httpd.conf里面的LoadModule webapp_module libexec/mod_webapp.so ,用你自己实际路径代替 |
study12 回复于:2002-09-04 18:20:53 |
这不会错的,我搞了很长时间了. 提示是不能找到ligapr.so |
ncwangw 回复于:2002-09-10 22:34:24 |
我为什么没有autoconf这个文件? |
ncwangw 回复于:2002-09-15 19:21:25 |
我顶 |
race 回复于:2002-09-15 23:44:10 |
下载安装, realice 不是说了嘛 |
ncwangw 回复于:2002-09-17 10:35:27 |
hehe 我还以为是配置文件呢 |
jackylau 回复于:2003-07-18 08:55:45 |
我按照最上面的老史说的。我的出错信息,怎么解决呀?
# cd var/tmp # ls apr wsconAAAFQaiFa:0.0 apr_APACHE_2_0_35.tar wsconAAAXSaGIa:0.0 webapp-module wsconAAAhmaOEa:0.0 webapp-module-1.0-tc40 wsconAAAtFaqEa:0.0 webapp-module-1.0-tc40-src.tar wsconAAAu3aq5a:0.0 wsconAAA8vaO6a:0.0 wsconAAAysaaXa:0.0 wsconAAA94aiEa:0.0 # cd webapp* # ls INSTALL.txt Makefile.win apr configure java LICENSE.txt README.txt confdefs.h configure.in lib Makedefs.in apache-1.3 config.cache docs nsapi Makefile.in apache-2.0 config.log include support # ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/var/tmp/apr loading cache ./config.cache checking for test... /bin/test checking for true... /bin/true checking for echo... /bin/echo checking for grep... /bin/grep checking for cat... /bin/cat checking for sed... /bin/sed checking for ln... /bin/ln checking for rm... /bin/rm checking host system type... sparc-sun-solaris2.7 checking for sources directory... /var/tmp/webapp-module-1.0-tc40 checking for targets directory... /var/tmp/webapp-module-1.0-tc40 C-Language compilation tools checking for ar... /usr/ccs/bin/ar checking for ranlib... /usr/ccs/bin/ranlib checking for gcc... gcc checking whether the C compiler (gcc   works... yes checking whether the C compiler (gcc   is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for gcc... /bin/gcc checking whether /bin/gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... /bin/gcc -E checking for debug build... no JAVA-Language compilation tools checking for java support... no API documentation generation checking for C API documentation... no checking for Java API documentation... no Target web-server checking for Apache apxs... yes checking target module... apache-1.3 checking for full APR directory path... /var/tmp/apr Building APR configure script Invoking: "./buildconf" in "/var/tmp/apr" APR buildconf: buildconf: checking installation... APR buildconf: buildconf: autoconf version 2.57 (ok) APR buildconf: buildconf: libtool version 1.5 APR buildconf: APR buildconf: 2003 (ok) WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. APR buildconf: Copying libtool helper files ... APR buildconf: Creating include/arch/unix/apr_private.h.in ... autom4te: need GNU m4 1.4 or later: /usr/ccs/bin/m4 autoheader: /usr/local/bin/autom4te failed with exit status: 1 APR buildconf: Creating configure ... autom4te: need GNU m4 1.4 or later: /usr/ccs/bin/m4 Execution of ./buildconf returned 0 Configuring APR Invoking: "./configure --enable-static --disable-shared --disable-threads" in "/var/tmp/apr" APR configure: loading cache ./config.cache APR configure: checking host system type... sparc-sun-solaris2.7 APR configure: checking target system type... sparc-sun-solaris2.7 APR configure: checking build system type... sparc-sun-solaris2.7 APR configure: Configuring APR library APR configure: Platform: sparc-sun-solaris2.7 APR configure: checking for gcc... (cached) gcc APR configure: checking whether the C compiler (gcc   works... yes APR configure: checking whether the C compiler (gcc   is a cross-compiler... no APR configure: checking whether we are using GNU C... (cached) yes APR configure: checking whether gcc accepts -g... (cached) yes APR configure: Applying APR hints file rules for sparc-sun-solaris2.7 build/ltconfig: build/ltconfig: cannot open configure: error: libtool configure failed APR configure: setting CPPFLAGS to "-DSOLARIS2=7 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT" APR configure: setting apr_iconv_inbuf_const to "1" APR configure: (Default will be unix) APR configure: checking whether make sets ${MAKE}... (cached) yes APR configure: checking how to run the C preprocessor... (cached) gcc -E APR configure: checking for mawk... (cached) nawk APR configure: checking whether ln -s works... (cached) yes APR configure: checking for ranlib... (cached) ranlib APR configure: checking for a BSD compatible install... build/install.sh -c APR configure: checking for rm... (cached) rm APR configure: checking for as... (cached) as APR configure: checking for cpp... (cached) cpp APR configure: checking for ar... (cached) ar APR configure: checking for AIX... no APR configure: checking for POSIXized ISC... no APR configure: checking for minix/config.h... (cached) no APR configure: checking whether system uses EBCDIC... (cached) no APR configure: performing libtool configuration... APR configure: checking for ld used by GCC... (cached) /usr/ccs/bin/ld APR configure: checking if the linker (/usr/ccs/bin/ld) is GNU ld... (cached) no APR configure: checking for BSD-compatible nm... (cached) /usr/ccs/bin/nm -p Execution of ./configure --enable-static --disable-shared --disable-threads returned 1 configure: error: APR configure script terminated with error code 1 |
jackylau 回复于:2003-07-18 12:09:34 |
还是没有人回答我的问题呀! |
jackylau 回复于:2003-07-21 19:11:18 |
老大们,我已经把mod_webapp.so cp到/opt/httpd/module里了,在编辑httpd.conf的时候加入了
Group #--1 ==> nogroup LoadModule webapp_module modules/mod_webapp.so AddModule mod_webapp.c WebAppConnection warpConnection warp localhost:8008 WebAppDeploy examples warpConnection /examples/ WebAppInfo /webapp-info 可为什么还不行呢?我用的是httpd-2.0.47+tomcat-4.1.24。 编辑/etc/tomcat4/server.xml,搜索 8008,找到<Service name="Tomcat-Apache">那段,把前面的<!-->那行和</Service>后面的<-->那行都删掉,就是这两行把这一整段都注释掉了。 为什么我用 http://localhost/examples 看不到可爱的小猫呢? |
flyxfl 回复于:2003-08-01 16:48:22 |
jackylau 发表于: 2003-07-18 08:55 发表主题: 求助!
-------------------------------------------------------------------------------- 我按照最上面的老史说的。我的出错信息,怎么解决呀? # cd var/tmp # ls apr wsconAAAFQaiFa:0.0 apr_APACHE_2_0_35.tar wsconAAAXSaGIa:0.0 webapp-module wsconAAAhmaOEa:0.0 webapp-module-1.0-tc40 wsconAAAtFaqEa:0.0 webapp-module-1.0-tc40-src.tar wsconAAAu3aq5a:0.0 wsconAAA8vaO6a:0.0 wsconAAAysaaXa:0.0 wsconAAA94aiEa:0.0 # cd webapp* # ls INSTALL.txt Makefile.win apr configure java LICENSE.txt README.txt confdefs.h configure.in lib Makedefs.in apache-1.3 config.cache docs nsapi Makefile.in apache-2.0 config.log include support # ./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/var/tmp/apr loading cache ./config.cache checking for test... /bin/test checking for true... /bin/true checking for echo... /bin/echo checking for grep... /bin/grep checking for cat... /bin/cat checking for sed... /bin/sed checking for ln... /bin/ln checking for rm... /bin/rm checking host system type... sparc-sun-solaris2.7 checking for sources directory... /var/tmp/webapp-module-1.0-tc40 checking for targets directory... /var/tmp/webapp-module-1.0-tc40 C-Language compilation tools checking for ar... /usr/ccs/bin/ar checking for ranlib... /usr/ccs/bin/ranlib checking for gcc... gcc checking whether the C compiler (gcc  works... yes checking whether the C compiler (gcc  is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for gcc... /bin/gcc checking whether /bin/gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... /bin/gcc -E checking for debug build... no JAVA-Language compilation tools checking for java support... no API documentation generation checking for C API documentation... no checking for Java API documentation... no Target web-server checking for Apache apxs... yes checking target module... apache-1.3 checking for full APR directory path... /var/tmp/apr Building APR configure script Invoking: "./buildconf" in "/var/tmp/apr" APR buildconf: buildconf: checking installation... APR buildconf: buildconf: autoconf version 2.57 (ok) APR buildconf: buildconf: libtool version 1.5 APR buildconf: APR buildconf: 2003 (ok) WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' WARNING: and `config.h.top', to define templates for `config.h.in' WARNING: is deprecated and discouraged. WARNING: Using the third argument of `AC_DEFINE' and WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without WARNING: `acconfig.h': WARNING: AC_DEFINE([NEED_MAIN], 1, WARNING: [Define if a function `main' is needed.]) WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. APR buildconf: Copying libtool helper files ... APR buildconf: Creating include/arch/unix/apr_private.h.in ... autom4te: need GNU m4 1.4 or later: /usr/ccs/bin/m4 autoheader: /usr/local/bin/autom4te failed with exit status: 1 APR buildconf: Creating configure ... autom4te: need GNU m4 1.4 or later: /usr/ccs/bin/m4 Execution of ./buildconf returned 0 Configuring APR Invoking: "./configure --enable-static --disable-shared --disable-threads" in "/var/tmp/apr" APR configure: loading cache ./config.cache APR configure: checking host system type... sparc-sun-solaris2.7 APR configure: checking target system type... sparc-sun-solaris2.7 APR configure: checking build system type... sparc-sun-solaris2.7 APR configure: Configuring APR library APR configure: Platform: sparc-sun-solaris2.7 APR configure: checking for gcc... (cached) gcc APR configure: checking whether the C compiler (gcc  works... yes APR configure: checking whether the C compiler (gcc  is a cross-compiler... no APR configure: checking whether we are using GNU C... (cached) yes APR configure: checking whether gcc accepts -g... (cached) yes APR configure: Applying APR hints file rules for sparc-sun-solaris2.7 build/ltconfig: build/ltconfig: cannot open configure: error: libtool configure failed APR configure: setting CPPFLAGS to "-DSOLARIS2=7 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT" APR configure: setting apr_iconv_inbuf_const to "1" APR configure: (Default will be unix) APR configure: checking whether make sets ${MAKE}... (cached) yes APR configure: checking how to run the C preprocessor... (cached) gcc -E APR configure: checking for mawk... (cached) nawk APR configure: checking whether ln -s works... (cached) yes APR configure: checking for ranlib... (cached) ranlib APR configure: checking for a BSD compatible install... build/install.sh -c APR configure: checking for rm... (cached) rm APR configure: checking for as... (cached) as APR configure: checking for cpp... (cached) cpp APR configure: checking for ar... (cached) ar APR configure: checking for AIX... no APR configure: checking for POSIXized ISC... no APR configure: checking for minix/config.h... (cached) no APR configure: checking whether system uses EBCDIC... (cached) no APR configure: performing libtool configuration... APR configure: checking for ld used by GCC... (cached) /usr/ccs/bin/ld APR configure: checking if the linker (/usr/ccs/bin/ld) is GNU ld... (cached) no APR configure: checking for BSD-compatible nm... (cached) /usr/ccs/bin/nm -p Execution of ./configure --enable-static --disable-shared --disable-threads returned 1 configure: error: APR configure script terminated with error code 1 我现在碰到和你一样的问题了!我想问一下.你的这个问题如何解决的呢? |
草中宝 回复于:2003-08-09 01:09:56 |
[quote:2fe747cffa="flyxfl"]f a function `main' is needed.])
WARNING: More sophisticated templates can also be produced, see the WARNING: documentation. APR buildconf: Copying libtool helper files ... APR buildconf: Cr..........[/quote:2fe747cffa] 5555555,我也是这个问题搞不定, 换版本试下先 |
aashen 回复于:2003-08-11 15:39:59 |
哇噻,楼上的兄弟,也不用贴这么多做说明吧!
作者的安装手迹很浏畅啊,不知道我试的时候会出多少小麻烦,哈哈。总之好东西就要收藏。我顶。 |
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/