SVN Server Installation Deployment Strategy (Linux+subversion+apache) __linux

Source: Internet
Author: User
Tags auth svn
I. Installing the APR dependency library (Apache portable Runtime Module)

Http://apache.mirror.phpchina.com/apr/apr-1.2.11.tar.gz
./configure
Make
Make install

Http://apache.mirror.phpchina.com/apr/apr-util-1.2.10.tar.gz
./configure--with-apr=/home/chenmin/apr-1.2.11
Make
Make install

Two. Recompile httpd

Check to see if the installed Apache2 has Mod_dav installed.

If you have successfully installed Apache, use Httpd-m to see if you have installed Dav_module, and if not, you must attach ' –enable-dav ' –enable-dav-fs ' two parameters to recompile Apache, otherwise even if the compilation passes the SVN , Apache will not start up.

wget http://apache.mirror.phpchina.com/httpd/httpd-2.2.6.tar.gz
./configure--enable-dav--enable-dav-fs
Make
Make install

Three. Install Subversion

The latest version of Subversion can be found here: http://subversion.tigris.org/project_packages.html
Http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz

Download the Neon Library so that SVN supports WebDAV, an HTTPS encrypted link.
The download is then placed under the Subversion installation directory and renamed, and Subversion is automatically monitored and configured, and currently supports only 0.25.5.

; CD Subversion-svn-last-version-dir
CD subversion-1.4.5
wget http://www.webdav.org/neon/neon-0.25.5.tar.gz
Tar xzf neon-0.25.5.tar.gz
MV neon-0.25.5 Neon

./configure--with-apxs=/usr/local/apache2/bin/apxs--with-apr=/home/chenmin/apr-1.2.11--with-apr-util=/home/ chenmin/apr-util-1.2.10--with-ssl

Because Berkeley DB is not installed, use FSFS
Make
sudo make install

Four. Configure subversion and Apache

Copy the SVN module to the Apache module directory
cp/data/subversion-1.4.5/subversion/mod_dav_svn/.libs/mod_dav_svn.so/usr/local/apache2/modules/
cp/data/subversion-1.4.5/subversion/mod_authz_svn/.libs/mod_authz_svn.so/usr/local/apache2/modules/

Edit httpd.conf
LoadModule Dav_svn_module modules/mod_dav_svn.so
LoadModule Authz_svn_module modules/mod_authz_svn.so

<Location/svn>
DAV SVN
Svnparentpath/data/svn
</Location>

Run htpasswd Add user and password
/usr/local/apache2/bin/htpasswd-cm/data/svn/svn-auth-file Chenmin
/usr/local/apache2/bin/htpasswd-m/data/svn/svn-auth-file Admin

Edit httpd.conf again
<Location/svn>
DAV SVN
Svnparentpath/data/svn
AuthType Basic
AuthName "Subversion Repository"
Authuserfile/data/svn/svn-auth-file
Require Valid-user
Authzsvnaccessfile/data/svn/svn-access-file
</Location>

Where Svn-auth-file is the authentication file that stores the username and password, svn-access-file is the access rights file, which stipulates the permissions of the visitors to each directory, and the sample permission assignment file is formatted as follows.
[Groups]
admin = John, Kate
DEVTEAM1 = John, Rachel, Sally
Devteam2 = Kate, Peter, Mark
Docs = Bob, Jane, Mike
Training = Zak
# Default access rule to all repositories
# Everyone can read, admins can write, Dan German is excluded.
[/]
* = R
@admin = RW
Dangerman =
# Allow developers complete access to their project repos
[proj1:/]
@devteam1 = RW
[proj2:/]
@devteam2 = RW
[bigproj:/]
@devteam1 = RW
@devteam2 = RW
Trevor = RW
# give the doc people write access to all the Docs folders
[/trunk/doc]
@docs = RW
# give trainees write access in the training repository only
[trainingrepos:/]
@training = RW
In a rights profile, the key concepts are: Goals and permissions, which are the permissions that are assigned to whom. Read as R, write as W, if you do not have permission then nothing can be written.

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.