当前位置: 技术问答>linux和unix
项在linux下开发 jsp,配的 tomcat 启动不起来,请高手给看一下。
来源: 互联网 发布时间:2015-05-24
本文导语: 我的jdk安装在 /usr/java/j2sdk1.4_2_02 tomcat 安装在 /usr/local/tomcat 编辑 /etc/profile文件,加入 #Java Environment export JAVA_HOME="/usr/java/j2sdk1.4_2_02" export CATALINA_HOME="/usr/local/tomcat" CLASS_PATH="./:$JAVA_HOME/bin/dt.jar:$JAVA_HOME/bin/to...
我的jdk安装在 /usr/java/j2sdk1.4_2_02
tomcat 安装在 /usr/local/tomcat
编辑 /etc/profile文件,加入
#Java Environment
export JAVA_HOME="/usr/java/j2sdk1.4_2_02"
export CATALINA_HOME="/usr/local/tomcat"
CLASS_PATH="./:$JAVA_HOME/bin/dt.jar:$JAVA_HOME/bin/tools.jar"
PATH="$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin"
编辑 .bash_profile 为
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"
export USERNAME BASH_ENV PATH
export JAVA_HOME=/usr/java/j2sdk1.4.2_02
export JAVA_HOME="/usr/java/j2sdk1.4_2_02"
export CATALINA_HOME="/usr/local/tomcat"
CLASS_PATH="./:$JAVA_HOME/bin/dt.jar:$JAVA_HOME/bin/tools.jar"
PATH="$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin"
然后在 /usr/local/tomcat/bin 下运行
./catalina.sh start
在终端显示:
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME: /usr/java/j2sdk1.4.2_02
touch: 正在创建目录 ‘/usr/local/tomcat/logs/catalina.out’: 没有那个文件或目录
./catalina.sh: line 231: /usr/local/tomcat/logs/catalina.out: 没有那个文件或目录
在终端中[root@localhost bin]#java -version
显示bash: java: command not found
请高手给看看我哪里出错了,万分感谢!!!
tomcat 安装在 /usr/local/tomcat
编辑 /etc/profile文件,加入
#Java Environment
export JAVA_HOME="/usr/java/j2sdk1.4_2_02"
export CATALINA_HOME="/usr/local/tomcat"
CLASS_PATH="./:$JAVA_HOME/bin/dt.jar:$JAVA_HOME/bin/tools.jar"
PATH="$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin"
编辑 .bash_profile 为
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"
export USERNAME BASH_ENV PATH
export JAVA_HOME=/usr/java/j2sdk1.4.2_02
export JAVA_HOME="/usr/java/j2sdk1.4_2_02"
export CATALINA_HOME="/usr/local/tomcat"
CLASS_PATH="./:$JAVA_HOME/bin/dt.jar:$JAVA_HOME/bin/tools.jar"
PATH="$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin"
然后在 /usr/local/tomcat/bin 下运行
./catalina.sh start
在终端显示:
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JAVA_HOME: /usr/java/j2sdk1.4.2_02
touch: 正在创建目录 ‘/usr/local/tomcat/logs/catalina.out’: 没有那个文件或目录
./catalina.sh: line 231: /usr/local/tomcat/logs/catalina.out: 没有那个文件或目录
在终端中[root@localhost bin]#java -version
显示bash: java: command not found
请高手给看看我哪里出错了,万分感谢!!!
|
PATH="$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin"
这句话要在export PATH之前
这句话要在export PATH之前
|
PATH没有设置正确