Linux and Windows subversion installation and configuration

Source: Internet
Author: User
Tags tortoisesvn
Configure subversion step by step in Linux
Software Package:
Httpd-2.23

Http://apache.justdn.org/httpd/httpd-2.2.3.tar.gz
Apr-1.27
Apr-util-1.27
Http://apache.justdn.org/apr/, the version number has been found, it is best to be the same as my region number
Oracle Berkeley dB 4.0.14

Http://download.oracle.com/berkeley-db/db-4.0.14.tar.gz
Subversion-1.4.0

Http://www.iusesvn.com/bbs/download/subversion-1.4.0.tar.gz

First install Berkeley dB 4.0.14
# Tar zxvf db-4.0.14.tar.gz
# Cd db-4.0.14/build_unix
# ../Dist/configure -- prefix =/usr/local/db-4.0.14 -- enable-compat185
# Make
# Make install

Install Apr, APR-util
# Tar zxvf apr-1.2.7.tar.gz
# Cd apr-1.2.7
#./Configure -- prefix =/usr/local/APR
# Make
# Make install

# Tar zxvf apr-util-1.2.7.tar.gz
# Cd apr-util-1.2.7
#./Configure -- prefix =/usr/local/APR-util -- With-Apr =/usr/local/APR -- With-Berkeley-DB =/usr/local/db-4.0.14/
# Make
# Make install

Install Apache
# Tar zxvf httpd-2.2.3.tar.gz
# Cd httpd-2.2.3
#. /Configure -- prefix =/usr/local/Apache -- enable-so -- enable-Rewrite = share -- enable-proxy-AJP = share -- enable-Dav = share -- enable-Dav-Fs -- With-Apr =/usr/local/APR/-- With-Apr-util =/usr/local/APR-util/
# Make
# Make install

Install Subversion
# Tar zxvf subversion-1.4.0.tar.gz
# Cd subversion-1.4.0
#. /Configure -- prefix =/opt/Subversion -- With-apxs =/usr/local/Apache/bin/apxs -- With-Apr =/usr/local/APR -- With-Apr- util =/usr/local/APR-util -- With-Berkeley-DB =/usr/local/db-4.0.14/-- With-SSL
# Make
# Make install

Directory where the library file is created
# Mkdir-P/home/svnroot/Repository
Go to the bin directory of subversion
# Cd/usr/local/subversion/bin
Create a repository "test"
#./Svnadmin create/home/svnroot/Repository/test
# Cd/home/svnroot/Repository/test
Check if there are more files. If yes, it indicates that the Subversion is successfully installed.
# Ls-l
# Cd/opt/subversion/bin
This statement imports the files found in the path/home/user/import to the Subversion repository you created,
The submitted revision is 1.
#./SVN import-M "comment"/home/user/import file: // home/svnroot/Repository/test
Modify repository Permissions
# Chown-r daemon: Daemon/home/svnroot/Repository

# How to add user commands

# Modify the version library configuration file:
Version Library 1:
# Vi/home/svnroot/Repository/test/CONF/svnserve. conf

Modify the content:
[General]
Anon-access = none
Auth-access = write
Password-DB =/home/svnroot/Repository/AuthFile
Authz-DB =/home/svnroot/Repository/authz. conf
Realm = test

Modify the Apache configuration file
# Cd/usr/local/Apache/bin
Start Apache
#./Apachect1 start
# Vi/usr/local/Apache/CONF/httpd. conf
// Add at the bottom. The following two statements are automatically added during configuration.
# Loadmodule dav_svn_module modules/mod_dav_svn.so
# Loadmodule authz_svn_module modules/mod_authz_svn.so
<Location/SVN>
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
</Location>
// Where AuthFile is passed
Htpasswd-B-c/home/svnroot/Repository/AuthFile Username Password
// To create
// "Require valid-user" tells Apache that all users in AuthFile can access Apache.


Restart Apache
# Cd/usr/local/Apache/bin/
#./Apachectl restart
// Open the browser to access http: // localhost/SVN/test/. In this case, a prompt dialog box is displayed, indicating that access is unavailable.

Permissions and user-defined Permissions

Permission management
1) Add users
// Because htpasswd is a built-in Apache command, first enter the Apache command directory
# Cd/usr/local/Apache/bin/
# Htpasswd/home/svnroot/Repository/AuthFile jackey
// Use-C to create a new user file when setting the user for the first time. Press enter and enter the user password to add the user.

2) Permission assignment

Configure user access permissions to define user group and version library Directory Permissions
# Vi/home/svnroot/Repository/authz. conf

Note:
* The user name displayed in the permission configuration file must be defined in the user configuration file. That is, the User Added with htpasswd
* Changes to the permission configuration file take effect immediately without restarting SVN.

User Group format:
[Groups]
User Group name = user 1, user 2
One user group can contain one or more users separated by commas.

Version library directory format:
[Version Library:/project directory]
@ User group name = permission
User name = permission

The box number can be written in multiple ways:
/, Indicating the root directory and the following. The root directory is specified when svnserve is started. We specify it as/home/svnroot/Repository. In this way,/sets permissions for all version libraries.
Test:/, indicating to set permissions for the version library Test

The permission subject can be a user group, user, or *. The user group is preceded by @, * indicating all users. The permission can be w, R, wR, or null. If it is null, no permission is granted.

Example:
[Groups]
Admin = mangosoft

[/]
@ Admin = RW

[Test:/]
@ Admin = RW
Lsw = RW
Jackey = RW

Delete the default file permission files authz and passwd.
# Rm/home/svnroot/Repository/test/CONF/authz
# Rm/home/svnroot/Repository/test/CONF/passwd

Test
If it succeeds, you can access it through http: // localhost/SVN/test, Goodluck!

How to install subversion in Windows

1. Download httpd-2.0. *. MSI (http://www.apache.org) Windows Installation Package
2. Download the subversion-1.0. *. EXE (http://subversion.tigris.org/) Windows Installation File
3.download tortoisesvn.exe (http://tortoisesvn.tigris.org/) Windows Installation File
4. install Apache.
5. Install Subversion
Copy *. So under subversion "httpd" to the modules directory in the Apache installation directory, and then copy the *. dll file in the Subversion "bin" directory to the Apache "bin" directory.
Edit httpd. conf (under Apache/conf) and remove it.
Loadmodule dav_module modules/mod_dav.so
Loadmodule dav_fs_module modules/mod_dav_fs.so
And add the following lines
Loadmodule dav_svn_module modules/mod_dav_svn.so
Loadmodule authz_svn_module modules/mod_authz_svn.so

<Location/SVN>
Dav SVN
Svnparentpath E:/SVN
</Location>

For permission settings, see settings in Linux. now we have subversion and a good version control software in windows. it differs from CVS in that it uses Apache's "APR", so it can run as long as Apache can run the system. well, I will write it here first.
6. After installing tortoisesvn, You need to restart the computer. It is a software integrated into the browser and resource manager, which is easy to use.

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.