svn服務(wù)器安裝
操作系統(tǒng): Redhat Linux AS5
Apache:2.2.8
Svn:1.4.6
由于apache2已經(jīng)安裝好了,所以在安裝svn的時候遇到一些問題,并把記錄下來,以備以后查詢。
先下載 http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
1 解壓
[root@localhost opt]# tar zxvf subversion-1.4.6.tar.gz
[root@localhost opt]# cd subversion-1.4.6
2 配置
[root@localhost subversion-1.4.6]# ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apache2/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --prefix=/usr/local/svn
最開始配置的時候
--with-apr-util=/usr/local/apr/bin/apu-1-config 是這個
--with-apr-util=/usr/local/apache2/bin/apu-1-config
提示:configure: error: the --with-apr-util parameter is incorrect
出現(xiàn)這個錯誤就進(jìn)行不下去了
看來要安裝個apr-util
3 下載apr-util
http://archive.apache.org/dist/apr/apr-util-1.2.7.tar.gz
4 解壓apr-util-1.2.7.tar.gz
[root@localhost opt]# tar zxvf apr-util-1.2.7.tar.gz
5 配置
[root@localhost opt]# cd apr-util-1.2.7
[root@localhost apr-util-1.2.7]# ./configure --with-apr=/usr/local/apache2
[root@localhost apr-util-1.2.7]# make
[root@localhost apr-util-1.2.7]# make install
apr-util 安裝成功
6 然后回到第2步
[root@localhost subversion-1.4.6]# ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apache2/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --prefix=/usr/local/svn
OK 沒有問題了
繼續(xù)
[root@localhost subversion-1.4.6]#make
[root@localhost subversion-1.4.6]#make install
svn 安裝成功
7 檢查subversion兩個動態(tài)庫有沒有安裝成功
vi /usr/local/apache2/conf/httpd.conf
看到下面兩個模塊說明安裝成功
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
8、配置SVN
vi /usr/local/apache2/conf/httpd.conf
在末尾加上以下參數(shù) :
<Location /svn>
DAV svn
SVNParentPath /svn
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /usr/local/svn/passwd
AuthzSVNAccessFile /usr/local/svn/auth
Require valid-user
</Location>
9、建立本地訪問控制文件
[root@localhost subversion-1.4.6]# cd ..
[root@localhost opt]# cd ..
[root@localhost /]# cd usr
[root@localhost usr]# cd local
[root@localhost local]# ./apache2/bin/htpasswd -c ./svn/passwd feng
New password:
提示你輸入密碼,默認(rèn)是MD5加密
10、建立本地項目控制文件
touch /usr/local/svn/auth
我的文件內(nèi)容為:
[groups]
[cms.sohudo.com:/]
sohudo= rw
ttsks = rw
[php.sohudo.com:/]
sohudo = rw
重新啟動apache