相關版本
subversion在安裝的時候,要求相關軟件的版本一致,而不是說軟件版本最新就最好.下面是我安裝的相關版本.
httpd-2.2.3.tar.gz ,
subversion-deps-1.4.0.tar.gz
subversion-1.4.0.tar.gz
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=0&expandFolder=0&folderID=0
3:安裝準備
mkdir /subversion
cp httpd-2.2.3.tar.gz /subversion/
cp subversion-deps-1.4.0.tar.gz /subversion/
cp subversion-1.4.0.tar.gz /subversion/
cd /subversion/
tar zxvf httpd-2.2.3.tar.gz
tar zxvf subversion-deps-1.4.0.tar.gz
tar zxvf subversion-1.4.0.tar.gz
4:httpd的安裝.
cd /subversion/httpd-2.2.3
./configure --prefix=/usr/local/apache2 --enable-so --enable-dav
make && make install
cd /usr/local/apache2/bin/
./apachectl start
這個時候,打開瀏覽器,輸入http://localhost/,如果瀏覽器出現It Works,則說明httpd安裝成功了.
5:subversion的安裝(安裝需要確認apache的安裝位置)
cd /subversion/subversion-1.4.0
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apache2/ --with-apr-util=/usr/local/apache2/ --prefix=/usr/local/subversion --with-ssl --with-zlib --enable-maintianer-mode
make && make install
6:建立和導入版本庫
[root@localhost subversion-1.4.0]# cd /usr/local/subversion/bin/
[root@localhost bin]# mkdir /repository
[root@localhost bin]# ./svn import /root/src/ file:///repository/test/ -m "initial import"
//命令成功執行,會有如下的提示信息,.
新增 /root/src/main.cpp
提交後的修訂版爲 1。
7:修改權限
[root@localhost bin]# cd /repository/test/
[root@localhost test]# chmod -R 777 *
8:修改Apache的配置文件
1):打開httpd.conf文件
[root@localhost test]# gedit /usr/local/apache2/conf/httpd.conf &
2):修改httpd.conf文件,在文件的最後添加下面幾行
<Location /svn
SVNParentPath /repository/
</Location>
3):保存退出
9:重啓apache服務.
[root@localhost bin]# cd /usr/local/apache2/bin/
[root@localhost bin]# ./apachectl stop
[root@localhost bin]# ./apachectl start
起動
/usr/bin/<strong black;="" background-color:="" #ffff66\"="">svnserve -d -r /myproject/project