Mac 10.8開始,不再默認安裝svn,需要自行安裝
如果您安裝了XCode,會隨同安裝svn
更省事的辦法:
1、安裝homebrew,看看官網 http://brew.sh/index_zh-cn.html
打開終端Terminal,粘貼下面的命令:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
安裝過程中,如果有警告
Warning: Install the "Command Line Tools for Xcode": http://connect.apple.com
如果您安裝了xcode,
打開xcode以后,點擊菜單欄的:
Xcode -> Preferences… -> Downloads
選中
Command Line Tools for Xcode,然后安裝即可
也可以直接去蘋果官網下載
2、安裝svn
輸入:
brew svn install
安裝過程很簡單,幾乎沒有提示
3、配置svn服務
1)首先,創建一個svn庫的文件夾,如:/svn/repository/
2) 在終端輸入
svnadmin create /svn/repository/
這個命令在/svn/repository/文件夾下,創建了需要的文件,然后簡單編輯就可以用了
進入conf文件夾
首先編輯 svnserve.conf
保存后,其他兩個文件參考里面的內容編輯即可
3)啟動
svnserve -d -r /svn/repository/
結束:kill -9 svnserve
4)測試
可以使用svn命令行,也可以在Windows下用Tortoise SVN測試
地址:svn://192.168.0.1
5)如果遇到古怪問題,請檢查權限,或者Google一下