2011年4月29日 星期五

ubuntu 11.04 有關 JAVA 的相關設定

1. 新增軟體源


vim /etc/apt/sources.list


#deb cdrom:[Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)]/ natty main restricted




# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to


# newer versions of the distribution.


deb http://ubuntu.stu.edu.tw/ubuntu/ natty main restricted


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty main restricted




## Major bug fix updates produced after the final release of the


## distribution.


deb http://ubuntu.stu.edu.tw/ubuntu/ natty-updates main restricted


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty-updates main restricted




## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu


## team. Also, please note that software in universe WILL NOT receive any


## review or updates from the Ubuntu security team.


deb http://ubuntu.stu.edu.tw/ubuntu/ natty universe


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty universe


deb http://ubuntu.stu.edu.tw/ubuntu/ natty-updates universe


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty-updates universe




## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu


## team, and may not be under a free licence. Please satisfy yourself as to


## your rights to use the software. Also, please note that software in


## multiverse WILL NOT receive any review or updates from the Ubuntu


## security team.


deb http://ubuntu.stu.edu.tw/ubuntu/ natty multiverse


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty multiverse


deb http://ubuntu.stu.edu.tw/ubuntu/ natty-updates multiverse


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty-updates multiverse




## Uncomment the following two lines to add software from the 'backports'


## repository.


## N.B. software from this repository may not have been tested as


## extensively as that contained in the main release, although it includes


## newer versions of some applications which may provide useful features.


## Also, please note that software in backports WILL NOT receive any review


## or updates from the Ubuntu security team.


# deb http://ubuntu.stu.edu.tw/ubuntu/ natty-backports main restricted universe multiverse


# deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty-backports main restricted universe multiverse




deb http://ubuntu.stu.edu.tw/ubuntu/ natty-security main restricted


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty-security main restricted


deb http://ubuntu.stu.edu.tw/ubuntu/ natty-security universe


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty-security universe


deb http://ubuntu.stu.edu.tw/ubuntu/ natty-security multiverse


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty-security multiverse




## Uncomment the following two lines to add software from Canonical's


## 'partner' repository.


## This software is not part of Ubuntu, but is offered by Canonical and the


## respective vendors as a service to Ubuntu users.


# deb http://archive.canonical.com/ubuntu natty partner


# deb-src http://archive.canonical.com/ubuntu natty partner




## This software is not part of Ubuntu, but is offered by third-party


## developers who want to ship their latest software.


deb http://ubuntu.stu.edu.tw/ubuntu/ natty main


deb-src http://ubuntu.stu.edu.tw/ubuntu/ natty main


 


apt-get update


 


2. 安裝JDK , JRE


apt-get install sun-java-jre


jdk : wget jdk.1.6 


安裝 : sh ./jdk1.6


cp-r jdk1.6 /opt/jdk1.6


 


3. 安裝tomcat 6


wget http://apache.cs.pu.edu.tw/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.tar.gz


tar -zxvf apache-tomcat-6.0.32.tar.gz


http://apache.cs.pu.edu.tw/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-


 


4. 環境變數設定


vim ~/.bashrc


JAVA_HOME=/opt/jdk1.6
export JRE_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/jre
export TOMCAT_HOME=/opt/apache-tomcat-6.0.32
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export M2_HOME=/opt/apache-maven-2.2.1
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$TOMCAT_HOME/bin:$M2_HOME/bin:$PATH


5. 安裝 subversion


apt-get install subversion


svn
checkout svn://140.115.11.133/ncucc --username tyrc




 


沒有留言:

張貼留言

如何在 golang 裡面引用 gitlab private repo

參考文章:https://stackoverflow.com/questions/27500861/whats-the-proper-way-to-go-get-a-private-repository 原文是用 gitlab.company.com 當範例,這邊改成一般帳號...