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

How to use union all in MySQL to get the union sort

Sometimes in a project, due to some irreversible ...

Should the Like function use MySQL or Redis?

Table of contents 1. Common mistakes made by begi...

Nginx domain forwarding usage scenario code example

Scenario 1: Due to server restrictions, only one ...

A brief comparison of Props in React

Table of contents Props comparison of class compo...

Vue+Openlayer realizes the dragging and rotation deformation effect of graphics

Table of contents Preface Related Materials Achie...

It's the end of the year, is your MySQL password safe?

Preface: It’s the end of the year, isn’t it time ...

Detailed explanation of HTML tables

Function: data display, table application scenari...

Analysis and Solution of ERROR:2002 Reported When MySQL Starts

Preface This article mainly introduces the analys...

JavaScript Canvas draws dynamic wireframe effect

This article shares the specific code of JavaScri...

What to do if you forget your mysql password

Forgot your MySQL password twice? At first I did ...

React mouse multi-selection function configuration method

Generally, lists have selection functions, and si...

What kinds of MYSQL connection queries do you know?

Preface If the query information comes from multi...

Summary of MySQL view principles and usage examples

This article summarizes the principles and usage ...

Summary of the use of vue Watch and Computed

Table of contents 01. Listener watch (1) Function...