系統版本: Centos6.3
SVN版本:1.8.9(最新)
下載地址:http://archive.apache.org/dist/subversion/
下載 subversion-1.8.9.tar.gz 和 subversion-deps-1.6.9.tar.gz 使用 rz 命令上傳至linux
或者直接用 wget 命令
wget http://archive.apache.org/dist/subversion/subversion-1.8.9.tar.gz
tar -zxf subversion-1.8.9.tar.gz
cd subversion-1.8.9
./configure --with-apr=/home/apache --with-apr-util=/home/apache --with-sqlite=/home/sqlite
make && make install
因爲編譯安裝的時候手動指定了安裝目錄,所以要加入環境變量:
打開 /etc/profile 在最後面寫上 PATH=$PATH:/home/svn export
檢查安裝是否成功
svnserve --version
返回值如下,說明安裝成功...
svnserve, version 1.8.9 (r1591380)
compiled May 31 2014, 12:57:55 on x86_64-unknown-linux-gnu
Copyright (C) 2014 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository back-end (FS) modules are available:
* fs_fs : Module for working with a plain file (FSFS) repository.
如果編譯失敗,可能需要另外的依賴庫,zlib。。等,可根據提示安裝依賴庫,之後編譯時 --with-zlib=依賴庫安裝位置 即可
啓動svn(手動編譯安裝完了別忘了配環境變量)
建立代碼庫: mkdir -p wwwroot/
svnadmin create /home/wwwroot/project
成功會在project中生成關於svn的配置信息文件
啓動svn: svnserve -d -r /home/wwwroot
報錯:svnserve: E000098: Can't bind server socket: Address already in use
svn服務默認端口是3690.被佔用就會報這個錯誤,那我用3691端口開啓svn服務,就解決問題了
解決方法:svnserve -d --listen-port=3691 -r /home/wwwroot