This is a multi-package installation guide with instructions for Installing Subversion on Debian 4, running Apache2.
- At the Debian GNU/Linux w/ KDE Welcome Screen, chose the “Menu” option in the lower left part of the screen.
- In the Menu chose the “Console Login” option. (You Can also simply click ALT+N from the Debian GNU/Linux w/ KDE Welcome Screen, in place of the first two steps in this section. This is a shortcut to the Console or “CONSOLE MODE”.)
- At the Login prompt type: “root” and hit the [enter] key.
- Type in the Password of the “root” user and hit the [enter] key. You would have set this password up during installation. See our Installing Debian 4 on a PC guide.
- Then you will type the following code:
test:~# apt-get update
then press the [enter] key. This will download the latest, most up to date installation packages. Do not try to continue until it has completed the package header downloads.
- Once all the package headers have been downloaded, type:
test:~# apt-get install libapache2-svn subversion subversion-tools
then press the [enter] key. You will be asked if you want to continue. Press “y” and then press the [enter] key to continue. This will install the necessary Subversion files. Let this process complete and it will take you back to the # Command Prompt.
test:~# cd /home/
then press the [enter] key.
test:~# mkdir svn
then press the [enter] key. This will create the “svn” directory in the “home” directory and take you back to the # Command Prompt.
test:~# chown www-data svn
then press the [enter] key. This sets the system user www-data as the owner of the /svn/ directory.
test:~# su www-data –c “svnadmin create svn/src”
then press the [enter] key. Your repository will live in /home/svn/src. (Please Note! If you let your users run things as www-data (eg. they can install CGI applications) they will be able to write to your repository!)
then press the [enter] key.
test:~# pico /etc/apache2/sites-available/ssl
then press the [enter] key. This will launch the PICO NANO editor, to add information to the file.
- The very bottom of the file should now read:
AuthName "My Subversion Repository"
#<limitexcept GET PROPFIND OPTIONS REPORT>
# Require valid-user
- Once you have made the necessary edits to the ssl file, hold down the CTRL key and press the “X” key. This will ask you if you want to save the file. Press the “Y” key.
- You will then be prompted to enter a path to save the file. Leave the default path and file in place and hit the [enter] key. You will be returned to the # Command Prompt.
test:~# /etc/init.d/apache2 restart
then hit the [enter] key. This will restart the Apache2 server, and enforce the new modifications you just made.
Portions of this guide was taken from an article available online here.
Congratulations, you now have Subversion running on your Debian web server! (However, in order to get Subversion to correctly monitor and display version information about your Web Site, you will have to configure Subversion first. You may want to refer to the article listed above for that information.