Example of building a SVN server using Centos

Source: Internet
Author: User
Tags mkdir svn centos

1. Install subversion:

The code is as follows: Copy code

# Yum install subversion

Check whether the installation is successful:

The code is as follows: Copy code


# Svnserve -- version

II. Create a SVN database

 

The code is as follows: Copy code

# Mkdir/home/svn

# Svnadmin create/home/svn/project_1

For the sake of standardization, it is generally created in the project directory:

The code is as follows: Copy code


# Mkdir-p/home/svn/projec_1/trunk

# Mkdir-p/home/svn/projec_1/tags

# Mkdir-p/home/svn/projec_1/branches

III. Configuration

Go to the conf folder generated above and configure the following files: authz, passwd, and svnserve. conf.
Among them, authz is permission control, which users can access which directories, passwd is used to set users and passwords, and svnserve is used to set svn-related operations.

2.1 set passwd first
   

The code is as follows: Copy code
[Users]
# Harry = harryssecret
# Sally = sallyssecret
Hello = 123

UserName = password


In this way, the hello user and 123 password are created.
2.2 set the permission authz again

The code is as follows: Copy code

[/]
Hello = rw


This means that the hello user has read and write permissions on all directories, but it can also be limited.
If you use it on your own, read and write it directly.


2.3 finally set snvserv. conf

Anon-access = none # make unauthorized users inaccessible
Auth-access = write # grant the authorized user the write permission
Password-db = password
Authz-db = authz # access control file
Realm =/opt/svn/repos # authenticate the namespace. The subversion is displayed in the authentication prompt and serves as the key word cached by the credential.
Use the default configuration. The above statements must be written in the top level, and no space is left. Otherwise, an error will occur.
Now, with the above configuration, you can use svn.


4. Start the SVN service

 

The code is as follows: Copy code
Svnserve-d-r/home/svn/

V. Use SVN

After the instance is started successfully, it can be used.
TortoiseSVN is recommended, and the connection address is svn: // ServerIp/project_1 (if the specified Port needs to be added: port number)

6. Stop the SVN service

# Killall svnserve

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.