Install SVN on linux and import it (personal practice)

Source: Internet
Author: User

Install SVN on linux and import it (personal practice)

The original SVN server was deployed on windowsPC. As the leader requested, svn should be set up on the linux server and imported. Therefore, this operation is performed.

 

First, you need to download the required package from the official website. My package is 1.6.16, and the maximum package is 1.9 ,:

Http://subversion.tigris.org/downloads/subversion-1.6.16.tar.gz
Http://subversion.tigris.org/downloads/subversion-deps-1.6.16.tar.gz

At the same time, check some included service packages

Rpm-q apr-util sqlite

If not

 

Then install:./configure -- prefix =/data/svn -- with-openssl =/usr/include/openssl -- without-berkeley-db

Edit the/etc/ld. so. conf file
Vi/etc/ld. so. conf
Add the following line of code
/Usr/local/lib


Then make clean

Make

Make install

 

Create an environment variable: vi/etc/profile

SVNPATH = $ PATH:/data/subversion/bin
Export SVNPATH

 

Check whether the installation is successful: svn -- version

/Data/svn/svnserve -- version

 

 

Next, create a user and a directory.

Useradd-d/home/svnroot

Passwd svnroot

 

Mkdir/data/repository

Chown-R svnroot. svnroot/data/repository
Chmod-R 755/data/repository
Cd/data/subversion/bin

Create a repository directory

./Svnadmin create/data/repository

Several folders can be found.

 

Modify svnserve. conf in conf as follows:

anon-access = none auth-access = write

 

Now you can start svn.

svnserve -d -r /data/svn/

You can change it to start the service:

Create a file named svn in the/etc/rc. d/init. d/directory.
Set the permission to 755: chmod 755/etc/rc. d/init. d/svn.
Edit svn file: vi/etc/rc. d/init. d/svn

#!/bin/bash SVN_HOME=/data/svn if [ ! -f /data/svn/bin/svnserve" ] then echo "svnserver startup: cannot start" exit fi case "$1" in start) echo "Starting svnserve..." /data/svn/bin/svnserve -d -r $SVN_HOME echo "Finished!" ;; stop) echo "Stoping svnserve..." killall svnserve echo "Finished!" ;; restart) $0 stop $0 start ;; *) echo "Usage: svn { start | stop | restart } " exit 1 esac

 

 

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.