Install and configure the SVN server in CentOS 6.6

Source: Internet
Author: User
Tags bz2 sqlite sqlite database svn zip centos install perl


Installation

Check whether the system's built-in subversion is installed:


[Root @ topseek ~] # Rpm-qa | grep subversion
Subversion-1.6.11-12.el6_6.x86_64

If it has been installed, uninstall:

[Root @ topseek ~] # Yum remove subversion
Download the subversion program:


Cd/usr/local/src/& wget http://mirror.bit.edu.cn/apache/subversion/subversion-1.8.11.tar.bz2
Decompress:


Tar-jxvf subversion-1.8.11.tar.bz2

Download the sqlite database that the subversion depends on and place it in the subversion folder:


Cd subversion-1.8.11 & wget http://www.sqlite.org/sqlite-amalgamation-3071501.zip & unzip sqlite-amalgamation-3071501.zip & mv sqlite-amalgamation-3071501 sqlite-amalgamation
Compilation and installation:


[Weizek @ topseek ~] $ Yum install perl-ExtUtils-Embed
[Weizek @ topseek ~] $ Cd/usr/local/src/subversion-1.8.11/
[Weizhen @ topseek subversion-1.8.11] $./configure -- prefix =/opt/subversion
[Weizhen @ topseek subversion-1.8.11] $ make
[Weizhen @ topseek subversion-1.8.11] $ make install
Add system variables:


Echo 'export PATH = $ PATH:/opt/subversion/bin'>/etc/profile & source/etc/profile

So far, the installation is complete.
Configuration
Create a folder:


Mkdir-p/data/svndata/{project1, project2}
Create the svn version Library project1:


Svnadmin create/data/svndata/project1
There are several files below:


Conf db format hooks locks README.txt

The configuration file is in conf:


Authz passwd svnserve. conf

Svnserve. conf is the version Library configuration, passwd is the user configuration file, and authz is the permission configuration file.

Modify the svnserve. conf configuration file as follows:


[General]
# Preventing unauthorized users from accessing
Anon-access = none
# Grant write permission to authorized users
Auth-access = write
# Specify the password file path
Password-db = passwd
# Access control file
Authz-db = authz

Modify the user file passwd:


[Users]
User01 = 123456
User02= 123456
Note: the user name and password are used in front.
Modify authz as prompted.
Start the SVN service:


Svnserve-d-r/data/svndata/

Note: this command is used to start the svn service.-d indicates that the command runs in daemon mode and svn automatically listens on port 3690. 3690 is the default port. You can use "-listen-port =" or "-listen-host =" to specify other ports and non-local hosts. The-r option is used to specify the root directory of the svn service, so that you can use the relative path for access without providing the complete path.

Shut down the SVN process:


Killall svnserve
Note: when pointing to/data/svndata/, it means that multiple warehouses can be created. The access addresses are: "svn: // IP/project1" and "svn: // IP/project2
View Port:


[Root @ topseek ~] # Lsof-I: 3690
Command pid user fd type device size/OFF NODE NAME
Svnserve 25456 root 3u IPv4 2128419 0t0 TCP *: svn (LISTEN)

Set the random start server:


Echo "svnserve-d-r/data/svndata/">/etc/rc. local
Client:
In Windows, TortoiseSVN should be free and easy to use:

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.