Linux subversion installation configuration-Linux Enterprise Application-Linux server application information. The following is a detailed description. 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
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
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
// 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!
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