Configure subversion in Linux with me

Source: Internet
Author: User
1. preparations are available in CentOS5 or Fedora8. httpd and subversion are installed by default. To access svn through the web, apache mod_dav_svn and mod_authz_svn modules are also required. If they are not loaded, reinstall them. 2. create a repository mkdir/home/svnreposvnadmincreate -- fs-typefsfs/home/svnrepo/ecshopsvnadmincreate

1. Preparations
In CentOS5 or Fedora 8, httpd and subversion are installed by default. apache mod_dav_svn and mod_authz_svn modules are also required to access svn through the web. If they are not loaded, reinstall them;

2. Create a repository
Mkdir/home/svnrepo
Svnadmin create -- fs-type fsfs/home/svnrepo/ecshop
Svnadmin create -- fs-type fsfs/home/svnrepo/discuz6
Chmod 700/home/svnrepo

3. Add a user
// Create the MD5 encrypted password file authfile,-c: create,-m: Encrypted with MD5
Htpasswd-c-m/home/svnrepo/authfile pujing
// Add a second user
Htpasswd-m/home/svnrepo/authfile bushi

4. Permission assignment
# Vi/home/svnrepo/authz. conf
[Ecshop:/]
Bushi = r
Pujing = rw
[Discuz6:/]
Bushi =
Pujing = r
# [/]
# * = R
# [Groups]
# Svn1-developers = bushi, pujing
# Svn2-developers = bushi
# [Svn1:/]
# @ Svn1-developers = rw

5. Configure apache
# Vi/etc/httpd/conf/httpd. conf

Add the last or last part of Loadmodule

DAV svn
SVNParentPath/home/svnrepo/
AuthzSVNAccessFile/home/svnrepo/authz. conf
AuthType Basic
AuthName "svn repository"
AuthUserFile/home/svnrepo/authfile
Require valid-user

# Service httpd restart

6. import the file to the version Repository
Svn import-m "the first import"/var/www/html/ecshop file: // home/svnrepo/ecshop

7. Access
Http: // 192.168.1.139/svn/ecshop

8. commit to the version library and update the web test environment
# Cd/home/svnrepo/ecshop/hooks
# Cp post-commit.tmpl post-commit // remove. tmpl.
# Chmod 755 post-commit
# Vi post-commit
// Add three lines at the end of the post-commit File
SVN =/usr/bin/svn
WEB =/home/website/ecshop
$ SVN update -- username pujing -- password 123456 $ WEB

9. Others.

Related Article

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.