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