Directory 1 Overview... 32 install Ubuntu8.10 server... 33 install Apache server... 34 create SVN server... 34.1 & n
Contents
1 Overview... 3
2 install the Ubuntu 8.10 server... 3
3 install the Apache server... 3
4. Create an SVN server... 3
4.1 install SVN... 3
4.2 Add group... 4
4.3 create an SVN repository... 4
4.4 configure the Apache server... 4
5. Configure SSL. 6
6. remotely modify the svn user password... 10
6.1 modify the configuration file of Apache2... 10
6.2 install mod_perl default package... 10
6.3 related configuration... 10
6.4 obtain the Perl script for password modification... 11
6.5 modify the script execution permission... 11
7. Set SVN permissions... 12
7.1 modify Apache configuration... 12
7.2 authentication file configuration... 13
8 references... 14
Appendix A: How to remotely modify SVN User Password tools... 14
Appendix B: Ubuntu 8.10 IP address modification... 15
Appendix C: configure the SSH service in Ubuntu... 15
1 Overview
This article describes in detail how to build the SVN server in the SVN + Apache + SSL architecture in the Ubuntu environment. Access the SVN server through https and use Apache-based user authentication management. The user's permissions are configured using authz.
2. Install the Ubuntu 8.10 Server
It can be Ubuntu 8.10 Server or Desktop. During the installation process, create a system account with the username "administrator" as the daily management account of the server. In addition, to facilitate subsequent instructions, assume that the IP address of the server is 192.168.19.3.
After the installation is complete, run the update manager to obtain the latest source list.
3. Install the Apache server
In the new software package manager, search for apache2 and choose to install Apache2, libapache2-svn. After the installation is complete, make sure you can access http: // 192.168.19.3 through http. Normally, the following page is displayed:
It indicates that apache is working properly.
4. Create an SVN Server
4.1 install SVN
In the new software package manager, search for subversion and choose to install subversion and subversion-tools. After installation, go to the next step.
4.2 Add a group.
The method is as follows:
L choose system> System Management> users and groups from the Ubuntu menu ";
L switch to the "Group" label;
L click "add group;
L group name: "subversion ";
L add yourself (administrator) and "www-data" (Apache user) to the group members;
L click "OK" to confirm the modification and close the program.
Or directly use the command to add groups and Members:
Sudo addgroup subversion
Sudo usermod-G subversion-a www-data administrator
Of course, you can also modify the group file sudo vi/etc/group directly.
Then you need to log out (I have restarted all of them) and log on again to become a member of the subversion group.
4.3 create an SVN Repository
Run the following command:
# Cd/home
# Sudo mkdir svn
#/Usr/local/svn # sudo chown-R www-data: subversion svn
#/Usr/local/svn # sudo chmod-R g + rws svn
The last command grants the group members the corresponding permissions on all files added to the file warehouse.
The following command is used to create an SVN File Repository:
# Sudo svnadmin create/home/svn
4.4 configure the Apache server
Back up the configuration file of Apache2 and execute the following command:
#/Usr/local/svn # sudo cp-R/etc/apache2/etc/apache2_bak
To access the SVN File Repository through the WebDAV protocol, you must configure your Apache 2 Web server. You must add the following code snippet to your/etc/apache2/mod-available/dav_svn.conf file: (add it to the end of the file)
DAV svn
SVNPath/home/svn
AuthType Basic
AuthName "welcome to subversion repository"
AuthUserFile/etc/subversion/passwd
#
Require valid-user
#
If you need to verify the user password every time you log on And Comment out the two lines.
When you add the preceding content, you must restart the Apache 2 Web server. Enter the following command:
Sudo/etc/init. d/apache2 restart
Next, you need to create the/etc/subversion/passwd file, which contains the details of user authorization. To add a user, run the following command:
Sudo htpasswd-c/etc/subversion/passwd superman
It will prompt you to enter the password. When you enter the password, the user will be created. You can use the following command to access the File Repository:
You can create other users, but you cannot use the-c option, because the-c option indicates creating a new user authorization file, the original authorization file is overwritten.
Sudo htpasswd/etc/subversion/passwd user_name
In this case, you can access the svn server through the web. Enter http: // 192.168.19.3/svn/in the address bar of the browser to display the user verification window:
After entering the correct user name and password, you can see the following interface: