Ubuntu under APACHE+SVN build SVN service multi-project management

Source: Internet
Author: User
Tags bit set

First, the system environment

[Email protected]:~# cat/etc/issue

Ubuntu 16.04.2 LTS \ \l

Ii. creating SVN groups and users

[Email protected]:~# addgroup Svnser

Adding group ' Svnser ' (GID 1001) ...

Done.

[Email protected]:~# useradd svnser-g svnser-m #新增svnser用户,-G and specify the group Svnser,-m simultaneously create the home directory where the Svnser user resides

III. installation of Apache and Svnserver

[Email protected]:~# apt-get-y Install apache2

[Email protected]:~# apt-get-y Install subversion LIBAPACHE2-SVN

Iv. Creating a repository Directory

[Email protected]:~# mkdir-p/DATA/SVN

[Email protected]:~# svnadmin create/data/svn/repos01

[Email protected]:~# svnadmin CREATE/DATA/SVN/REPOS02

[Email protected]:~# svnadmin CREATE/DATA/SVN/REPOS03

[Email protected]:~# ls/data/svn/

Repos01 REPOS02 Repos03

[Email protected]:~# ls/data/svn/repos01/

Conf db format Hooks Locks README.txt

V. Create a project directory structure and import

[Email protected]:~# mkdir-p Test/{branches,tags,trunk}

Import Project to Repository (initialize):

[Email protected]:/data/svn# svn import/root/test file:///data/svn/repos01-m "test Import"

Adding/root/test/branches

Adding/root/test/tags

Adding/root/test/trunk

Committing transaction ...

Committed Revision 1.

========================================================

/root/test----------------> items that need to be imported

FILE:///DATA/SVN/REPOS01-----> represents a project's repository

Vi. Configuring SVN to be accessed through the web in Apache

[Email protected]:/etc/apache2# mkdir Svn-repos

[Email protected]:/etc/apache2/svn-repos# vim repos01.conf

<Location/svn/repos01>

DAV SVN

Svnpath/data/svn/repos01

Authzsvnaccessfile/data/svn/repos01/conf/authz

AuthType Basic

AuthName "Subversion Repository"

authuserfile/data/svn/repos01/conf/dev_passwd

Require Valid-user

</Location>

Note: This profile tells Apache about the access path for SVN already associated with the configuration file, here note the root directory of the access. Restart the Apache server and then access it via HTTP://192.168.0.66:8000/SVN/REPOS01

###############################################

/etc/apache2/apache2.conf <=========== This file adds the following line:

Includeoptional svn-repos/*.conf

################################################

/etc/apache2/ports.conf <=========== This file modifies Listen 80 to: Listen 8000

################################################

/etc/apache2/sites-enabled/000-default.conf <==== This file modifies <virtualhost *:80> to: <virtualhost 127.0.0.1:8000>, add a row servername 127.0.0.1

Restart Apache service:/etc/init.d/apache2 restart


======================================


Vii. Adding SVN users

[Email protected]:/data/svn/repos01/conf# htpasswd-m-b-c/data/svn/repos01/conf/dev_passwd test01 ' PWDtest ' #第一次创 Built SVN users need to pass the-c parameter, the second time to increase the user without the-c parameter.

Access input via client or browser http://192.168.0.66:8000/svn/repos01

Command line using SVN checkout http://192.168.0.66:8000/svn/repos01--username test01--password pwdtest

Viii. User Rights settings

Add the following configuration

[Email protected]:/etc/apache2/mods-enabled# cat Dav_svn.load


......... Slightly

LoadModule authz_svn_module/usr/lib/apache2/modules/mod_authz_svn.so

LoadModule dav_module/usr/lib/apache2/modules/mod_dav.so

LoadModule dav_fs_module/usr/lib/apache2/modules/mod_dav_fs.so

LoadModule dav_svn_module/usr/lib/apache2/modules/mod_dav_svn.so

LoadModule authz_svn_module/usr/lib/apache2/modules/mod_authz_svn.so

User Directory permission settings:

[Email protected]:~# Cat/data/svn/repos01/conf/authz


[Groups] #设置组

admin = test01,test #设置组用户

[/] #项目版本库根目录, admin has read and write access

@admin = RW

* = # Other users do not have any permissions




User IP access restrictions can be controlled via Nginx+proxy+allow

This article is from the "bit set" blog, please be sure to keep this source http://1606496.blog.51cto.com/1596496/1929869

Ubuntu under APACHE+SVN build SVN service multi-project management

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.