2012年3月15日 星期四

Endeavour Agile ALM 安裝測試

環境:
OS :Ubuntu 11.10 64 bit desktop
JDK:1.6.0_31 64bit
JRE:1.6.0_31 64bit


實測結果:JDK與JRE可用32bit
Ubuntu 11.10 並沒有將openJDK給預設安裝


1.install JDK

  • 下載JDK SE
  • sudo mkdir /usr/java
  • sudo mkdir /usr/java/jdk
  • sudo chmod +x jdk-6u31-linux-x64.bin  //更改rwx權限
  • ./jdk-6u31-linux-x64.bin  //執行bin檔使其自行解壓縮
  • sudo mv jdk1.6.0_31 /usr/java/jdk
2.install JRE
  • 下載 JAVA JRE
  • sudo mkdir /usr/java/jre
  • sudo chmod +x jre -6u31-linux-x64.bin
  • sudo ./jre-6u31-linux-x64.bin
  • sudo mv jre1.6.0_31 /usr/java/jre
3.set 環境變數
//沒有gedit 的環境用vi

//各別登入環境修改下檔
sudo gedit ~/.bash_profile

//若要使全部登入環境套用修改
sudo gedit /etc/profile

檔案最下面寫入
JAVA_HOME=/usr/java/jdk/jdk1.6.0_31
export JAVA_HOME

JRE_HOME=/usr/java/jre/jre1.6.0_31
export JRE_HOME

PATH=$JAVA_HOME/bin:$PATH
export PATH=$JAVA_HOME/bin:$PATH

CLASSPATH=.:JAVA_HOME/lib
export CLASSPATH=.:JAVA_HOME/lib

注意不要留空白,會造成錯誤!

4.install Endeavour Agile ALM 1.25
  • 下載Endeavour Agile ALM 1.25
  • sudo uzip -o endeavour-mgmt-1.25.zip
  • sudo mv endeavour-mgmt-1.25/opt
  • sudo gedit /opt/endeavour-mgmt-1.25/start-endeavour.shDuser.language=en -Duser.country=EN 可以改成zh與ZH會成為簡體中文
  • sudo gedit /opt/endeavour-mgmt-1.25/data/start_hypersonic.sh
    在JAVA="java"上面加入以下片段:
    JAVA_HOME=/usr/java/jdk/jdk1.6.0_31
    JRE_HOME=/usr/java/jre/jre1.6.0_31PATH=$JAVA_HOME/bin:$PATH
    CLASSPATH=.:JAVA_HOME/lib
  • sudo gedit /opt/endeavour-mgmt-1.25/tomcat/bin/setclasspath.sh
    在# $ID: setclasspath.sh 589060 2007-10-27... 區塊下面加入如下片段:
    JAVA_HOME=/usr/java/jdk/jdk1.6.0_31
    JRE_HOME=/usr/java/jre/jre1.6.0_31PATH=$JAVA_HOME/bin:$PATH
    CLASSPATH=.:JAVA_HOME/lib
  • cd /opt/ endeavour-mgmt-1.25/data
5.啟動server
  • sudo ./start_hypersonic.sh  //啟動內建DB
  • 開另外一個新的終端機
  • cd /opt/endeavour-mgmt-1.25
  • sudo ./start-endeavour.sh //啟動endeavour
  • 打開瀏覽器輸入http://localhost:8080/endeavour/
  • 登入帳號:Admin、密碼:password
portNumber 請從tomcat config檔修改


6.關閉server

  • sudo ./stop-endeavour.sh 
  • sudo ./stop_hypersonic.sh 


7.修改Http使用的PortNumber與使用編碼
  • sudo gedit /opt/endeavour-mgmt-1.25/tomcat/conf/server.xml
找到:
<Connector port= "8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"/>

修改port為8400:
<Connector port= "8400" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8"/>
 




8.複製mysql的hibernate.cfg

  • sudo cp /opt/endeavour-mgmt-1.25/data/mysql/data/hibernate.cfg /opt/endeavour-mgmt-1.25/tomcat/webapps/endeavour/WEB-INF/classes
9.修改hiberante.cfg的內容

 <property name="hibernate.connection.username">打入你設定登入的帳號</property>
<property name="hibernate.connection.password">請在這裡打入資料庫的密碼</property>


10.Restort endeavour的資料
在data/mysql底下有mysql使用的資料庫檔


附註:
1.若使用window系統安裝不用修改setclasspath設定,也不需特別安裝JDK或JRE即可運作,windows會使用 Endeavour  內所附帶的JRE。
2.windows特別修改C:\endeavour-mgmt-1.25\tomcat\bin底下的catalina.bat檔設定,修改如下:



set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
:noJuli





因為window與linux的運作不相同,若不特別設定會使用UTF16,而一般MySQL DB習慣上我們都會設為UTF-8,如此會造成亂碼問題。

Linux環境tomcat的setclasspath.sh檔

Tomcat在bin底下有一支setclasspath.sh可以設定tomcat所要使用的JDK與JRE。
用法範例:

JAVA_HOME=/usr/java/jdk/jdk1.6.0
JRE_HOME=/usr/java/jre/jre1.6.0

PATH=$JAVA_HOME/bin:$PATH

CLASSPATH=.:JAVA_HOME/lib

當你想讓tomcat不想使用環境預設的JDK時會用的到。

2012年3月8日 星期四

apt主機設定檔 ect/apt/source.list

//編輯 source.list
#sudo vi /etc/apt/source.list

//內容
# deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ dists/oneiric/main/binary-i386/

# deb cdrom:[Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)]/ oneiric main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu oneiric main restricted
deb-src http://archive.ubuntu.com/ubuntu oneiric main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu oneiric-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu oneiric-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://archive.ubuntu.com/ubuntu oneiric universe
deb-src http://archive.ubuntu.com/ubuntu oneiric universe
deb http://archive.ubuntu.com/ubuntu oneiric-updates universe
deb-src http://archive.ubuntu.com/ubuntu oneiric-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://archive.ubuntu.com/ubuntu oneiric multiverse
deb-src http://archive.ubuntu.com/ubuntu oneiric multiverse
deb http://archive.ubuntu.com/ubuntu oneiric-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu oneiric-updates multiverse

## 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://archive.ubuntu.com/ubuntu oneiric-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu oneiric-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu oneiric-security main restricted
deb-src http://archive.ubuntu.com/ubuntu oneiric-security main restricted
deb http://archive.ubuntu.com/ubuntu oneiric-security universe
deb-src http://archive.ubuntu.com/ubuntu oneiric-security universe
deb http://archive.ubuntu.com/ubuntu oneiric-security multiverse
deb-src http://archive.ubuntu.com/ubuntu oneiric-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 oneiric partner
deb-src http://archive.canonical.com/ubuntu oneiric partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu oneiric main
deb-src http://extras.ubuntu.com/ubuntu oneiric main
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

2012年3月7日 星期三

ubuntu Server 安裝 x-windows

Step1.請先參考ubuntu server apt proxy 設定
Setp2.x-windows install

  • 台灣下載目前有點問題,請參考 http://jt-java.blogspot.com/,將server位置中有tw的都拿掉。
  • 將被註解的#位址都打開
  • apt-get update 
  • apt-get upgrade 
  • sudo aptitude install x-window-system-core
  • sudo aptitude install xorg
  • sudo aptitude install ubuntu-desktop
    or
    sudo aptitude install xubuntu-desktop
    or
    sudo aptitude install fluxbox fluxconf

  • sudo aptitude install gdm
    or
    sudo aptitude install xdm    
  • sudo reboot






相關參考連結:




有關apt使用參考:
http://apt.nc.hcc.edu.tw/web/apt/apt.html
http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.zh-tw.html

Ubuntu Server apt proxy設定

Step1.
  #sudo vi /etc/apt/apt.conf


//若vi不能顯示中文時,將其環境先改成英文顯示

  #LANG=en_US 



Step2.
vi中按下i進入編輯模式,輸入:


Acquire::http::proxy "http://[proxy address]:[prot number]";
Acquire::https::proxy "https://[proxy address]:[prot number]";
Acquire::ftp::proxy "ftp://[proxy address]:[prot number]";


 vi中按下Esc回到一般模式,打入:w!儲存檔案


如此apt指令才能更新




參考:
鳥哥http://linux.vbird.org/linux_server/0450apt.php



2012年3月3日 星期六

Ubuntu安裝桌面捷徑工具

Ubuntu11.10拿掉了原本的的右鍵建立捷徑,可參考下列方式使用


安裝
sudo apt-get install --no-install-recommends gnome-panel


使用方法
gnome-desktop-item-edit ~/Desktop/ --create-new


ubuntu 新增啟動圖示

OS Ubuntu 10.04


Step1.新增啟動圖示
  • 滑鼠右鍵→新增啟動圖示
Step2.欄位輸入數值 (這裡使用Eclipse作為範例)

  • 類型:應用程式
  • 名稱:eclipse
  • 指令:/opt/eclipse/eclipse











若你想改變ICON點擊圖片即可,然後選擇你想要用的ICON檔案。
eclipse可以使用eclipse資料夾裡的icon.xpm。