正文

ubuntu 12.04 服务器上安装svn

(2014-08-13 16:58:40) 下一个

1. To install SVN server, run this command at the command prompt:

sudo apt-get install subversion libapache2-svn apache2

2. Make the directory where you want to keep the svn repositories:

sudo mkdir /svn

3. edit the dav_svn.conf file:

sudo vim /etc/apache2/mods-enabled/dav_svn.conf

Delete all the data and make it simple like this :-)

DAV svnSVNParentPath /svnAuthType BasicAuthName "Subversion Repository"AuthUserFile /etc/apache2/dav_svn.passwdRequire valid-user

4. To create a svn user , use the following command:

sudo htpasswd -cm /etc/apache2/dav_svn.passwd username

We only need to use the -c option for the FIRST TIME, when you create a user, after that you will only use the -m option.

5. 下面这一步好象不建议做, 因为会生成嵌套的repository
Move to the folder, where you want to keep your repositories and create your first repository:

cd /svnsudo svnadmin create test_repo

6. Make sure you set the permissions of the /svn directory to apache with the following command:

sudo chown -R www-data:www-data /svn

7. Restart the apache2 service:

sudo /etc/init.d/apache2 restart
 
[ 打印 ]
阅读 ()评论 (0)
评论
目前还没有任何评论
登录后才可评论.