How To: subversion SVN with Apache2 and DAV
2010-08-02 18:57
253 查看
You can get a pdf edition of this article from here
Subversion is an application used for version control, it is meant to become a replacement of CVS Concurrent Versions System. Subversion is also known as svn.
This how-to will show how to setup svn repositories accessible throught http by using apache2 and the DAV module.
This tutorial is splitted in 4 parts: install neccessary packages, create the repository structure, configure apache and create the first repository.
Neccessary packages:
First of all we need to install the required packages:
apt-get install subversion libapache2-svn
Repository structure:
The projects are going to be hosted on /var/svn/repository. We need to create to directories and give full permission to the apache user:
mkdir /var/svn
mkdir /var/svn/repository
Now that the directory exist, we need to give write access to the apache user:
chown www-data:www-data -R /var/svn/repository
chmod 770 -R /var/svn/repository
Configuring Apache:
Now, we need to modify apache svn module configuration file, edit /etc/apache2/mods-available/dav_svn.conf and make sure the following argument are properly setted up:
In order to be able to track who modify the different files of the project, we need to create users. Create the first user (tester) and supply a password:
htpasswd -c /etc/apache2/dav_svn.passwd tester
Creating a first repository:
Get apache user access (so files and directories are created with proper rights:
su www-data
and create your first repository (example):
svnadmin create /var/svn/repository/example
import your project:
svn import /path/to/projectexample file:///var/svn/repository/example/examplev1 -m"initial import"
Now, get back to root user (Ctrl-D) and restart apache:
/etc/init.d/apache2 restart
Your project is now avalaible to the different user you will add in /etc/apache2/dav_svn.passwd .
User tester can now access the project at http://svnhostaddress/example and checkout a first copy to his computer, modify files and commit back his changes to the server
Subversion is an application used for version control, it is meant to become a replacement of CVS Concurrent Versions System. Subversion is also known as svn.
This how-to will show how to setup svn repositories accessible throught http by using apache2 and the DAV module.
This tutorial is splitted in 4 parts: install neccessary packages, create the repository structure, configure apache and create the first repository.
Neccessary packages:
First of all we need to install the required packages:
apt-get install subversion libapache2-svn
Repository structure:
The projects are going to be hosted on /var/svn/repository. We need to create to directories and give full permission to the apache user:
mkdir /var/svn
mkdir /var/svn/repository
Now that the directory exist, we need to give write access to the apache user:
chown www-data:www-data -R /var/svn/repository
chmod 770 -R /var/svn/repository
Configuring Apache:
Now, we need to modify apache svn module configuration file, edit /etc/apache2/mods-available/dav_svn.conf and make sure the following argument are properly setted up:
... SVNParentPath /var/svn/repository #SVNPath /var/svn/repository ..... AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user ... |
htpasswd -c /etc/apache2/dav_svn.passwd tester
Creating a first repository:
Get apache user access (so files and directories are created with proper rights:
su www-data
and create your first repository (example):
svnadmin create /var/svn/repository/example
import your project:
svn import /path/to/projectexample file:///var/svn/repository/example/examplev1 -m"initial import"
Now, get back to root user (Ctrl-D) and restart apache:
/etc/init.d/apache2 restart
Your project is now avalaible to the different user you will add in /etc/apache2/dav_svn.passwd .
User tester can now access the project at http://svnhostaddress/example and checkout a first copy to his computer, modify files and commit back his changes to the server
相关文章推荐
- How To: subversion SVN with Apache2 and DAV
- HOWTO Apache2 with subversion SVN and DAV
- Hack Attack: Using Subversion with TortoiseSVN
- Setting up and running Subversion and Tortoise SVN with Visual Studio and .NET
- org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the
- Ubuntu 之旅(六)安装subversion(svn)+apache2
- org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the
- How to set-up CI environment with Jenkins + Subversion+Maven (SVN)
- how to install subversion(svn) with eclipse on windows
- Mac 操作系统安装 SVN 服务器教程(Subversion With Mac OS X Tutorial)
- Mac 操作系统安装 SVN server教程(Subversion With Mac OS X Tutorial)
- how to Use Subversion with TortoiseSVN
- Setting up and running Subversion and Tortoise SVN with Visual Studio and .NET
- org.tigris.subversion.javahl.ClientException: svn: This client is too old to work with working cop
- 在 Windows 上安装 SVN Subversion 服务端
- org.apache.subversion.javahl.ClientException: svn: E175002: Commit failed 的解决办法
- SVN (subversion) 简明实用课程
- 如何创建svn(Subversion)服务器
- Subversion(SVN)的安装配置服务器
- ANT集成SVNANT访问SVN(Subversion)