Alibaba Cloud Centos7 installation and configuration of SVN

Alibaba Cloud Centos7 installation and configuration of SVN

1. Install SVN server

yum install subversion

2. Create an SVN version repository (can be created at will)

 //Create a SVN directory mkdir -p /svn/repos
 //Change the directory permissions to 777
chmod -R 777 repos
 //Create a SVN version repository first (first can be named arbitrarily)
svnadmin create /svn/repos/first

3. Next, we need to modify the three configuration files in this directory (there should be no space after the key value)

 //Enter the newly created version repository directory cd /svn/repos/first
//Configure the repository information, user file and password file paths, and repository path vi svnserve.conf 
//Set #anon-access = read
# auth-access = write
# password-db = passwd
//These four lines, remove the # and space in front of them // and change them to none
anon-access = none
auth-access = write
password-db = passwd
//Change to your own version library realm = first
//Save and exit (2)vi authz //file, create permissions for svn group and group user [groups]
 //Create a group called first and specify two users: ddl and shl
first = ddl,shl
//Set permissions for the root directory[/]
//The first group user permissions are read and write @first = rw
//Other users only have read permission* = r
//Save and exit (3) vi passwd //Create or modify user password [users]
//The password of the user named gep is 123456
ddl = 123456
//. . .
shl = 123456
//Save and exit

4. Then set up automatic startup

vi /etc/rc.local

Open the autostart file, the file content is as follows

#!/bin/sh
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
// Add the following line svnserve -d -r /usr/local/svnRepo/first
//Save and exit

Find all processes started by svn

ps aux |grep 'svn'

Kill and then start svn

Start svn (you can put this in the /etc/local/rc.local file to start it automatically at boot)

svnserve -d -r /usr/local/svnRepo/first

SVN repository startup method, now there are two repositories under svnRepo: first and test

1: Start with a single repository

svnserve -d -r /usr/local/repos/first

2: Multi-version repository startup

svnserve -d -r /usr/local/repos

The difference lies in the directory specified by the startup parameter -r in the command when starting svn.

4. Limit different users' access to different repository operations, and modify the authz file in the conf directory of the repository (no spaces after the key value)

Take the configuration of the first version library as an example

vi authz
[groups]
company = user1,user2
[first:/] //Specify the permissions for the repository and directory @company = rw //Company group users have read and write permissions * = r //Other users only have read permissions //Save and exit vi passwd //Set the account and password for users in the group [users]
user1 = 123456
user2 = 123456

5. Client Access

Assume the client uses tortoiseSVN

Open the repository browser and enter the address, svn://your svn server ip:3690

Enter username ddl password 12345

Because there is no network resource library to store files, you need to use the client right click [create forder], then [add forder]

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Installation and configuration of mysql 8.0.15 under Centos7
  • Centos7.4 server installation of apache and solutions to problems encountered during the installation process
  • Tutorial on installing lamp-php7.0 in Centos7.4 environment
  • Centos7.5 configuration java environment installation tomcat explanation
  • The best way to start a jar package project under Centos7 server
  • How to add custom system services to CentOS7 systemd
  • How to add Nginx to system services in CentOS7
  • Detailed explanation of the basic use of centos7 firewall in linux
  • Detailed explanation of Nginx installation, SSL configuration and common commands under Centos7.x
  • CentOS 7 switching boot kernel and switching boot mode explanation

<<:  Detailed explanation of the example of exporting data from a specified table in MySQL

>>:  AsyncHooks asynchronous life cycle in Node8

Recommend

Solve the docker.socket permission problem of vscode docker plugin

Solution: Kill all .vscode related processes in t...

JavaScript Factory Pattern Explained

Table of contents Simple Factory Factory Method S...

Detailed explanation of efficient MySQL paging

Preface Usually, a "paging" strategy is...

How to implement Vue binding class and binding inline style

Table of contents Binding Class Binding inline st...

Can CSS be used like this? The art of whimsical gradients

In the previous article - The charm of one line o...

Tutorial on installing MySQL 5.6 on CentOS 6.5

1. Download the RPM package corresponding to Linu...

Detailed explanation of the use of umask under Linux

I recently started learning Linux. After reading ...

Example code comparing different syntax formats of vue3

The default template method is similar to vue2, u...

Web page custom selection box Select

Everyone may be familiar with the select drop-dow...