Install apache and subversion in Linux-Linux Enterprise Application-Linux server application information. For more information, see. I wrote a summary.
Install apache and subversion in Linux (RH9)
A Tang Ge just completed the configuration. I wrote A summary based on some online articles and practical experience.
1. install Apache
First decompress the httpd -- 2.0.59 package
# Tar-xzvf httpd-2.0.59.tar.gz
# Cd httpd-2.0.59
Compile parameters (default installation directory/usr/local)
#./Configure -- enable-module = so -- enable-dav-fs -- enable-so -- prefix =/usr/local/apache2
# Make
# Make install
2. Install subversion-1.4.4
Decompress the two packages respectively. The content will be decompressed to subversion-1.4.4 in the same directory. (by default, the package is decompressed to the same directory)
# Tar-xzvf subversion-1.4.4.tar.gz
# Tar-xzvf subversion-deps-1.4.4.tar.gz
Go to the folder and set the compilation parameter
# Cd subversion-1.4.4
#./Configure -- prefix =/usr/local/subversion
-- With-apxs =/usr/local/apache2/bin/apxs
-- With-apr =/usr/local/apache2
-- With-apr-util =/usr/local/apache2
# Make
# Make install
3. Configure the SVN Server
(1) modify the version library configuration file:
Version Library 1:
Vi/home/svnroot/repository/conf/svnserve. conf
Modify the content:
[General]
Anon-access = none
Auth-access = write
Password-db =/home/svnroot/repository/authfile // user configuration file
Authz-db =/home/svnroot/repository/authz. conf // permission configuration file
# Realm = test
(2) modify the Apache configuration file and add the following data to httpd. conf.
DAV svn
SVNPath/svnroot/repository
SVNParentPath/home/svnroot // 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 //
// "Require valid-user" tells apache that all users in authfile can access apache. Without it,
// Only the first user can access the new database
Restart apache
# Cd/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.
4. permission management
1) Add users
# Htpasswd/home/svnroot/repository/authfile name
// Use-c to create a new user file when setting the user for the first time. Press enter and enter the user password.
# Htpasswd authfile username (Add a new user)
2) Permission assignment
Configure user access permissions:
Vi/home/svnroot/repository/authz. conf
To simplify the configuration, the three version libraries share one permission configuration file/home/svnroot/repository/pwd. conf. If necessary, they can also be separated.
File.
Note:
* The user name displayed in the permission configuration file must be defined in the user configuration file.
* Changes to the permission configuration file take effect immediately without restarting svn.
User Group format:
[Groups]
<用户组名> = <用户1> , <用户2>
One user group can contain one or more users separated by commas.
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.
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