SVN server Setup on Linux system boot up

Source: Internet
Author: User
Tags svn tortoisesvn

After installing the SVN server although easy to use but because often restart the Linux server, each restart will go to manually start the SVN server, it is troublesome, so after looking for some methods on the Internet, they set the SVN server to boot

Step One: Install the SVN server:

Http://www.cnblogs.com/puloieswind/p/5856326.html

I'm using this big Brother's method to successfully install and run the SVN server

1. Install the SVN server:

Check whether you have installed

# Rpm-qa Subversion

Installing the SVN server

Install httpd httpd-devel Subversion mod_dav_svn mod_auth_mysql

Verifying the installation

# cd/etc/httpd/grep svnmod_authz_svn.somod_dav_svn.so 

View version

# Svnserve--version

2. Code Base creation:

Set up SVN library after installation is complete

Mkdir-p/opt/svn/repositories# svnadmin create/opt/svn/repositories

After execution, the repositories library is automatically established, and the/opt/svn/repositories folder contains files such as Conf,db,format,hooks,locks,readme.txt, indicating that an SVN repository has been established.

3. Configure the Repository:

Go to the above Conf folder and configure:

A. User Password passwd configuration:

passwd  //+ indicates the cursor is placed at the lowest end of the file 

Modify passwd to read:

[users]# Harry = harryssecret# sally = sallyssecretzhoulf=123456  

B. Permission Control Authz Configuration:

VI + Authz

Set which users can access which directories, append the following to the Authz file:

[/]ZHOULF=RW  // give the user access to all libraries  [Repositories:/project]  zhoulf=rw    

/indicates the root directory and the root directory is specified when Svnserve is started, and we specify that/opt/svn;/means having permissions on all repository

repositories:/to set permissions on the root directory of the library repositories

Ps:

* The user name that appears in the permissions profile must already be defined in the user profile.

* Changes to the permissions profile take effect immediately and do not have to restart SVN.

C. Service Svnserve.con configuration:

VI + svnserve.conf

Add a little bit of content:

[General] #匿名访问的权限, can be read,write, none, the default is readanon-access=none# enable authorized users to have write permissions auth-access= write# The path to the password database password-db=passwd#访问控制文件authz-db=authz# authentication namespace, Subversion is displayed in the authentication prompt, and is the keyword for the credential cache realm=/ Opt/svn/repositories       

Note here that the labels can not be wrong, and can not be duplicated, or can not be connected.

D. Configure firewall ports (if required):

Not everyone needs to set up, you can test and then see if you need to open the port

Vi/etc/sysconfig/iptables

Add a little bit of content:

3690-j ACCEPT

Restart firewall after saving

# Service Iptables Restart

4. View:

A. Start SVN

# svnserve-d-r/opt/svn/repositories

B. View the SVN process

Ps-ef| grep svn| grep: xx: xx svnserve-d-r/opt/svn/repositories     

C. Detecting SVN ports

# netstat-ln |  36900.0.  0.0:0.0.  0.0:* LISTEN     

5. Stop restarting SVN:

 // start 

6. Test the connection:

(1) Install the TORTOISESVN client on the local computer:

After the successful installation of TORTOISESVN on the computer desktop right click on the TortoiseSVN prompt; Select Repo-browser; an address bar appears;

(2) In the Address bar type: svn://+ server IP Address, if the installation is not a problem, it will enter the server's resource pool

Second, Linux server-side setup svn boot up

(1) Create a script file on the Linux server with the directory ((/root path))

# Touch Svn.sh

(2) Enter the script file

# Vim Svn.sh

(3) Add a bit of content

#!/bin/bash
/usr/bin/svnserve-d-r/opt/svn/repositories

explain:

Here the Svnserve path is safe, it is best to write the absolute path, because the environment variable may not be loaded when it is started.
How do you find the absolute path?

# which Svnserve(4) Change the execution permissions of the script# chmod 777 svn.sh(5) Join auto-run# vi/etc/rc.d/rc.local
Add the path to the script at the end:
/root/svn.sh(6) Restart the Linux server and check to see if the SVN server is turned on after rebooting# Ps-ef|grep Svnserve If the following information is displayed, SVN is turned on: TCP 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN

SVN server Setup on Linux system boot up

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.