设为首页 收藏本站
查看: 2275|回复: 0

[经验分享] tomcat自启动问题 jsvc的 使用

[复制链接]

尚未签到

发表于 2015-8-10 16:35:24 | 显示全部楼层 |阅读模式
http://mail-archives.apache.org/mod_mbox/tomcat-users/200606.mbox/%3C20060617133344.YNGU15153.ibm68aec.bellsouth.net@mail.bellsouth.net%3E

2008-09-22补计:利用以下方法解决了tomcat的开机自启动问题.




假设你的java 相关环境变量设置在/etc/profile中
修改/etc/rc.local
在exit 0前加入以下内容:
source /etc/profile
$CATALINA_HOME/bin/startup.sh
注:$CATALINA_HOME是tomcat的安装目录




DSC0000.gif DSC0001.gif Code
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sh /etc/script/iptables.rules
source /etc/profile
/opt/tomcat/bin/startup.sh
exit 0


-----------------------------------------------------------------


此文中所提使用jsvc启动 Tomcat的症状与我目前(2008年9月18至9月21日都在忙于尝试利用jsvc自启动Tomcat的事情,但几天过去了,还困在此,所遇问题及现象与此帖子所示丝毫不差!)遇到的症状完全相同,只是在此帖子中,未提供有效的解决方法。




Message view



  




From
Warren Pace <wap...@bellsouth.net>


Subject
Re: Re: help getting jsvc up and running on sles9 on ibm pseries (power5)


Date
Thu, 01 Jan 1970 00:00:00 GMT



I know this doesn't address the compilation problems but why not run tomcat as a daemon in
a chrooted jail?   
see:  http://www.oreilly.com/catalog/tomcat/chapter/ch06.pdf
>
> From: Christian Andersson <ca@ofs.no>
> Date: 2006/06/15 Thu AM 06:36:47 EDT
> To: Tomcat Users List <users@tomcat.apache.org>
> Subject: Re: help getting jsvc up and running on sles9 on ibm pseries (power5)
>
> anyone?
>
> Christian Andersson wrote:
> > Hi there, I have a small problem that I'. hoping that you can help me solve.
> >
> > I want to be able to run tomcat on a server that we have available at a
> > hosting firm.
> >
> > I can get tomcat up and running on it witohut problem, as long as I
> > don't try to use jsvc..  and I need jsvc sicne I don't want to run tomat
> > as root, or manually start tomcat whenever there is a restart of the
> > server, etc..
> >
> > I've tried compiling the jsvc that comes with tomcat, but no luck, so I
> > downloaded deamons 1.0.1 and tried to get that compiling, and still no
> > luck, after searching/following different hints that I found on the net
> > (I'll ge over those later) I do get jsvc compiled, but I still cannot
> > run it, because it looks like jsvc is compiled as a 32 bit binary and
> > the ibm-java that I have is a 64 bit binary.
> >
> > anyway here is a list of what I've done (not much)
> >
> > after downloading and unpacking jsvc I went into
> > daemon-1.0.1/src/native/unix and did a ./configure
> > --with-java=/opt/ibm/java2-ppc64-50
> >
> > and got the following result..
> >
> > ----------------------------------------------------------------------
> > *** Current host ***
> > checking build system type... ./support/config.guess: unable to guess
> > system type
> >
> > This script, last modified 2001-04-20, has failed to recognize
> > the operating system you are using. It is advised that you
> > download the most up to date version of the config scripts from
> >
> >     ftp://ftp.gnu.org/pub/gnu/config/
> >
> > If the version you run (./support/config.guess) is already up to date,
> > please
> > send the following data and any information you think might be
> > pertinent to <config-patches@gnu.org> in order to provide the needed
> > information to handle your system.
> >
> > config.guess timestamp = 2001-04-20
> >
> > uname -m = ppc64
> > uname -r = 2.6.5-7.252-pseries64
> > uname -s = Linux
> > uname -v = #1 SMP Tue Feb 14 11:11:04 UTC 2006
> >
> > /usr/bin/uname -p =
> > /bin/uname -X     =
> >
> > hostinfo               =
> > /bin/universe          =
> > /usr/bin/arch -k       =
> > /bin/arch              = ppc64
> > /usr/bin/oslevel       =
> > /usr/convex/getsysinfo =
> >
> > UNAME_MACHINE = ppc64
> > UNAME_RELEASE = 2.6.5-7.252-pseries64
> > UNAME_SYSTEM  = Linux
> > UNAME_VERSION = #1 SMP Tue Feb 14 11:11:04 UTC 2006
> > configure: error: cannot guess build type; you must specify one
> > ----------------------------------------------------------------------
> >
> > after downloading the newest config.guess from
> > http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess
> > (the above specified link leads to this file) and replacing the existing
> > one in  daemon-1.0.1/src/native/unix/support and once more execute
> > configure I get the following...
> >
> > ----------------------------------------------------------------------
> > *** Current host ***
> > checking build system type... powerpc64-unknown-linux-gnu
> > checking host system type... powerpc64-unknown-linux-gnu
> > checking cached host system type... ok
> > *** C-Language compilation tools ***
> > checking for gcc... gcc
> > checking for C compiler default output file name... a.out
> > checking whether the C compiler works... yes
> > checking whether we are cross compiling... no
> > checking for suffix of executables...
> > checking for suffix of object files... o
> > checking whether we are using the GNU C compiler... yes
> > checking whether gcc accepts -g... yes
> > checking for gcc option to accept ANSI C... none needed
> > checking for ranlib... ranlib
> > *** Host support ***
> > checking C flags dependant on host system type... failed
> > configure: error: Unsupported CPU architecture "powerpc64"
> > ----------------------------------------------------------------------
> >
> > following information on the net it was suggested that I change the
> > configure script so that it accepts powerpc* instead of powerpc
> > that is from
> > ----------------------------------------------------------------------
> > ...
> >   case $host_cpu in
> >   powerpc)
> >     CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" ;;
> > ...
> > ----------------------------------------------------------------------
> > to
> > ----------------------------------------------------------------------
> > ...
> >   case $host_cpu in
> >   powerpc*)
> >     CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\"" ;;
> > ...
> > ----------------------------------------------------------------------
> >
> > the result:
> >
> > ----------------------------------------------------------------------
> > ...
> > *** All done ***
> > Now you can issue "make"
> > ----------------------------------------------------------------------
> >
> > make also succedes, but when running jsvc using the script that comes
> > with apache tomcat (modified to suite my needs ofcourse) no jsvc is
> > running, and in the error log I find the following...
> >
> > ----------------------------------------------------------------------
> > 12/06/2006 11:58:15 19502 jsvc.exec error: Cannot dynamically link to
> > /opt/ibm/java2-ppc64-50/jre/bin/classic
> > /libjvm.so
> > 12/06/2006 11:58:15 19502 jsvc.exec error:
> > /opt/ibm/java2-ppc64-50/jre/bin/classic/libjvm.so: cannot open sha
> > red object file: No such file or directory
> > 12/06/2006 11:58:15 19501 jsvc.exec error: Service exit with a return
> > value of 1
> > ----------------------------------------------------------------------
> >
> > and in /opt/ibm/java2-ppc64-50/jre/bin/classic these files exist
> >
> > -rwxr-xr-x  1 root root 238290 2006-03-10 16:50 libjvm.so
> >
> > so it should be able to find the file since the user that I'm running
> > this fron is able to find it in the correct location. and can read it.
> >
> > for me this now looks like jsvc is beeing compiled as a 32bit executable
> > but java is a 64bit executable..
> >
> > I've tried reading/changing more stuff to get it working, but sofar I
> > have been unable to do so.
> >
> > /Christian Andersson
> >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org





Mime


  • Unnamed text/plain (inline, 7-Bit, 8323 bytes)





View raw message

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-97125-1-1.html 上篇帖子: 在Eclipse中配置tomcat 下篇帖子: 在Foreda8中整合Apche httpd2.4.6和Tomcat7.0.42(使用tomcat-connectors-1.2.37)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表