配置tomcat
1.安装
2.vi server.xml (按要求修改端口号)
在
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
下面添加
<Context docBase="/home/ubuntu/tomcat/bc/admin/webapps/bc-api" path="" reloadable="true" debug="0" privileged="true"/>
3 vi setclasspath.sh (配置jdk) 在头部添加
export JAVA_HOME=/home/ubuntu/tomcat/jdk1.8.0_121
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:%{JAVA_HOME}/lib:%{JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
在300行左右
# Set UMASK unless it has been overridden
if [ -z "$UMASK" ]; then
UMASK="0027" ====》改成0022 (上传文件权限)
fi
umask $UMASK
4 vi catalina.sh 头部添加
JAVA_OPTS="-server -Xms2048m -Xmx2048m -Xmn512m"
export JAVA_OPTS="$JAVA_OPTS -Duser.timezone=Asia/shanghai"
# myself : add
export CATALINA_BASE=/home/ubuntu/tomcat/bc/admin
export CATALINA_HOME=/home/ubuntu/tomcat/bc/admin
export TOMCAT_HOME=/home/ubuntu/tomcat/bc/admin
网友评论