日期:2014-05-16  浏览次数:20569 次

ubuntu 上部署多个tomcat问题
第一个能启动也能访问 第二个访问不了
/etc/profile 里的内容

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$PS1" ]; then
  if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

# The default umask is now handled by pam_umask.
# See pam_umask(8) and /etc/login.defs.

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
export JAVA_HOME=/usr/lib/jdk1.6.0_07
export JRE_HOME=/usr/lib/jdk1.6.0_07/jre
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH 
export CLASSPATH=$CLASSPATH:.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
JAVA_HOME=/usr/lib/jdk1.6.0_07
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib:$JAVA_HOME/bin
export JAVA_HOME CLASSPATH
CATALINA_BASE=/usr/lib/pache-tomcat-6.0.36
CATALINA_HOME=/usr/lib/pache-tomcat-6.0.36
export CATALINA_BASE CATALINA_HOME
CATALINA_2_BASE=/usr/lib/tomcat/pache-tomcat-6.0.36
CATALINA_2_HOME=/usr/lib/tomcat/pache-tomcat-6.0.36
export CATALINA_2_BASE CATALINA_2_HOME
TOMCAT_HOME=/usr/lib/pache-tomcat-6.0.36
export TOMCAT_HOME
TOMCAT_2_HOME=/usr/lib/tomcat/pache-tomcat-6.0.36
export TOMCAT_2_HOME


第二个tomcat 启动文件的内容
#!/bin/sh

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the spe