Install and use subversion in Linux

Source: Internet
Author: User
Tags svn client
I 've switched my work environment from windows to Linux over the past few days. Because of the Java language development, it's quite easy to port the project, but I'm not going to use cvs for version control, I decided to change the svn with more powerful functions, so I learned how to install subversion in Linux. The following is a summary:

 

Compile and install related software(We use the source code for compilation and installation)
A. httpd
: Http://httpd.apache.org
Download httpd-* .tar.gz (* indicates the version number, which is 2.8.8)
Install
# Tar-zxvf httpd-2.8.8.tar.gz
# Cd httpd-2.8.8
#./Configure -- enable-Dav -- enable-so -- enable-maintainer-Mode
# Make
# Make install
B. Berkeley DB
: Http://www.oracle.com/technology/products/berkeley-db/index.html
Download Berkeley dB 4.7.25.tar.gz
Install
# Tar-zxvf db-4.4.20.NC.tar.gz
# Cd db-4.4.20.NC/build_unix/
# ../Dist/configure -- prefix =/usr/local/bdb
# Make
# Make install
C. Subversion
: Http://subversion.tigris.org
Download the subversion-* .tar.gz and subversion-deps-* .tar.gz packages. The latter package contains some dependent programs. Put the two packages in the same directory and decompress them, the extracted files are automatically placed in the same folder.
Install
# Tar-zxvf subversion-1.2.3.tar.gz
# Cd subversion-1.2.3
#./Configure -- With-Berkeley-DB =/usr/local/bdb -- With-apxs =/usr/local/apache2/bin/apxs
# Make
# Make install
After the installation is successful, you can use # svnadmin -- version to check whether the installation is successful.
If the installation is successful
Svnadmin, version 1.4.6 (r28521)
Compiled on May 6,: 55: 08
............
Configuration
Configure Subversion
# Mkdir/home/*/SVN (* indicates the user directory)
# Cd/usr/local/subversion/bin
#./Svnadmin create/home/*/SVN/test
In this way, a test repository is created under SVN.
Modify the httpd configuration file
# Vi/usr/local/apache2/CONF/httpd. conf
Add the following content at the bottom
Loadmodule dav_svn_module modules/mod_dav_svn.so
Loadmodule authz_svn_module modules/mod_authz_svn.so
<Location/SVN>
Dav SVN
Svnparentpath/home/*/SVN // SVN parent directory
Authzsvnaccessfile/home/*/SVN/authz. conf // permission configuration file
Authtype basic // set the connection type
Authname "subversion. zoneyump" // connection box prompt
Authuserfile/home/*/SVN/AuthFile // user configuration file
Require valid-user // which authentication is used
</Location>
// AuthFile is created through "htpasswd [-C]/home/*/SVN/AuthFile Username Password"
// "Require valid-user" tells Apache that all users in AuthFile can access Apache. Without it,
// Only the first user can access the new database
Save the modification and restart Apache.
#./Usr/local/apache2/bin/apachectl restart

 

Permission management

1) Add users
#./Usr/local/apache2/bin/htpasswd [-C]/home/*/SVN/AuthFile wooin
// Use-C to create a new user file when setting the user for the first time. Press enter and enter the user password.
#./Usr/local/apache2/bin/htpasswd AuthFile username (Add a new user)
2) Permission assignment

# Vi/home/svnroot/Repository/authz. conf
[Test:/] // indicates the access permission under the root directory of the test warehouse.
Wooin = RW // The test warehouse wooin user has read and write permissions
Bao = r // test repository Bao users have read permission
[Test2: //] // access permission under the root directory of the Test2 Repository
Wooin = r // The wooin user has only the read permission in the root directory of the Test2 repository.
Bao = // The Bao user does not have any permissions under the root directory of the Test2 repository.
[/] // This indicates that it is in the root directory of all warehouses
* = R // This indicates that all users have the read permission.
# [Groups] // This indicates group settings
# Svn1-developers = wooin, Bao // This represents a member of a group
# Svn2-developers = wooin
# [Svn1:/]
# @ Svn1-developers = RW // if you add the @ symbol above, it indicates this is a group permission setting

 

After this setting is complete. Restart Apache.
Http: // localhost/SVN/test
This URL is used to access the repository.

To use Svn in eclipse, you need to install the svn plug-in by yourself.

Here, the svn plugin of eclipse is called subclipse. The update site is also published at http://subclipse.tigris.org/on the official website.
Eclipse users can use the Eclipse plug-in to automatically download and update the plug-in to install this plug-in, choose Help> Software Updates> Find and install> search for new features to install> new remote site from the eclipse menu. Enter http://subclipse.tigris.org/updatein the URL, and the eclipsewill be installed.

After the installation is complete, five more packages will be added to the eclipse plugins, which should be named org. Tigris. subversion. Open eclipse, window-> show view, and add an SVN folder in the window. This proves that the svn plug-in has been successfully installed. The specific usage methods are detailed in the help of eclipse to help subclipse-Subversion eclipse plugin, teach you to use the svn client step by step. If you want to have a deep understanding of subversion, you can see the version control with subversion in help, this document is the same as the official document provided in the sbuversion installation file. It looks more comfortable here.

Note: This article summarizes the achievements of previous documents.

 

From: http://www.blogjava.net/chybox/archive/2008/05/09/199448.html

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.