Ubuntu Maven安装配置

(1)已安装了jdk并有设置JAVA_HOME环境变量。

(2)http://tomcat.apache.org/上下载得到apache-tomcat-5.5.27.tar.gz

tar -zxvf apache-tomcat-5.5.27.tar.gz

sudo vi/usr/share/tomcat5/apache-tomcat-5.5.27/bin/catalina.sh
修改catalina.sh文件,在文件开头注释后插入

JAVA_HOME="/usr/lib/jvm/java/jdk1.6.0_12"

(3)启动tomcat

sudo/usr/share/tomcat5/apache-tomcat-5.5.27/bin/startup.sh

(4)在~/.bashrc文件里添加:

alias starttomcat='sudo/usr/share/tomcat5/apache-tomcat-5.5.27/bin/startup.sh'
alias shutdowntomcat='sudo/usr/share/tomcat5/apache-tomcat-5.5.27/bin/shutdown.sh'
alias restarttomcat='shutdowntomcat && starttomcat'

source ~/.bashrc

(5)修改server.xml

sudo vi/usr/share/tomcat/apache-tomcat-5.5.27/conf/server.xml
<Connector port="8080"....../>


你可能感兴趣的:(java,jdk,maven,ubuntu)