How to install SVN server in Centos (detailed)

Source: Internet
Author: User
Tags commit diff mkdir svn centos iptables

Meaning of branch development:

Scenario 1: some customers want to customize the product, but we do not want to modify the trunk code in the original svn.
Scenario 2: We are developing tasks for the next stage of the product, but the work in the previous stage finds problems.
Take scenario 2 as an example. A tag, tag_mfcai_V1.01.00 and,
Then a new version is published based on the tag. If the project is a web project, a web package is published based on the tag.
Then trunk went into the next stage to continue development, but unfortunately the released version was detected and someone would propose to put the bug in the next stage. Assume that the task in the next stage is just starting and users cannot wait. They will think that it takes so long to solve a small bug and the efficiency is too low.
Then we need to create a branch based on tag_mfcai_V1.01.00, branch_bugfix_V1.01.00, and perform bugfix based on this branch,
When the bugfix ends, create a tag named tag_mfcai_V1.01.01. Then release a version based on the tag.
In this way, the development of trunk (main branch) is not affected. Then, determine whether branch_bugfix_V1.01.00 is incorporated into the trunk as needed.
How to use advanced Branch Technology

Next, we will introduce the knowledge of point tagging. After confirming that all the code of the project team members is commit.

1) right-click the directory to tag-> TortoiseSVN-> branch/tag

2) in the displayed dialog box, enter the target path of the branch or tag.

3) when creating a branch or tag, you have the latest version in the three option version libraries, the specified version in the version library, and a working copy.

Step 1

1: The Directory to which the branch will exist

2: comment on the branch (you can't lose it. There are more branches! It can be pulled in countless ways)

3: What are the meanings of the three descriptions?

1) Head revision in the repository-newly created directly from the version library, because you do not need to transfer data from your work copy, the creation process will be very fast.

2) Specific revision in repository -- it is also created from the version Library. The difference is that you can specify a version number. If you forget the version number, you can find the desired version number by displaying the version record (as shown below ). In this way, you do not need to transfer data from your work copy, and the creation process is fast.

3) Woking copy-this method will be based on the current version of the copy job (whether you have made local modifications or updated some of the files to a previous version) to create a branch copy. This method determines whether to transmit data from the work copy to the version library based on the version of each file in the work copy.

Here, we must first understand the key concept behind a merger.

Everything that happens during the merge process: first compare the two version library trees and then apply the differences to the local copy.

This command includes three parameters:

The initial version tree 2. The final version tree 3 receives a different copy of work.
After understanding these concepts, let's proceed.

In the displayed window, select the main line directory and its version number (the initial version tree), and then select the main line directory and the latest version number (the final version tree ), it can also be a version number, but it should be higher than the version number of the initial version tree. By default, the receiving area is the directory you right-click, and clientt is used here.

Before merging, you can click "Unified diff" to view the changes in the content of all files in the two version trees. "diff" displays the list of files that have changed, "dry run" displays the status information of a merge, but does not perform any merge operations.

Click "Merge ".
Here we choose to merge two different version trees.
Branches are merged to the Master line and the Master Line to merge content to the branch.
The difference is that
1. The first version Library is the version created by the branch.

2. The end version Library is the version after development.

3. The purpose of the application is the main line directory.
SVN server build-on-demand gift packs
SVN shut down the server killall svnserve
SVN enable the svnserve-d-r/SVN directory on the server
The entire process of agent construction
System environment
RHEL5.4 minimal installation (disable iptables and selinux) + ssh + yum

1. Install required software packages.

Yum install subversion (SVN server)
Mysql-server (for codestriker)

II. Basic SVN server configuration

1. Create a directory to store all SVN files.
# Mkdir/home/svn
2. Create a version repository
# Svnadmin create/home/svn/project
3. Initialize the directory in the version repository.
# Mkdir project/server project/client project/test (create a temporary directory)
# Svn import project/file: // home/svn/project-m "initialize SVN Directory"

The SVN server must be initialized after it is built on behalf, otherwise it will not be used at all.

4. Add a user

To add SVN users, you only need to add an entry in the format of "username = password" to the/home/svn/project/conf/passwd file. for testing, I added the following content:


[Users]
# Harry = harryssecret
# Sally = sallyssecret
Admin = admin

5. Modify the user access policy

/Home/svn/project/conf/authz records the user's access policy. The following is a reference:


[/]
Admin = rw
All Admin directories are read and write permissions.


6. Modify the svnserve. conf file to make the user and policy configuration more effective.

The content of svnserve. conf is as follows:

[General]
Anon-access = none
Auth-access = write
Password-db =/home/svn/project/conf/passwd
Authz-db =/home/svn/project/conf/authz


7. Start the server

# Svnserve-d-r/home/svn


8. Test server


# Svn co svn: // 192.168.60.10/project
Authentication realm: & lt; svn: // 192.168.60.10: 3690 & gt; 92733691-2dae-4c23-97fd-9e1ed7f0d18d
Password for 'root ':
Authentication realm: & lt; svn: // 192.168.60.10: 3690 & gt; 92733691-2dae-4c23-97fd-9e1ed7f0d18d
Username: Admin
Password for 'admin ':
Svn: Authorization failed (server_group does not use root directory access)
A project/test
A project/server
A project/client
Checked out revision 1. (the test is extracted successfully)
# Cd project/server
# Vim main. c
# Svn add main. c
# Svn commit main. c-m "test my C program. What do you think ?? "
Adding main. c
Transmitting file data.
Committed revision 2. (the test is submitted successfully)
If the SVN server you built is OK, but the turtle cannot access it: firewall problems... Simple and crude method: etc/ini. d/iptables stop
Of course it is not good. We recommend that you disable the firewall directly: (SVN uses port 3690 by default)


RH-Firewall-1-INPUT-p tcp-m state -- state NEW-m tcp -- dport 3690-j ACCEPT

Another small gift bag

SVN Error: Unreadable path encountered; access denied;

Solution:

Edit the [code repository Directory]/conf/svnserve. conf
Set the value of [anon-access] to [none].
Remember to restart the SVN server

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.