結合apache安裝subversion

來源:互聯網
上載者:User

標籤:http   io   檔案   ar   art   代碼   ad   ef   

########下載原始碼包##########
wget http://subversion.tigris.org/downloads/subversion-1.6.15.tar.gz;
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.15.tar.gz;
wget http://mirror.bjtu.edu.cn/apache/httpd/httpd-2.2.21.tar.gz;
wget http://archive.apache.org/dist/apr/apr-1.4.2.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.3.10.tar.gz

yum -y install gcc* openssl-devel expat-devel openssl openssl-devel libxml2-devel glibc-common gd-devel;

安裝apr,安裝apr-util,安裝 apache

其中apache的安裝需要啟用--enable-dav,--enable-maintainer-mode,才能支援subversion的訪問。

參看其它博文,安裝以上軟體

下面詳細介紹subversion的安裝

tar zxvf subversion-1.6.15.tar.gz;
tar zxvf subversion-deps-1.6.15.tar.gz;
cd subversion-1.6.15;
./configure --prefix=/siteServer/svnserver --with-apxs=/siteServer/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --without-berkeley-db;
make;
make install;
cd ..;

下面就是配置你的svn,這個需要你手動操作

1.建立svn版本庫目錄
mkdir -pv /siteServer/svnserver/svndata
chown -Rv www /siteServer/svnserver/svndata
chmod -Rv 755 /siteServer/svnserver/svndata

2.建立svn版本庫
/siteServer/svnserver/bin/svnadmin create --fs-type fsfs /siteServer/svnserver/svndata/jken

3.建立存取控制檔案
#第一次加使用者名稱
/siteServer/apache2/bin/htpasswd -c /siteServer/svnserver/svndata/passwd xiaoyue
/siteServer/apache2/bin/htpasswd  /siteServer/svnserver/svndata/passwd xiaoli

4.建立本地項目控制檔案
cd /siteServer/svnserver/svndata/jken/conf
vi authz

[groups]
admin=xiaoyue,xiaoli
[jken:/]
@admin = rw

cat /siteServer/apache2/conf/httpd.conf | grep svn

顯示
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so
就表明安裝成功。

vi /siteServer/apache2/conf/httpd.conf

添加

<Location /svn>
    DAV svn
    SVNParentPath /siteServer/svnserver/svndata
    AuthType Basic
    AuthName "Subversion"
    AuthUserFile /siteServer/svnserver/svndata/passwd
    AuthzSVNAccessFile /siteServer/svnserver/svndata/jken/conf/authz
    Require valid-user
</Location>

5.啟動apache
/siteServer/apache2/bin/apachectl start

http://192.168.1.236/svn/jken

完成。。。。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.