Build svn server + Apachehttp access in Ubuntu

Source: Internet
Author: User
1. Install SVN under Ubuntu 1. Installation Package $ sudoapt-getinstallsubversion2. Add svn management user and subversion group $ sudoaddusertang

I. Install SVN in Ubuntu
1. Installation Package

  1. $ Sudo apt-get install subversion
  2. 2.Add svn users and subversion groups
  3. $ Sudo adduser tang
  4. $ Sudo addgroup subversion
  5. $ Sudo addgroup tang subversion
  6. 3.Create a project directory
  7. $ Sudo mkdir/home/svn
  8. $ Cd/home/svn
  9. $ Sudo mkdir project
  10. $ Sudo chown-R root: subversion project
  11. $ Sudo chmod-R g + rws project
Or
$ sudo mkdir /home/svn
$ sudo chown www-data:www-data -R /home/svn/
$ sudo chmod 770 -R /home/svn/
4. create a SVN file Repository $ sudo svnadmin create/home/svn/project5. access method and project import: $ svn co file: // home/svn/project or $ svn co file: // localhost/home/svn/project

* Note:
If you are not sure about the host name, you must use three slashes (//). If you specify the Host Name, you must use two slashes (//).
//--
The following command is used to import a project to the SVN File Repository:

$ Svn import-m "New import"/home/svn/projectfile: // home/svnuser/src/project

Be sure to indicate the import information

6. access permission settings
Modify the/home/svn/project directory:
Svnserve. conf, passwd, and authz files. spaces are not allowed at the front end of the row.

Edit the svnserve. conf file and uncomment the following two lines.

  1. Password-db = password
  2. Authz-db = authz
  3. // Additional instructions
  4. # [General]
  5. Anon-access = read
  6. Auth-access = write
  7. Password-db = passwd

Here, anon-access and auth-access are respectively anonymous and permission granted to authorized users. By default, anonymous users are granted read-only permissions.

You only need to change read to none to achieve the purpose of user access.

Edit/home/svnuser/etc/passwd as follows:

  1. [Users]
  2. Mirze =123456
  3. Test1 =123456
  4. Test2 =123456
  5. //--
  6. Edit/home/svnuser/etc/authz as follows:
  7. [Groups]
  8. Admin = mirze, test1
  9. Test = test2
  10. [/] 
  11. @ Admin= Rw
  12. * = R

Here we have set up three users, mirze, test1, and test2, all of which are 123456 passwords.
Among them, mirze and test1 belong to the admin group and have the read and write permissions. test2 belongs to the test group and only has the read permission.

7. Start the SVN Service

Svnserve-d-r/home/svn

Description:
-D indicates that svnserver runs in "daemon" process mode
-R specifies the root location of the file system (the root directory of the version Library), so that the client can access the version library without entering the full path.
For example, svn: // 192.168.12.118/fitness

8. Stop the SVN service.

Killall svnserve

The SVN installation is complete.
LAN access method:

Example: svn checkout svn: // 192.168.1.104/tang -- username mirze -- password 123456/var/www/fitness

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.