Build your project with SVN on CentOS

Source: Internet
Author: User
Tags svn update

The first step is to install the SVN server:

Yum install-y Subversion



The second step is to create the warehouse:

Svnadmin Create/var/svn/repo



The third step is to create the user name:

Cd/var/svn/repovim conf/passwd



Add a row (one row represents the user name = password): Huangyanxiong = Freax

The fourth step is to modify the repository's read and Write permissions:

Vim Conf/authz



Add the following code at the end:

[/]  #这个代表是仓库的根目录huangyanxiong = RW   #代表着该用户对整个仓库都是可读写的 r:read  w:write



Fifth Step Modify Svnserve

In the default profile CP conf/svnserve.conf  conf/svnserve.conf.bakvim/conf/svnserve.conf the 12,13,20,29,34 line minus the comment anon-access = Read   auth-access = write password-db = passwd authz-db = Authz Realm = My First Repository  #仓库的名称随便你写, it is recommended to use a meaningful

To start the SVN service:

Svnserve-d-r/var/svn/repo



Sixth step check out to Web root directory

SVN Co svn://127.0.0.1//VAR/WWW/HTML/SVN



The seventh step is to synchronize the submitted files to the Web root directory:

Vim conf/post-commit# adds the following content #!bin/shepos= "$" rev= "$" export LANG=ZH_CN. UTF-8      #字符集, consistent with the server, can perform the locale command to view svn update/var/www/html/svn  #将文件更新到web根目录echo ' date ', ' WhoAmI ', $REPOS, $REV >>/var/svn/repo/hooks/svn_hook.log  #记录时间日志chown-R apache/var/www/html/svn  #将网站目录文件更改属主, If you are updating with the root user, chgrp-r apache/var/www/html/svn #修改用户组



Step eighth restart the Svnserve service

You can then integrate with the editor (Phpstrom, etc.) or the client (TortoiseSVN)

Build your project with SVN on CentOS

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.