[SVN] The process of SVN building an ubuntu server (graphics and texts are super detailed)

Table of contents

Step 0: Build the environment:

Step 1: Download the subversion installation package

Step 2: Create a repository directory

Step 3: Create a repository

Step 4: Modify the SVN configuration

Step 5: Restart the SVN service


Step 0: Build the environment:

The svn server is set up in the ubuntu system, and the windows system is used as the client to upload files with the svn client.

This article only talks about the construction of the svn server under ubuntu, windows uses the svn client to upload and download files, see the next blog

Step 1: Download the subversion installation package

1) Instruction: sudo apt-get install subversion  

(The picture is a prompt that has been installed)

2) You can also use the command to view the installed subversion version:

svn --version

Step 2: Create a repository directory

        This is only a directory to provide a storage location for creating a version library later. By default, subversion uses /var/svn as the data root directory, and it starts from here by default.

        Because the /usr directory is used to store applications, library files and documents for ordinary users, the SVN library is placed under /usr

1) Create the repository directory svn with the command:

cd usr

sudo mkdir svn (Note, sudo permissions are required here)

Step 3: Create a repository

1) Create a version library based on the established path, such as C6

2) command:

cd /usr/svn

sudo svnadmin create C6

At this point, you can see that there are some default files or folders under the newly created C6 version library: conf \db\format\hooks\locks\README.txt

Step 4: Modify the SVN configuration

1) Enter the conf directory and view the configuration files that need to be modified

 cd /usr/svn/C6/conf

 ls

 

configuration file:

authz: ​​permission configuration file, control read and write permissions

passwd: account password configuration file

svnserve.conf: svn server configuration file

2) Modify the svnserve.conf file

Command: sudo vim svnserve.conf

The content of the original file is commented out, we only need to remove the comment before the specified content, as follows:

[general]

anon-access = read 【Control the permission of non-authenticated users to access the repository】

auth-access = write [Control the authority of the authenticated user to access the repository]

password-db = passwd [Specify the user name and password file name, that is, you must enter the user name and password when accessing]

authz-db = authz

realm = /MyBackup/svn/MyBackups [Specify the authentication domain of the version library, that is, the name of the authentication domain prompted when logging in, and change it to your own version library]

Original file:

Remove the comment symbol (#) and save after modification (wq save):

3) Modify the passwd file, add account and password (required for checkout in windows)

 sudo vim passwd

 

Add two accounts here: mamengguo and wangyunuo, both passwords are 123456

4) Modify the authz file

 sudo vim authz

Set the user's read and write permissions in the root directory (note that the / root directory symbol should not be reversed here)

Step 5: Restart the SVN service

1) At this point, the configuration has been completed, and the account information has been added successfully

When changing svnserver.conf, you need to restart the SVN service to take effect. When changing the authz and passwd files, you don’t need to restart the service.

2) Restart the SVN service command:

sudo svnserve -d -r /usr/svn/

3) Check the SVN service status command:

ps aux|grab svnserve

4) Kill the SVN process command:

sudo killall svnserve

So far, the SVN server has been configured 

related information:

1) Download and installation of SVN client (very detailed graphics and text)

2) The windows client connects to the SVN server under ubuntu and uploads and downloads files

--END--

Guess you like

Origin blog.csdn.net/qq_41539778/article/details/131046078
svn