2013年11月30日 星期六

install Subversion Ver:1.8.4 in ubuntu 12.04LTS

舊版本的SVN 會在每個目錄面都建立一個 .SVN 資料夾. 

新版的 SVN (好像 1.7 以上) 就不會有這樣的狀況了 , 
只有根目錄建立一個.svn folder , 這樣有些好處, 我常常找一個接近的應用碼, 然後將整個目錄複製成另外一個名稱,然後開始新的程式, 最後要 commit 的時候就出現大問題的,因為我也複製的一個 .svn 資料夾,導致所有 svn 動作怪怪的 !! 新版就不會有這樣的問題了..

另外,可能不需要到處尋找.svn 資料夾, 所以 svn st 感覺好像有快一點.... 

不過要再 ubuntu 12.04LTS 上裝 SVN version 1.8.4就會出現一堆問題了 @@ .
我的習慣都是利用 source code 在環境上 make ; make install 的方式. 
好吧...自己來裝... 

A. Download subversion V1.8.4 source code form subversion  official side.
     "subversion-1.8.4.tar.gz"
B. The svn 1.8.4 need sqlite3 , so download sqlite3 source from offical side.
     "sqlite-autoconf-3080100.tar.gz"
C. If the SVN need suppoer http or https , need libserf & openSSH .
    #  The openSSH your can install with 
        "sudo apt-get install openssh-client openssh-server"
    # Download libserf source code .
        "serf-1.3.2.tar.bz2"
D. libserf 需要 scons  來編譯, 所以只好下載 scons-local-2.3.0.tar.gz 來用. 

 

下載完畢,可以開始動工 ,首先編譯 sqlite3 , 這邊沒有遇到問題 , 一般解開 , configure , make , make install ...就完成.

接著準備 libserf , 先將 scons 直接解開在 /usr/local/bin/ 下即可.接著解開 libserf .
在 libserf 資料夾內執行 "scons PREFIX=/usr/local"  , 接著執行  "sudo scons install" 這樣又完成了, 就可以在/usr/local/lib/ 下看到 libserf..xxxxx 的 so file .

可以開始編譯 svn 了 ,解開source code , 解開執行 ./configure --prefix=/usr/local , 接著 make , sudo make install . 就完成了 !! 

檢視看看svn 吧 , 利用 svn --version 可以看到下列訊息. 支援 http & https 了. 
如果沒有使用serf ,  就只有 ra_svn & ra_local 兩的項目  !