Set up SVN server svn in Ubuntu 14.04 ://

Source: Internet
Author: User
Tags svn client

Set up SVN server svn in Ubuntu 14.04 ://

Set up SVN server svn in Ubuntu 14.04 ://

Installation package:

Sudo apt-get install subversion

Then select the location where the SVN service file and configuration file are stored. I put the svn directory under/srv.

Cd/srv

Sudo mkdir svn

My svn repository is called tone_src.

Cd/srv/svn

Sudo mkdir tone_src

Create a version repository after creating the Directory

Sudo svnadmin create/srv/svn/tone_src

After the execution, the file structure in tone_src is as follows:

Tone @ ubuntu:/srv/svn/tone_src $ ls-l
Total usage 24
Drwxr-xr-x 2 root 4096 January 15 10:52 conf
Drwxr-sr-x 6 root 4096 January 15 14:52 db
-R -- 1 root 2 January 15 10:50 format
Drwxr-xr-x 2 root 4096 January 15 10:50 hooks
Drwxr-xr-x 2 root 4096 January 15 10:50 locks
-Rw-r -- 1 root 246 January 15 10:50 README.txt

Configure as follows:

We need to modify the three files in the conf directory, authz; passwd; svnserve. conf.

Edit svnserve. conf

[General]
# Anonymous users cannot read
Anon-access = none
# Permission user writable
Auth-access = write
# The password file is passwd.
Password-db = passwd
# The permission file is authz.
Authz-db = authz

Edit authz. Set the Administrator group, that is, the admin group. users in the tone admin group have rw (read and write permissions), and all users in the admin group have r (read permission)

[Groups]
Admin = tone

[/]
@ Admin = rw
* = R

The group name is not necessarily admin. Your Administrator group name can be any name. For example, if the admin group has other users, you can set admin = tone, tone1, tone2 works like this

Compile the passwd file and set the User Password

[Users]
# Harry = harryssecret
# Sally = sallyssecret
Tone = www

Tone's password is www.

After completing the preceding steps, you can start your svn server.

Sudo svnserve-d-r/erv/svn/

-D enabled in daemon mode

-R: Create the svn version library root directory so that the client can access the version library without entering the full path.

Example: svn: // 127.0.0.1/tone_src

It is worth noting that I started sudo here because I created the svn directory and the tone_src directory in sudo. The permission of the directory is root.

If I can start it in the following way, but when the client segment submits files, there will be problems, because the svnserve Service does not have the write permission for the svn version library directory.
Svnserve-d-r/erv/svn/

A svn client under 14.04 is recommended.

$ Sudo add-apt-repository ppa: rabbitvcs/ppa
$ Sudo apt-get update
$ Sudo apt-get install rabbitvcs-nautilus3

# Optional
$ Sudo apt-get install rabbitvcs-gedit
$ Sudo apt-get install rabbitvcs-cli

For eclipse client users, install the subclipse plug-in. When installing the plug-in, make sure that the client version and the server version correspond well. It is best not to consider compatibility. It is best to ensure accurate matching,

So far, the Subversion version of Ubuntu 14.04 is 1.8.8 and its corresponding subclipse version is 1.10.8.

In addition, the javahl version is 1.8.8.

The specific installation configuration is as follows:

Install and configure subclipse1.10.8 http://subclipse.tigris.org/files/documents/906/49397/site-1.10.8.zip

Download and decompress the package to obtain a folder named site-1.10.8. Put site-1.10.8 in the dropins directory under the eclipse directory and restart eclipse.

After the restart, subclipse1.10.8 can be installed. If the installation fails, check the folder view permission. Or start eclipse again in clean mode.

After subclipse is installed, the following error occurs: org. apache. subversion. javahl. clientexception: svn ......

This is because javahl is not installed. Run the following command to install it.

Sudo apt-get install libsvn-java

After installation, make a small configuration,

First, find the path of javahl.

Sudo find/usr-name libsvnjavahl-1.so

The result shows the path in/usr/lib/x86_64-linux-gnu/jni

Modify eclipse. ini to add a line-Djava. library. path =/usr/lib/x86_64-linux-gnu/jni
After Ubuntu is upgraded to 12.04, The JavaHL Library location is changed from/usr/lib/jni to/usr/lib/x86_64-linux-gnu/jni
14.04 is also in/usr/lib/x86_64-linux-gnu/jni

-Startup
Plugins/org. eclipse. equinox. launcher_1.2.0.v20110502.jar
-- Launcher. library
Plugins/org. eclipse. equinox. launcher. gtk. linux. x86_64_1.1.100.v20110505
-Product
Org. eclipse. epp. package. jee. product
-- Launcher. defaultAction
OpenFile
-Showsplash
Org. eclipse. platform
-- Launcher. XXMaxPermSize
256 m
-- Launcher. defaultAction
OpenFile
-Vmargs
-Djava. library. path =/usr/lib/x86_64-linux-gnu/jni
-Dorg. eclipse. swt. browser. XULRunnerPath =/opt/commonTools/xulrunner
-Dosgi. requiredJavaVersion = 1.5
-XX: MaxPermSize = 256 m
-Xms40m
-Xmx512m

In this way, you can use svn after starting eclipse.

-------------------------------------- Split line --------------------------------------

Subversion configuration instances in Linux

CentOS 6.2 SVN setup (YUM installation)

Deploy Apache + SVN in CentOS 6.5

Build an SVN server using Apache + SVN

Set up and use the SVN server in Windows + reset the password on the client

Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data

Build svn service and migration method on Ubuntu Server

Build SVN server with online storage

-------------------------------------- Split line --------------------------------------

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.