1. Installation
CentOS (I use CentOS7) under the Yum command to complete the installation easily
To test whether the installation was successful:
2. Build the Repository
Create SVN Data directory (Subversion defaults to/VAR/SVN as the root of the data, boot start by default is also from here):
To create a repository:
If you delete a repository:
3. Configure the SVN configuration file
After each repository is created, the svnserve.conf primary profile will be generated. Edit it:
Editing examples:
[General]
Anon-access = None #控制非鉴权用户访问版本库的权限
auth-access = Write #控制鉴权用户访问版本库的权限
Password-db = passwd #指定用户名口令文件名
authz-db = Authz #指定权限配置文件名
Realm = Wangwa #指定版本库的认证域, which is the authentication domain name that is prompted at login
4. Edit SVN user profile
[Users]
admin = admin #用户, password
FUHD = FUHD #用户, password
Test = Test #用户, password
5. Edit the SVN privilege control configuration file
Editing examples:
[Groups]
admin = Admin #admin为用户组, admin for user after equals sign
Test = Fuhd,test
[wangwa:/] #表示根目录 (/var/svn/wangwa), Wangwa: The realm that corresponds to the previous configuration = Wangwa
@admin = RW # indicates that the admin group has read and write permissions to the root directory, R is read, W is write
[Wangwa:/test] #表示test目录 (/var/svn/wangwa/test)
@test = RW #表示test组对test目录有读写权限
6. Start, view and stop SVN services
To start the SVN service:
Check out the SVN service:
7. Configure Firewall ports
First, make clear that the default firewall for CentOS7 is FIREWALLD. The default port for subversion is 3690, and if not opened, an error is added:
8. Set Boot up
In Centos7, set boot up:
#注意: The root directory must be/VAR/SVN so that it can be set successfully!!
#设置开机启动后就可以按下面的方式开启或停止服务了
Save exit, restart, and test from the client. If you report such a mistake: Svn:E204900:Can ' t open file '/var/svn/wangwa/format ': Permission denied error. That is the relationship with SELinux, at present I am not very likely to use SELinux, then the selinux shut down, back to learn, back to change this paragraph!!!! :
Temporary shutdown:
$ sudo setenforce 0
Permanently closed:
$ sudo vim/etc/sysconfig/selinux
Modify:
SELINUX = disable #值修改为disable.
Install SVN service under Linux (CENTOS7)