免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: zhangyan@tq.cn
打印 上一主题 下一主题

更改了.bash_profile导致普通用户的tomcat起不来[已解决] [复制链接]

论坛徽章:
0
31 [报告]
发表于 2006-12-14 15:16 |只看该作者
你改过CLASSPATH的内容吗?
应该是这里有问题

另外:
你的PATH也有问题吧,连/usr/bin都没有,很多程序会运行不了的。

[ 本帖最后由 ivanleung 于 2006-12-14 15:35 编辑 ]

论坛徽章:
0
32 [报告]
发表于 2006-12-15 10:51 |只看该作者
非常感谢大家对我的帮助,我按照briangao (Brian)的指导,重新写了.bash_profile:返回的现象是这样的:

  1.  ".bash_profile" [dos] 23L, 1329C written                                 
[root@www work]# wc  -l  .bash_profile  
23 .bash_profile

  2.  Last login: Fri Dec 15 09:04:19 2006 from 61.51.121.160
-bash: /home/work/.bash_profile: line 24: syntax error: unexpected end of file
-bash-3.00$

  3.  按照lizisor   的提示到root下起了一下,
   
[root@www bin]# ./startup.sh
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program

这些现象显示,问题并没有得到改善.  
  这里还请帮助我的朋友们看一下本贴的一楼的问题,和导致问题出现的原因 .真心感谢了

现在我的work下的cat .bash_profile是这样的:
-bash-3.00$ cat .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

JAVA_HOME=/usr/java/j2sdk1.4.1_02

JAVA_OPTS="-server -Xmx256m -Xms128m"
CATALINA_OPTS="-Xms128m -Xmx512m"

#PATH=/usr/java/jdk1.5.0_06/binATH
PATH=.:JAVA_HOME/binATH

CLASSPATH=.:/usr/java/j2sdk1.4.1_02/bin:/usr/java/j2sdk1.4.1_02/lib:/home/work/21ct:/home/work/21ct/lib/mssqlserver.jar:/home/work/21ct/lib/chart/jfreechart-1.0.0-rc1.jar:/home/work/21ct/lib/chart/gnujaxp.jar:/home/work/21ct/lib/chart/jcommon-1.0.0-rc1.jar:/home/work/jtom/webapps/ROOT/WEB-INF/lib/mm.mysql-2.0.4-bin.jar:/home/work/21ct/lib/chart/junit.jar:/home/work/21ct/lib/servlet.jar:/home/work/21ct/lib/chart/servlet.jar:/home/work/21ct/lib/msbase.jar:/home/work/21ct/lib/msutil.jar:/home/work/jtom/bin/bootstrap.jar:/usr/java/j2sdk1.4.1_02/lib/tools.jar:/home/work/21ct/lib/jdom.jar:/home/work/21ct/lib/jaxp.jar:/home/work/jtom/webapps/ROOT/WEB-INF/lib/mail.jar:/home/work/jtom/webapps/ROOT/WEB-INF/lib/mysql-connector-java-3.1.12-bin.jar:/home/work/jtom/webapps/ROOT/WEB-INF/lib/classes12.jar:/home/work/jtom/webapps/ROOT/WEB-INF/lib/activation.jar:/home/work/jtom/webapps/ROOT/WEB-INF/classes

export PATH
export JAVA_HOME
export JAVA_OPTS
export CATALINA_OPTS
unset USERNAME
export CLASSPATH
-bash-3.00$

[ 本帖最后由 zhangyan@tq.cn 于 2006-12-15 10:54 编辑 ]

论坛徽章:
0
33 [报告]
发表于 2006-12-15 11:43 |只看该作者
The smiley faces messed up my post. I emailed you a text attachment. Cut and paste it into your .bash_profile and see what happens.   

论坛徽章:
0
34 [报告]
发表于 2006-12-15 11:52 |只看该作者
I think we are chasing a ghost. The problem may not be the .bash_profile itself even it contains error. I pasted the same text posted here into my .bash_profile and there was no complaint. So I believe it is still the language setting somewhere that doesn't like some of the chars in the profile.

论坛徽章:
0
35 [报告]
发表于 2006-12-15 11:59 |只看该作者
你好,我已经将你给我的文档替换到当前的.bash_profile文件中,出现以下现象:
1.  
[root@www work]# wc -l .bash_profile
26 .bash_profile
2.
Last login: Fri Dec 15 10:47:02 2006 from 61.51.121.160
-bash: /home/work/.bash_profile: line 27: syntax error: unexpected end of file
-bash-3.00$
3.
试图启动tomcat时
[root@www bin]# ./startup.sh
The JAVA_HOME environment variable is not defined
This environment variable is needed to run this program

论坛徽章:
0
36 [报告]
发表于 2006-12-15 12:09 |只看该作者
我只是在root下加了一句话:  LANG=C; export LANG
然后将/etc/il8n中的所有的环境变量的值为zh的改为en,
我并没有在work的.bash_profil中做任何的修改,  

但是,所有的问题出现在我的修改操作之后,偏偏报的错误提示发生在
被我修改的.bash_profile文中.

论坛徽章:
0
37 [报告]
发表于 2006-12-15 12:32 |只看该作者
Try this:

In /etc/profile add LANG=C;export LANG

and then log out and log in

Did you select multiple languages during the installation or you just selected Chinese?
If you did install multiple languages, then you can use LANG variable and /etc/sysconfig/i18n file to switch between languages. Otherwise, you'll have problems even you get shell to work

论坛徽章:
0
38 [报告]
发表于 2006-12-15 13:33 |只看该作者
  1. PATH=.:JAVA_HOME/binATH
复制代码

Should be

  1. PATH=.:JAVA_HOME/bin:PATH
复制代码

论坛徽章:
0
39 [报告]
发表于 2006-12-15 14:18 |只看该作者
原帖由 wongtsing 于 2006-12-15 13:33 发表
  1. PATH=.:JAVA_HOME/binATH
复制代码

Should be

  1. PATH=.:JAVA_HOME/bin:PATH
复制代码

  
PATH=.:JAVA_HOME/binATH   是
PATH=.:JAVA_HOME/bin$PATH

论坛徽章:
0
40 [报告]
发表于 2006-12-15 14:25 |只看该作者
  1. PATH=.:JAVA_HOME/binATH   是
  2. PATH=.:JAVA_HOME/bin$PATH
复制代码

Both settings are incorrect. Should be
  1. PATH=.:$JAVA_HOME/bin:$PATH
复制代码

However, as I mentioned before, it doesn't seems to be a profile issue. Did you try
  1. setting LANG=C;export LANG
复制代码

in /etc/profile ?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP