Linux (CentOS) Build SVN server full Raiders

Source: Internet
Author: User
Tags svn

While it's easy to build SVN on windows, it's not very efficient, of course, compared to Linux. However, it is very cumbersome to build SVN on Linux, so this article is going to be a step-by-step tutorial on how to build SVN on CentOS today.

Installation
#yum Install Subversion

1) Create SVN user
#groupadd SVN
#useradd-G Sky user//is adding user to the sky
Switch users
#su SVN
After the creation and maintenance of the code base, the account is used to operate.

2) Create a repository
Edit. Bash_profile plus the following configuration
Svn_home=/opt/lampp/htdocs/_svn
Export Svn_home
Path= $PATH: $SVN _home/bin
Export PATH

To create a repository:
#svnadmin Create--fs-type FSFS web
Now appears under/opt/lampp/htdocs/_svn/web: Conf/db/format hooks/locks/readme.txt

3) Set the user name and password for Web Access
Edit File/opt/lampp/htdocs/_svn/web/conf/passwd
In [users], set the user name and password in the following format:
User Name 1 = password 1
User Name 2 = password 2
For example, test=test indicates that the user name is test and the password is test

Edit File/opt/lampp/htdocs/_svn/web/conf/authz
[Groups]
Www=7di,user1,user2,user3,user4,user5,user6,wasing

[/]
@www =RW
*=

Edit File/opt/lampp/htdocs/_svn/web/conf/svnserve.conf
Add a few lines of configuration:
Anon-access = Read
auth-access = Write
Password-db = passwd
Authz-db = Authz
Note that the first letter of the line configuration is not allowed to have any spaces, otherwise there will be errors like svnserve.conf:12:option expected
Well, with the above configuration, your svn will be OK.

4) connection

If you already have SVN running, you can run it on a different port.
svnserve-d-r/opt/lampp/htdocs/_svn/web--listen-port 3391
So that the same server can run multiple Svnserver

Or use the next command to kill the process.
Netstat-ntlp
Kill-9 ID

OK, after the successful launch, you can use it.
It is recommended to use TORTOISESVN, the connection address is: svn://url/project name (if the port required to add Port: Port number)
After the connection can upload local files, effectively manage your code

If the connection is wrong, please check the fire wall Setup
#vi/etc/sysconfig/iptables
Join:-A input-m State--state new-m tcp-p TCP--dport 3690-j ACCEPT
#service iptables Restart

To create a script that initiates subversion:
#echo ' svnserve-d-r/opt/lampp/htdocs/_svn/' > start_svn.sh
#chmod 0777 start_svn.sh
#./start_svn.sh

Place the startup script in the boot startup script:
To modify the file as root:/etc/rc.d/rc.local, add the following text:
Su-c/opt/lampp/htdocs/_svn/start_svn.sh SVN

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.