Build the SVN server on Ubuntu12.0464 bit

Source: Internet
Author: User
Tags apache error log using git fully qualified domain name
Preference Summary: You are always lucky. This sentence is mapped to the programmer. Not only did the laptop enter the factory, but the code written on the computer for nearly a month was also lost. When I was crying, I began to think about finding a place for my code. Talking about the poor code of the monks. At first, a local SVN server was installed on the desktop. The code is out of the door, and it is all in the house. Soon after graduation, there will be little or no practical writing. There is no concept of a code library. Many things have been accumulated, and many problems are repeated encoding. The code library in the House cannot be connected to the Internet.

Preference Summary: You are always lucky. This sentence is mapped to the programmer. Not only did the laptop enter the factory, but the code written on the computer for nearly a month was also lost. When I was crying, I began to think about finding a place for my code. Talking about the poor code of the monks. At first, a local SVN server was installed on the desktop. The code is out of the door, and it is all in the house. Soon after graduation, there will be little or no practical writing. There is no concept of a code library. Many things have been accumulated, and many problems are repeated encoding. The code library in the house is not connected to the Internet, so there is a copy of the hard disk. The boss sees that you are using hard drives all day long and the code is not synchronized. Later, I started using git. It's not bad to use it. It's just that the private project was not completed, and I didn't dare to upload it all. I lost some code when my notebook crashed last week. You have to open a code repository by yourself. It is convenient to store the data on the server and submit it.

Subversion configuration instance http://www.linuxidc.com/Linux/2012-02/53109.htm in Linux

CentOS 6.2 SVN setup (YUM installation)Http://www.linuxidc.com/Linux/2013-10/91903.htm

Apache + SVN build SVN server http://www.linuxidc.com/Linux/2013-03/81379.htm

Windows SVN server setup and use + client Reset Password http://www.linuxidc.com/Linux/2013-05/85189p5.htm

Ubuntu Server 12.04 install SVN and migrate Virtual SVN data http://www.linuxidc.com/Linux/2013-05/84695.htm

Ubuntu Server svn service and migration method http://www.linuxidc.com/Linux/2013-05/84693.htm

Build SVN server http://www.linuxidc.com/Linux/2013-10/91271.htm with online storage

1 Program Installation

1.1 sudo apt-get install apache2

Install apache2. If you have installed nginx. Stop nginx first. The port 80 it uses conflicts with The apache2 installed later. For example,/etc/init. d/nginx stop.

After the installation is complete, the following error may occur if there is no accident:

Apache2: cocould not reliably determinethe server's fully qualified domain name, using 127.0.0.1 for ServerName

Add the following line to/etc/apache2/httpd. conf (this file is blank at this time and is normal:

ServerName 127.0.0.1: 80

Restart apache2 and run/etc/init. d/apache2restart. The following field indicates that the restart is successful.

Root @ xxxxx:/etc/apache2 #/etc/init. d/apache2 restart
* Restarting web server apache2
... Waiting... done.

1.2 sudoapt-get install subversion

Install subversion. Skipped.

1.3 sudoapt-get install libapache2-svn

Install the connection plug-in. Skipped.

2. Permission

2.1 user and group settings

Run the following command:

Sudoaddgroup subversion
Sudousermod-G subversion-a www-data

View results:

Cat/etc/group | grep subversion
Subversion: x: 1001: www-data

2.2 Apache2 mount the SVN module (via http: // access)

To access the SVN File Repository through the WebDAV protocol, add the following code snippet to/etc/apache2/mod-available/dav_svn.conf:


DAV svn
SVNParentPath/home/svn
SVNListParentPath On
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile/home/svn/conf/dav_svn.passwd
AuthzSVNAccessFile/home/svn/conf/dav_svn.authz
Require valid-user

RedirectMatch ^ (/svn) $1/

2.3 user settings

Create the/home/svn/conf directory. Set a password for the user and save it in encrypted mode (-c indicates the new password, and the new password indicates the append password ). You will be prompted to enter the password.

Htpasswd-c/home/svn/conf/dav_svn.passwd user_1
Htpasswd/home/svn/conf/dav_svn.passwd user_2

Create the dav_svn.authz file and add the following code.

[Groups]
Admin = user_1
User = user_2
[/]
@ Admin = rw
@ User = r

Restart apache2. /Etc/init. d/apache2 restart

If there is no accident, the following error will occur:

Syntax error on line 65 of/etc/apache2/mod-enabled/dav_svn.conf:
Invalid command 'authzsvnaccessfile', perhaps misspelled or defined by a module not supported ded inthe server configuration
Action 'configtest' failed.
The Apache error log mayhave more information.
... Fail!

The reason is that the module is not loaded. Add the following code to/etc/apache2/mod-available/dav_svn.load.

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

Restart/etc/init. d/apache2restart.

For more details, refer to the highlights on the next page.: Http://www.linuxidc.com/Linux/2014-06/102562p2.htm

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.