Detailed explanation of CICD (5) - SVN installation and configuration

Today, I will continue to introduce the relevant knowledge of Linux operation and maintenance. The main content of this article is the installation and configuration of SVN.

1. SVN installation and library building

SVN can be installed using yum. The installation command is as follows:

yum install -y subversion

After the installation is complete, we create an SVN file directory. In this file directory, create an SVN library and execute the command:

mkdir -p /var/svn/
mkdir -p /var/svn/web1
svnadmin create /var/svn/web1

After the above command is executed, some SVN configuration files appear in this directory, as shown below:
insert image description here

2. SVN configuration

After completing the previous operation, we configure SVN, enter the conf directory, and find that there are three files, passwd, authz, and svnserver.conf. We first open the passwd file and configure the SVN username and password in it. We add two new users here and add the following content:

admin=admin
root=root

The modified configuration file is as follows:
insert image description here
After that, we open the authz file to authorize the previously configured user. Under the [groups] module, add the following content:

group1=admin,root

Then create a new [/] module and add the following content under the module:

@group1=rw
*=

Indicates that users of group1 have read and write permissions, while other users do not have any permissions. The modified configuration file is as follows:
insert image description here
Next, let's modify the svnserver.conf file. This file does not need to be changed much. You need to open anon-access, auth-access, password-db, authz-db and realm five. parameters. These five parameters indicate that anonymous users are allowed to read permissions, authenticated users are allowed to write permissions, the passwd file is specified as the username and password file, the authz file is specified as the permission authentication file, and the scope is specified. The file after the configuration is completed is as follows: After
insert image description here
the above configuration file is configured, then we can start SVN and execute the command:

svnserver -d -r /var/svn

After the execution is completed, the SVN process can be captured, and the result is as follows: The
insert image description here
device will also start listening on port 3690, as shown below:
insert image description here

3. SVN client installation

Next, let's install the SVN client. First, we can go to the SVN official website to download the SVN client installation package and the localization package. The SVN official website download URL is https://tortoisesvn.net/downloads.html , as shown below: The
insert image description here
language package is as follows:
insert image description here
We download the relevant After installing the client installation package and Chinese package, you can install it directly. The installation process can be done by default, as shown below:
insert image description here
After the installation is complete, right-click to see the following options:
insert image description here
We click SVN Checkout to enter the following configuration page:
insert image description here
We fill in svn://XXXX/web1 at the URL, where XXXX is the IP address of the SVN device, and web1 is the target directory created on the SVN, as shown in the figure above. After completion, click OK. At this time, the user name and password input box will pop up. We enter the user name and password we configured in the passwd file, as shown below:
insert image description here
After the input is completed, we click OK, and the following page will appear:
insert image description here
At this time, the desktop will also appear A directory called web1 with some configuration files from our SVN directory, like this: With
insert image description here
that, our SVN should be configured and working!
Originality is not easy, please indicate the source for reprinting: https://blog.csdn.net/weixin_40228200

Guess you like

Origin blog.csdn.net/weixin_40228200/article/details/123850474