Install svn in linux

Source: Internet
Author: User
Install svn-linux Enterprise Application-Linux server application in Linux. For more information, see. 1. download the latest src package of subversion and apache

2. Create a user: svnroot. The following operations are not particularly described as root user operations.

# Groupadd svn

# Useradd svnroot-g svn

# Passwd svnroot

3. Compile and install httpd:

// Decompress the apache2 installation package

# Tar xvzf httpd-2.2.3.tar.tar

// Enter the decompressed directory

# Cd httpd-2.2.3

// Configure apache installation

#./Configure -- enable-dav -- enable-so -- prefix =/usr/local/apache2/

# Make

// Install

# Make install

// Start the apache service

#/Usr/local/apache2/bin/apachectl start

// Open the browser http: // localhost/if there is a test page "It works! "The installation is successful.



4. Install Subversion

// Decompress the SubVersion installation package

# Tar xvzf Subversion-1.4.0.tar.gz

// Enter the decompressed directory

# Cd Subversion-1.4.0

// Configure subversion for Installation

#. /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-mode

# Make

// Install

# Make install

// Create the directory where the library file is located (the svnroot user performs the following operations)

# Mkdir/home/svnroot/repository

// Create a repository "test"

#/Usr/local/subversion/bin/svnadmin create/home/svnroot/repository/test

// Check whether svn is successfully installed

#/Usr/local/subversion/bin/svnadmin -- version

// Do not allow others to have permission for this directory

# Chmod 700/home/svnroot/repository

(Svnroot user operation ended)



5. Modify the Apache configuration file

# Vi/usr/local/apache2/conf/httpd. conf

// Find the following statement. If not, add it.

LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so

// Add



DAV svn

SVNParentPath/home/svnroot/repository // svn parent directory

AuthzSVNAccessFile/home/svnroot/repository/authz. conf // permission configuration file

AuthType Basic // set the connection type

AuthName "Subversion. zoneyump" // connection box prompt

AuthUserFile/home/svnroot/repository/authfile // user configuration file

Require valid-user // which authentication is used





// Restart apache

#/Usr/local/apache2/bin/apachectl restart

// Open the browser to access http: // localhost/svn/test/. If something is displayed, it indicates that it is successful.



6. permission management

1) Add users

# Htpasswd-c/home/svnroot/repository/authfile Username

// Use-c to create a new user file when setting the user for the first time. Press enter and enter the user password.

# Htpasswd/home/svnroot/repository/authfile username (you don't need to use-c if you add a new user)

2) Permission assignment

# Vi/home/svnroot/repository/authz. conf

[Groups]

Admin = useradmin

Devteamcs = useradmin, user1, user2 // a user group is defined here.

[/] // All users of all projects have the read permission, and the admin user has the read/write permission.

@ Admin = rw

* = R

[Test:/] // For the test project,

@ Devteamcs = rw

// Configure in the/usr/local/apache2/conf/httpd. conf file and find the two lines in the file:

User daemon

Group daemon

// Change daemon to svnroot, and the group is also changed to run the apache process as svnroot.

// It looks like this after modification

User svnroot

Group svn

// Restart apache

#/Usr/local/apache2/bin/apachectl restart

Access http: // localhost/svn/test. Now you need to verify your identity and you will be able to see the information after verification.

Supplement: In an xp environment, if you are running Kaspersky, you may not be able to access svn. Generally, a 400 Bad Request error is reported.

Solution: Go to Kaspersky Settings> Network Settings> port settings, and remove port 80 from the port list.

Again supplement: eclipse svn plug-in, subclipse, installation path: http://subclipse.tigris.org/update

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.