I finished installing my server, for my freelance with Subversion. And to be sure I will not forget how, I am writing what I did following the tutorial I found on the Internet.
1. Installing Ubuntu Server with no options to select LAMP or DNS Server
2. In my case, which has a 40GB HD in, divide the partitions as follows:
04GB, / usr
10GB, / srv
20GB, / home
The first item is the size of the partition and the second mount point. Apart from the swap partition, I am using EXT3 file system at all.
3. Installing Apache and SVN:
4. Create the directory where are the repositories of SVN:
sudo apt-get install apache2 subversion libapache2-svn
5. Create the repository. Here would be a good time to restore the backup, if applicable:
sudo mkdir / srv / svn
6. Apache to provide access to these directories:
sudo svnadmin create / srv / svn / repository ()
7. Configure the module from subversion webdav
sudo chown-R www-data: www-data / srv / svn
sudo vi / etc/apache2/mods-enabled/dav_svn.conf
- Uncomment the tag <Location /svn>. At the beginning and end of the file.
- Uncomment the option DAV svn
- Uncomment the option SVNParentPath / var / lib / svn and change the path to the location of the repository: / srv / svn. This was chosen instead of SVNPath to have more of a repository in the same folder.
- Uncomment the option AuthzSVNAccessFile / etc/apache2/dav_svn.authz. To enable you to control access to projects using the file information.
- Uncomment to enable the authentication, the three lines:
- AuthType Basic
- AuthName "Subversion Repository"
- AuthUserFile / etc/apache2/dav_svn.passwd
- Add the line: Require valid-user
- Save the file. To do this, press the ESC key type ": WQ" without the quotes and press enter
8. Create a user to acessr the SVN:
- sudo htpasswd-cm / etc/apache2/dav_svn.passwd <username>
- The parameter-c is only required for the first user, it is used to create the file. For the following addresses only the-m, which is used to encrypt the password with MD5.
9. Restart apache
sudo / etc/init.d/apache2 restart