Subversion configuration and installation

Source: Internet
Author: User
Tags net bug tortoisesvn

During this time, due to the need for version control, I wrote my own subversion configuration experience based on the online materials and problems encountered in the configuration.

 

1. Install Subversion

 

1) Preparations

1. Apache server program.Go to http://www.apache.org/to download Apache HTTP Server, my (apache_2.2.21-win32-x86-no_ssl.msi ).

2.SVN server programs. To http://subversion.tigris.org/servlets/ProjectDocumentList? Download the binary Installation File of subversion 1.1.3 on folderid = 91. Generally, tigris.org does not provide Binary packages. These Binary packages are maintained by volunteers, so they may not be the latest version. If you want to use the latest version of subversion, download the source code and compile it yourself.

3. tortoisesvn, Client program. Tortoisesvn is a tool that extends Windows Shell and can be seen as a plug-in for Windows resource manager. After installation, Windows can identify the working directory of subversion.
The official website isTortoisesvnThe download method is similar to that of the svn server.DownloadSelect the official version for Win2k/XP or higher version on the page, andDownload PageSelect the TortoiseSVN-1.6.7-svn-1.2.3.msi of the installation files for the current highest stable version. (Note: tortoisesvn has a version with a special bug fix for vs. Net runtime.Download PageAvailable: Special
Version for Win2k/XP or higher:(We provide no support for this !)Uses _ SVN folders instead of. SVN to work around the Vs. net bug with web projects. If you don't use web projects then please use the official version .)

4.Chinese Language Pack for tortoisesvnNote that the version must be the same as that of the client. You canDownloadLanguage on the page
Packs download

2) Start installation 1. Install the Apache server first.

Run the downloaded "apache_2.2.13-win32-x86-no_ssl.msi", the following interface appears:

On the Installation Wizard Page of Apache HTTP Server 2.2.13, click "Next" to continue,

 

Confirm to agree to the software installation license Ordinance, select "I accept the terms in the license agreement", and click "Next" to continue,

For instructions on installing Apache on windows, please read the instructions and press "Next" to continue

Set system information, enter your domain name (for example, lk.com) under the network domain, and enter your server name under the server name (for example, http://www.lk.com/, or add a domain name ), enter the contact email address (for example, lk@sina.com) of the system administrator under administrator's email address ),

 

Select the installation type, typical is the default installation, and custom is the User-Defined installation. Here we select Custom for more options. Press "Next" to continue

 

Select the installation option interface, click "Apache HTTP Server 2.0.55", and select "this feature, and all subfeatures, will be installed on local hard drive. ", that is," This part and its sub-parts are all installed on the local hard disk ". Click "change..." to manually specify the installation directory.

I chose to install it on "D: \" here. You have selected it by yourself. Generally, we recommend that you do not install it on the disk where the operating system is located, so that the operating system will not be damaged, the restore operation also clears the Apache configuration file. Select "OK" to continue.

Select "Next" until the following screen appears.

The Installation Wizard is successful. The following green icon should appear in the status bar in the lower right corner, indicating that the apache service has started running. Press "finish" to complete the installation of Apache Software.

After the installation is complete, go to the installation directory and find the httpd. config file under the conf directory, search for listen, and change 80 after listen to 9000 (or the desired port ),

TestThen restart the Apache server. You can use http: // localhost: 9000/to test whether the installation is correct.

 

2. Run the downloaded "Setup-Subversion-1.5.6.msi", all the way to the next step on the line

Use windwos Resource Manager to go To the Subversion installation directory (usually E: \ Program Files \ subversion), find the files/httpd/mod_dav_svn.so and mod_authz_svn.so, copy these files to the Apache Module Directory (usually E: \ Program Files \ Apache Software Foundation \ apache2.2 \ modules ).

 

Copy/bin/libdb *. dll and/bin/intl3_svn.dll from the Subversion installation directory to the bin directory of Apache (usually E: \ Program Files \ Apache Software Foundation \ apache2.2 \ bin ). 3. Run the downloaded "TortoiseSVN-1.6.5.16974-win32-svn-1.6.5.msi" and "LanguagePack_1.6.5.16974-win32-zh_CN.msi", all the way to the next step on the line

 

When installing tortoisesvn, follow the prompts to install tortoisesvn. After the installation is complete, a restart prompt will be prompted.

 

Modify httpd. conf and make the following changes:
Find the conf directory under the Apache installation directory, open httpd. conf in the text editor, and find the following two lines:

 

#LoadModule dav_module modules/mod_dav.so#LoadModule dav_fs_module modules/mod_dav_fs.so

Remove the annotator "#" before each line.

 

Note that in the Subversion/bin directory
Mod_authz_svn

Mod_dav_svn

Copy to the D: \ Program Files \ Apache Software Foundation \ apache2.2 \ modules directory (the Personal paths are different, but all are modules,

I have been entangled in this mistake for a long time, so I hope you will pay attention to it.

Then add several lines at the end of all loadmodule statements: (Change The following path to an absolute path, which has plagued me for a long time)

#SVNLoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so

In fact, after successful installation of SVN, the Apache server has been initially integrated with SVN.

Note that the following status bar is already Apache/2.2.13 svn1.5.6 Dav/2 Test:1. Create a version library. I will create a folder E: \ subversionfiles under drive F as the root directory of all version libraries. 2. Create a version library test1 in E: \ subversionfiles,
Run the command: svnadmin create E: \ subversionfiles \ test1
The directory structure is

3. Next, we must tell Apache the path of our resource library. You can use the location command to complete this setting. Because we do not want to set each project separately, we store all the projects in the same resource library directory. We can use the svnparentpath command to specify the path for storing all projects. Add the following configuration at the end of the httpd. conf file:

# SVN
<Location/SVN>
Dav SVN
Svnparentpath E: \ subversionfiles
</Location>

In this way, we can use http: // localhost: 9000/SVN/test1 to access

4. Add User Authentication: In the command line window, go to the directory where Apache is located and execute the following command instructions: create a user liuke input: htpasswd-c e: \ subversionfiles \ svn_auth_passwd liuke

Note: Use the-C parameter to create a passwd file output:

E: \ Program Files \ Apache Software Foundation \ apache2.2 \ bin> htpasswd-c e: \ subverionfiles \ svn_auth_passwd liuke
Automatically using MD5 format.
New Password :*****
Re-type new password :*****
Adding password for user liuke

When creating a user, the-C parameter is not used, but the-M parameter is used, because the file Svn_auth_passwdCreated. (Use-C to create the passwd file for the first time; use the-M command to add a user later; Use this command to change the user's password ); (the command htpasswd-D passwd svntest is used to delete the user (the command uses uppercase d). Next, we must tell the Apache server how to use the passwd file to open httpd. conf: locate the location configuration we just added and modify it as follows:

# SVN
<Location/SVN/>
Dav SVN
Svnparentpath "E:/subversionfiles"

# How to authenticate a user
Authtype basic
Authname "Subversion repository"
Authuserfile "E:/subversionfiles/svn_auth_passwd"

Authzsvnaccessfile "E:/subversionfiles/svn_auth_accessfile"


# Only Authenticated Users may access the Repository
Require valid-user

</Location>

Svn_auth_accessfile

*********************

[Groups]
Admin = liuke
Developers = user

# To allow everyone read access
# Allow all admin complete access
[/]
@ Admin = RW
@ Developers = r

[/Tools]
* = RW

*********************

Authentication

If a password is required for the version library to be connected, an authentication dialog box is displayed.

Figure 5.5. Authentication Dialog Box

Enter your username and password. The selection box allows tortoisesvn to be in the default path of subversion.$APPDATA\Subversion\authTo save the authentication information:

  • svn.simpleThe file contains the authentication information (User Name/password) required by the basic authentication method ).

  • svn.ssl.serverThe file contains the SSL server certificate.

  • svn.usernameThe file contains the authentication information for User Name authentication (no password is required ).

Each file corresponds to a server to be connected. Files are in plain text format. Therefore, you can use a text editor to view the server on which each file is applied. If you want subversion and tortoisesvn to forget the credential information of a server, you only need to delete the corresponding file of the server. The default path is "C: \ Documents ents and Settings \ Administrator \ Application Data \ subversion \ auth"

Restart the Apache HTTP Server and open it in a browser.
Http: // localhost: 9000/SVN/test1 you will see the login request dialog box, enter the user name and password you just set.
In this way, the integration of Apache and SVN is basically achieved.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.