Install and configure svn-Apache-Windows (tested)

Source: Internet
Author: User

Introduction

This document describes how to install Apache, SVN, how to combine them, how to configure multiple libraries, and how to create user accounts. This document is provided by the svn club and compiled by Arain.

 

Contact us

QQ group: 21765703

SVN Club website: http://www.svnclub.com

 

The software used, its version and download site

Tip:You can download the Code directly from the svn Club website or by using the following methods:

1. Apache: 2.2.14

Download Site:

Http://archive.apache.org/dist/httpd/binaries/win32/apache_2.2.14-win32-x86-openssl-0.9.8k.msi

2, subversion: 1.6.6

Download Site:

Http://subversion.tigris.org/servlets/ProjectDocumentList? Folderid = 91 & expandfolder = 91 & folderid = 74

Setup-Subversion-1.6.6.msi

 

Install Apache

1. Double-click the Apache installation file:Apache_2.2.14-win32-x86-openssl-0.9.8k.msiInstall the SDK until the following dialog box is displayed. Fill in the relevant information and press "Next ".

2. It is not difficult to complete the installation. However, you may not be able to start the HTTPd service directly (usually because port 80 is occupied by other applications ). In this case, do not worry. navigate to the Apache installation path. Here I use a default installation path:

C: \ Program Files \ apache softwarefoundation \ apache2.2 \ conf

Then edit the configuration file httpd. conf as follows.

...

Serverroot "C:/program files/Apache softwarefoundation/apache2.2"

 

#

# Listen: allows you to bind Apache to specific IP addresses and/or

# Ports, instead of the default. See also the <virtualhost>

# Directive.

#

# Change this to listen on specific IP addresses as shown below

# Prevent Apache from glomming onto all bound IP addresses.

#

# Listen12.34.56.78: 80

Listen 8888.

#

# Dynamic shared object (DSO) Support

#

# Tobe able to use the functionality of a module which was built as a DSO you

# Have To place corresponding 'loadmodule' lines atthis location so

# Directives contained in it are actually available _ before _ they are used.

# Statically compiled modules (those listed by 'httpd-l') do not need

...

 

The default listening item of Apache is port 80. Here I change it to port 8888. Then manually start the HTTPd service (my computer-management-services and applications-services-apache2.2 ).

 

In this case, try to access: http: // localhost: 8888/in the local browser. If the following interface appears, it means you have succeeded! What a great thing you have done!

Install Subversion

1. Double-click the svn installation file:Setup-Subversion-1.6.6.msi,You can complete all installation without any operation.

2. add the bin folder path of SVN to the environment variable so that aapche can find all relevant files and use SVN commands anywhere on the computer, the bin folder path here is :. If you do not add environment variables, follow these steps:

A. CLICK: My computer; properties; level; environment variable; System variable; Path (double-click to edit); variable value

B. Add the following in the PATH variable value:C: \ Program Files \ subversion \ bin.Note that you must add a semicolon before and after. (I put it at the end without a semicolon)


C. Add environment variables to the bin path of Apache. The bin path here is: C: \ Program Files \ apache softwarefoundation \ apache2.2 \ bin.

D. Restart your computer. Some strange problems may occur if you do not restart your computer.

 

Combined with Apache and SVN

1. Copy two SVN modules (mod_authz_svn.so, mod_dav_svn.so) from the bin directory of SVN to the modules directory of Apache.

SVN bin directory:

C: \ Program Files \ subversion \ bin

Apache modules directory:

C: \ Program Files \ Apache Software Foundation \ apache2.2 \ modules

2. Modify the Apache configuration file: httpd. conf (C: \ Program Files \ Apache Software Foundation \ apache2.2 \ conf). Pay attention to the bold font part, and add the last location part to the end.

 ...

# Dynamic shared object (DSO) Support

#

# To be able to use the functionality of a modulewhich was built as a DSO you

# Have To place corresponding 'loadmodule' lines atthis location so

# Directives contained in it are actually available_before _ they are used.

# Statically compiled modules (those listed by 'httpd-l') do not need

# To be loaded here.

#

# Example:

# Loadmodule foo_module modules/mod_foo.so

#

Loadmodule actions_modulemodules/mod_actions.so

Loadmodule alias_module modules/mod_alias.so

Loadmodule asis_module modules/mod_asis.so

Loadmodule auth_basic_module modules/mod_auth_basic.so

# Loadmodule auth_digest_modulemodules/mod_auth_digest.so

# Loadmodule authn_alias_modulemodules/mod_authn_alias.so

# Loadmodule authn_anon_modulemodules/mod_authn_anon.so

# Loadmodule authn_dbd_module modules/mod_authn_dbd.so

# Loadmodule authn_dbm_module modules/mod_authn_dbm.so

Loadmodule authn_default_modulemodules/mod_authn_default.so

Loadmodule authn_file_module modules/mod_authn_file.so

# Loadmodule authnz_ldap_modulemodules/mod_authnz_ldap.so

# Loadmodule authz_dbm_module modules/mod_authz_dbm.so

Loadmodule authz_default_modulemodules/mod_authz_default.so

Loadmodule authz_groupfile_modulemodules/mod_authz_groupfile.so

Loadmodule authz_host_module modules/mod_authz_host.so

# Loadmodule authz_owner_modulemodules/mod_authz_owner.so

Loadmodule authz_user_module modules/mod_authz_user.so

Loadmodule autoindex_module modules/mod_autoindex.so

# Loadmodule cache_module modules/mod_cache.so

# Loadmodule cern_meta_module modules/mod_cern_meta.so

Loadmodule cgi_module modules/mod_cgi.so

# Loadmodule charset_lite_module modules/mod_charset_lite.so

Loadmodule dav_module modules/mod_dav.so

Loadmodule dav_fs_module modules/mod_dav_fs.so

# Loadmodule dav_lock_module modules/mod_dav_lock.so

# Loadmodule dbd_module modules/mod_dbd.so

# Loadmodule deflate_module modules/mod_deflate.so

Loadmodule dir_module modules/mod_dir.so

# Loadmodule disk_cache_modulemodules/mod_disk_cache.so

# Loadmodule dumpio_module modules/mod_dumpio.so

Loadmodule env_module modules/mod_env.so

# Loadmodule expires_module modules/mod_expires.so

# Loadmodule ext_filter_module modules/mod_ext_filter.so

# Loadmodule file_cache_modulemodules/mod_file_cache.so

# Loadmodule filter_module modules/mod_filter.so

# Loadmodule headers_module modules/mod_headers.so

# Loadmodule ident_module modules/mod_ident.so

# Loadmodule imagemap_module modules/mod_imagemap.so

Loadmodule include_module modules/mod_include.so

# Loadmodule info_module modules/mod_info.so

Loadmodule isapi_module modules/mod_isapi.so

# Loadmodule ldap_module modules/mod_ldap.so

# Loadmodule logio_module modules/mod_logio.so

Loadmodule log_config_module modules/mod_log_config.so

# Loadmodule log_forensic_modulemodules/mod_log_forensic.so

# Loadmodule mem_cache_module modules/mod_mem_cache.so

Loadmodule mime_module modules/mod_mime.so

# Loadmodule mime_magic_module modules/mod_mime_magic.so

Loadmodule negotiation_modulemodules/mod_negotiation.so

# Loadmodule proxy_module modules/mod_proxy.so

# Loadmodule proxy_ajp_module modules/mod_proxy_ajp.so

# Loadmodule proxy_balancer_modulemodules/mod_proxy_balancer.so

# Loadmodule proxy_connect_modulemodules/mod_proxy_connect.so

# Loadmodule proxy_ftp_module modules/mod_proxy_ftp.so

# Loadmodule proxy_http_modulemodules/mod_proxy_http.so

# Loadmodule rewrite_module modules/mod_rewrite.so

Loadmodule setenvif_module modules/mod_setenvif.so

# Loadmodule speling_module modules/mod_speling.so

# Loadmodule ssl_module modules/mod_ssl.so

# Loadmodule status_module modules/mod_status.so

# Loadmodule substitute_modulemodules/mod_substitute.so

# Loadmodule unique_id_module modules/mod_unique_id.so

# Loadmodule userdir_module modules/mod_userdir.so

# Loadmodule usertrack_module modules/mod_usertrack.so

# Loadmodule version_module modules/mod_version.so

# Loadmodule vhost_alias_modulemodules/mod_vhost_alias.so

Loadmodule dav_svn_module modules/mod_dav_svn.so

Loadmodule authz_svn_module modules/mod_authz_svn.so

 

<Ifmodule! Mpm_netware_module>

<Ifmodule! Mpm_winnt_module>

...

<Location/SVN/>

Dav SVN

Svnparentpath "C:/SVN/repository"

Authtype basic

Authname "icil SVN"

Svnlistparentpath on

Authuserfile "C:/SVN/userfile.txt"

Authzsvnaccessfile "C:/SVN/accessfile.txt"

Require valid-user

</Location>

Redirectmatch ^ (/SVN) $1/

 
Note:

Svnparentpath -- SVN's database root directory (manually created) path. You can create multiple version libraries below;

Authuserfile--------user account information file (create userfile.txt with htpasswdcommand );

Authzsvnaccessfile -- permission control file (manually created)

Redirectmatch ^ (/SVN) $1/----------- redirect path (/SVN ing to/SVN/). In this way, you can access the library list through http: // ip: Port/SVN

3. Create the SVN version library. Use the svnadmin command to create a library. You will find a myproject folder added in C:/SVN/Repository

Note: you must first navigate to svnparentpath: C:/SVN/Repository and then run this command.


4. Create an SVN user account file. In the Apache configuration file, we set the authuserfile path: C:/SVN/userfile.txt. Now, in the doscommand line, navigate to the folder: C:/SVN/run the command:Htpasswd-C userfile.txt UsernameCreate a user account file and an initial account.

Note: The-C parameter indicates creating a user account file. This parameter is not required when you create another account next time.

5. Create a permission control file. In the configuration file, we set the authzsvnaccessfile path:C:/SVN/accessfile.txtNow, manually create the text file and enter the following content:

[/]

* = R

[Test:/]

Arain = RW

Jacky = RW

Restart the apache service. If you do not know how to restart the service, see the Apache installation section.

Then, access the svn repository http: // localhost: 8888/SVN/myproject in the browser. If you see the content, it means you have succeeded! Congratulations!

 

Related Article

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.