CentOS installation Configuration svn, and configure SVN to automatically update the web directory

Source: Internet
Author: User
Tags svn centos

If you want to uninstall the previous version:
Yum Remove Subversion


First, install the necessary packages

$ yum Install Subversion 
$ yum Install MOD_DAV_SVN



Two, basic SVN server configuration
1, create a new directory to store all SVN files

  # MKDIR/HOME/SVN


2, create a new version of the warehouse
# svnadmin Create/home/svn/test


3, add an entry for the user to add the form "Username=password" in the/home/svn/test/conf/passwd file.

[Users]
admin = 123456
user1  = 123456




4, modify user access policy/home/svn/test/conf/authz record the user's access policy:
[Groups]
[test:/]
admin = rw
user1 = r



The above indicates that admin has all read and write permissions to the test project, User1 read-only.

Explanation: [groups] is defined as a group that can be added to a lot of users under that group to, split,

But the user data must be defined in the/homd/svn/conf/pwd.conf,

[/] Represents a permission definition below the root directory

[repos1:/] Represents a permission definition under the warehouse

If you want to sub-item, use this rule analogy:

For example, [REPOS1:/AAA] represents the definition of the permission for the AAA project under the warehouse.

The @admin represents the user rights under the group Admin.

User1=r represents User1 permissions for this user.

Permission type: R,W,RW is read-only, written, read-write respectively. If it is user1= this empty situation means no.



5, modify the/home/svn/test/conf/svnserve.conf file for user and policy configuration to take effect. Svnserve.conf contents are as follows:

[General]
Anon-access = none
auth-access = Write
password-db = passwd
authz-db = Authz Realm
= Test



7, start the server

#service httpd Restart
# svnserve-d-R/HOME/SVN




Third, configure HTTP support for SVN server (you can see the code in the browser)

For detailed configuration please refer to http://www.blogjava.net/jasmine214--love/archive/2010/09/26/332989.html 1, modify httpd.conf, add content modification on SVN server/   Etc/httpd/conf/httpd.conf. 2, restart the httpd server

# Service httpd Restart

3, access the http://192.168.1.5/test with the browser

Four, configure SVN auto update web directory First step: Create a Web site, export the site from the SVN server. 1. Enter the Site Directory




2. Export the site from the SVN server




3. View sites under the Web directory



Step Two: Automatically synchronize your Web site1. Enter the SVN version Library directory




2. Create Post-commit documents under hooks/directory




3. Write the BBS directory Update command in the Post-commit file

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.