CENTOS6 installation Configuration SVN environment step

Source: Internet
Author: User
Tags auth mkdir svn


People are really lazy sometimes, for convenience, use Yum to install SVN
The following actions are performed using the root account:

Yum Install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Yum Install--enablerepo=rpmforge,rpmforge-extras Subversion

To set up a startup svn run User:

Useradd SVN
passwd SVN

Enter the password two times after entering the carriage.

Mkdir-p/home/svn/svndata
Cd/home/svn/svndata
Svnadmin Create test

Configuration:
VI test/conf/svnserve.conf

Modify: Remove annotation characters
[General]
Anon-access = None
auth-access = Write
Password-db = passwd
Authzauthz-db = Authz
Realm = Test

To define version library access permissions:

VI Test/conf/authz

Add to:
[/] #这是对版本库根目录的权限
Test_user = RW

[/trunk/test] #这是对版本库目录/trunk/test permission control, the following two users can only access this directory
Test_user1 = RW
Test_user2 = RW

Set User password:
VI test/conf/passwd

Add to:
Test_user = test123456

Set user ownership to allow SVN access to the version library:

Chown-r svn:svn/home/svn/svndata/

Start SVN:

Attention
If you want to open a single test warehouse, specify/home/svn/svndata/test directly
If multiple warehouses are open, specify/home/svn/svndata

1 start with SVN account:
Su svn-c "svnserve-d-r/home/svn/svndata--listen-host 192.168.1.123--listen-port 9231"

Description
Su svn says to start SVN as the user svn
-D indicates running in daemon (background run)
--listen-host Binding IP
–listen-port svn default port is 3690, 9231 means use 9231 port, you can replace the port you need. Note, however, that using the port under 1024 requires root permission, and if the firewall is turned on, you need to open the port number 9231
-r/home/svn/svndata Specify root directory

2) Run with Root account:
svnserve-d-r/home/svn/svndata--listen-host 192.168.1.123--listen-port 9231

To check the process:
Ps-ef | grep svnserve

Initialize the warehouse directory structure:
Attention:
The last set on the server does not save the clear text password before importing
The plaintext password for the domain SVN account is not saved on the server:
VI ~/.subversion/servers
[Globals]
Store-plaintext-passwords = no #将会不保存明文密码

Cd/home/svn
Mkdir-p Svntmp/{tag,trunk,branch}
CD svntmp
SVN import. Svn://192.168.1.123:9231/test-m "Initiate test Repo"

SVN import. Svn://192.168.1.123:9231/test-m "Initiate test Repo"
Certification field: <svn://192.168.1.123:9231> test
Password for "root":
Certification field: <svn://192.168.1.123:9231> test
User name: Test_user
Password for "Test_user":
is increasing trunk
is adding tag
is increasing branch

The submitted version is 1.

The saved password file will be under/root/.subversion/auth/svn.simple/, and if it goes wrong, you can delete the following file
Here is: Rm-f/root/.subversion/auth/svn.simple/65a1691730312e1e9518fb1144380e28

And then re-execute Import
echo "svnserve-d-r/home/svn/svndata--listen-host 192.168.1.123--listen-port 9231" >>/etc/rc.local

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.