Deploy apache + svn in CentOS6.4

Source: Internet
Author: User

Deploy apache + svn in CentOS6.4

1. Experiment Topology

Svnserver (subversion): 192.168.1.126

Svnclient (TortoiseSVN) :( http://tortoisesvn.net/downloads.html)

2. Prepare the yum Source

#cd/etc/yum.repos.d/ #wgethttp://mirrors.163.com/.help/CentOS6-Base-163.repo

3. install the software package

#yuminstallhttpdhttpd-develmod_dav_svnsubversionmod_ssl

4. Check whether the svn module is installed.

#ls/etc/httpd/modules/|grepsvn mod_authz_svn.so mod_dav_svn.so #svn--version

5. Create a directory and initialize it.

#mkdir-p/data/svn/repo #cd/data/svn/repo # Svnadmincreatepeace // After the command is executed, multiple files are automatically created under the peacedirectory, in other words conf?db=format=hooks=locks=readme.txt. #chown-Rapache.apachepeace

6. Configure subversion. conf

Load the mod_dav_svn module. Generally, apache2 has loaded these two modules normally. apache needs to load the mod_dav_svn module. If apache is installed in accordance with the preset directory, the mod_dav_svn module should be installed in the modules subdirectory of the apache installation location (the default path is/etc/httpd. At the same time, the apache configuration file httpd. conf (default path: etc/httpd/conf/) has loaded this module using the LoadModule command (if not, manually add) note that this command must appear before other Subversion commands. The mod_authz_svn.so module is also loaded.

LoadModuledav_svn_modulemodules /mod_dav_svn .so LoadModuleauthz_svn_modulemodules /mod_authz_svn .so …… <Location /repos > DAVsvn # SVNParentPath/data/svn/repo // I will explain why this is not used later SVNPath /data/svn/repo/peace SVNListParentPathon AuthTypeBasic AuthName "AuthorizationRealm" AuthUserFile /data/svn/passwdfile AuthzSVNAccessFile /data/svn/accessfile Requirevalid-user < /Location >

7. Add User Password

# Htpasswd-c/data/svn/passwdfilepeace // create a user password. Use-c first and add the following #htpasswd/data/svn/passwdfiletest

8. Restart Apache

#servicehttpdrestart

9. Create a permission access control file to view the specific permissions:

123456789101112131415 #vi/data/svn/accessfile [/] *=rw [ groups ] dev=peace test = test [repos:/] @ test =r @dev=r [repos: /test ] @ test =rw *=

10. Start svn

#svnserver-d

11. Check the Client Login

Troubleshooting:

Youdon 'thavepermissiontoaccess/reposonthisserver (SVN)

Solution:

Change the content of subversion. conf SVNParentPath to SVNPath.

The content SVNParentPath is not changed to SVNPath.

Therefore, the above error will always occur when the archive is treated as the root directory.

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.