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:
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:
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:
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
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
device will also start listening on port 3690, as shown below:
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
language package is as follows:
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:
After the installation is complete, right-click to see the following options:
We click SVN Checkout to enter the following configuration page:
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:
After the input is completed, we click OK, and the following page will appear:
At this time, the desktop will also appear A directory called web1 with some configuration files from our SVN directory, like this: With
that, our SVN should be configured and working!
Originality is not easy, please indicate the source for reprinting: https://blog.csdn.net/weixin_40228200