Subversion construction and project methods

Source: Internet
Author: User

Last week, group scheme was set up as subversion, but it was not completed successfully. Summarize the lessons learned from failure. Before doing anything, you must make full preparations, understand a large framework, specify a path that can be followed, and then stick to it.

 

First, Determine the version. Generally, the latest version is used.

Second, If there are many roads that can be accessed, first you need to check more information on the Internet to see which road is used, then, you can choose a good method on the premise that you already know the project framework;

Third, Regularly summarize the degree, solution, and uncertainty of the current project. If there are too many uncertainties, in addition, you cannot find a good method on the materials. You can consider another different path, and you need to know whether it can obviously make up for your current problem, you need to know the differences between the two paths.

 

Now let's talk about my experience in subversion. The Subversion server has two running modes: Apache + SVN.

And use its own independent service svnserve. At the beginning, I chose the path of Apache + SVN. Of course, I didn't know the specific advantages and disadvantages of the server configurations in these two running modes. At that time, the biggest mistake was that the preparation of the materials and tools in the early stage were too hasty. They didn't even think of a uniform version! I encountered a small problem in the early stage of Apache, but I gave up without studying it. Why, because there is no svnserve method, so I had to go through the svnserve path again. It went smoothly in the early stage, but when it came to the end, there were various unclear errors, then, the problem was solved, but it was a mess. After a few days of suffering, I learned that Apache was doing well in solving this problem. At the end of the analysis, there were too many uncertainties in the svnserve path, and then we went back to Apache. And start again. After learning the svnserve lesson this time, we should first carefully determine the source code for compilation. The version should be as up-to-date as possible and unified as much as possible. Then we should look for relevant documents, of course, it must be the same as the version you set, because different versions have different configuration parameters. This time, the tools are ready and the materials are sufficient. The key is that you know the big framework, where you want to do each step on the main trunk, and how to proceed to the next step, in this way, it takes only half a day to successfully configure the subversion. In this work, every step of my work is recorded in readme. I have taken a solid step by step and patiently solved the problem, then go down. Make sure that each step is the same as the document.

 

The following are the steps for building a Subversion server. Note that you can set up a subversion in 20 minutes as long as you are patient and careful!

 

 

# Descrip: Build Subversion server

# Author: liyangth@gmail.com

# Date: 10/30/2006

 

1. Compile and install apache2

#/* Tar xjvf httpd- 2.0.58 .Tar.bz2 */

#/* Config and compiler httpd- 2.0.58 For apache2 */

./Configure -- enable-Dav -- enable-so -- prefix =/usr/local/apache2/

Make

Make install

 

#/* Start appache Service */

CD/usr/local/apache2/bin

./Apachectl start

 

#/* Open website look at wether Apache work */

# Http: // localhost/

 

 

2. Compile and install Subversion

# Tar subversion- 1.4.0 Nd subversion-deps-1.4.0 on the same dir

#/* Config and compiler Subversion 1.4.0 */

 

. /Configure -- With-apxs =/usr/local/apache2/bin/apxs -- prefix =/usr/local/Subversion -- With-Apr =/usr/local/apache2/-- -Apr-util =/usr/local/apache2 -- With-SSL -- With-zlib -- enable-maintainer-mod

 

Make

Make install

 

# Test complish

SVN -- version

 

3. Create a warehouse

# Create repository path

Mkdir/home/liyangth/Repository # Total SVN directory

 

# Create repository for project Source

Svnadmin create/home/liyangth/Repository/test # a test project SRC

 

# Test complish

Ls/home/liyangth/Repository/test

 

# Import your project srouce to subversion Repository

SVN import/home/liy_pj file: // home/liyangth/Repository/test-m "LiY subversion"

 

4. Configure the server configuration file

# Start apache service

/Usr/local/apache2/bin/apachectl start

 

# Config Apache server

VI/usr/local/apache2/CONF/httpd. conf

<Location/SVN>

Dav SVN

Svnparentpath/home/liyangth/Repository

Authzsvnaccessfile/home/liyangth/Repository/authz. conf #/* The permission configuration file is generated in Step 6 */

Authtype basic

Authname "embedded group subversion"

Authuserfile/home/liyangth/Repository/userfile #/* the user configuration file is generated in step 5 */

Require valid-user

</Location>

 

5. Add a user

# Add User and passwd

Htpasswd-C/home/liyangth/Repository/userfile Worm

# If you first create userfile you must adding-C, if userfile exist you can use

# Htpasswd userfile usera

 

6. Set User Access Permissions

# Access purview

VI/home/liyangth/Repository/authz. conf

[Test:/]

Worm = RW

Usera = r

 

 

7. Do not do the following. Don't cry if SVN repository is used.

/* Liyangth is the Subversion user and its owner */

/* Close fire wall */

/Etc/init. d/iptables stop

 

# Notice !!!

VI/usr/local/apache2/CONF/httpd. conf

Change User daemon to user liyangth

Group daemon

 

# Notice !!!

Chown-r liyangth/home/liyangth/Repository

Chmod 775/home/liyangth/Repository

 

 

8. Change the Startup Script

# Ps

VI/etc/profile

/Usr/sbin/apachectl start

Export svn_editor = vi

 

 

Restart the apache service:

/Usr/local/apache2/bin/apachectl restart

 

Now let's take a look at our source code library:

Open the web and enter http: // localhost/SVN/test

After entering the username and password you added, do not be too excited if there is a legend.

 

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.