Set up SVN in Ubuntu

In Ubuntu, the easiest way to do version control is to set up a Subversion (SVN) server.


After several tries i did, the following steps should be works on Ubuntu 11.04 desktop version!


  1. Install SVN and Apache
    sudo apt-get install subversion libapache2-svn


  2. Create a directory to hold your repository.
    sudo svnadmin create /var/lib/svn


  3. Give apache the access right to the repository
    sudo chown -R www-data:www-data /var/lib/svn
    sudo chmod 770 -R /var/lib/svn


  4. Configure Apache for SVN access
    vi /etc/apache2/mods-available/dav_svn.conf
    Uncomment the codes by removing the ‘#’ in front of the following lines:

    <Location /svn>

    DAV svn

    AuthType Basic
    AuthName “Subversion Repository”
    AuthUserFile /etc/apache2/dav_svn.passwd


    <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
    </LimitExcept>
    </Location>



    If you have only one repository for your SVN, uncomment the following line


    SVNPath /var/lib/svn


    Else if you are setting up multiple repositories, uncomment this line


    SVNParentPath /var/lib/svn


    Remember that at any time, only SVNPath or SVNParentPath is uncommented. Do not uncomment both at the same time.

  5. Create a password for your username
    sudo htpasswd -cm /etc/apache2/dav_svn.passwd yourusername


  6. Restart apache
    sudo /etc/init.d/apache2 restart
    If you met "No apache MPM package installed" error message, you need to run the below CMD:
    sudo apt-get install apache2

    Now open your browser and go to http://localhost/svn. If you see the following, the your installation is successful.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值