Install, configure, and start SVN in Linux (CentOS 6.5)

Source: Internet
Author: User

Install, configure, and start SVN in Linux (CentOS 6.5)

Install, configure, and start SVN in Linux (CentOS 6.5)

Preparations: yum

1. Check whether the installation is complete.

Rpm-qa subversion

To uninstall the old version:

Yum remove subversion


2. Installation

Yum install subversionPS: yum install httpd-devel subversion mod_dav_svn mod_auth_mysql, it doesn't matter if you install more)

3. Check whether the installation is successful.

Svnserve -- version

If successful, the version number is output.

4. Create a repository directory
For example:

Mkdir/home/svn/game


5. Create a project

Svnadmin create/home/svn/game


6. Check whether the creation is successful.

Cd/home/svn/game
Ll

If it succeeds, several more folders will be added to the game directory.


7. Go to the conf directory and you will see three configuration files. The generated files are annotated in English.
Sample requirements:

Planning Group: open planning, art reading and writing
Backend group: Enable backend read/write and plan read-only
Front-end group: open front-end read/write, planning, art read-only
Art group: Open art read/write, planning read-only
Administrator group: all read/write

Authz: user permission Configuration
Example:

[Groups]
# Management Group
Manager = boss
# Server user group
Server = server1, server2
# Client User Group
Client = client1, client2
# Art Group
Art = art1, art2
# Planning Group
Design = design1, design2
[Game:/]
Manager = rw
[Game:/server]
@ Server = rw
[Game:/client]
@ Client = rw
@ Design = r
@ Art = r
[Game:/art]
@ Design = rw
@ Art = rw
@ Client = r
[Game:/design]
@ Design = rw
@ Server = r
@ Client = r
@ Art = r

Passwd: User Password

[Users]
Boss = 123456
Server1 = 123456
Server2 = 123456
Client1 = 123456
Client 2 = 123456
Armt1 = 123456
Arm2 = 123456
Designing 1 = 123456
Designing 2 = 123456

Svnserve. conf:

# Anonymous visitor Permissions
Anon-access = none
# Verify User Permissions
Auth-access = write
# Password file address
Password-db =/home/svn/game/passwd
# Permission file address
Authz-db =/home/svn/game/authz
# Project name (UUID)
Realm = game


8. Open the svn Port
The default port is port 3690. You can also use another port. Skip this step if enabled

Modify
Iptables-I INPUT-p tcp -- dport 3690-j ACCEPT
Save
/Etc/rc. d/init. d/iptables save
Restart
Service iptables restart
View
/Etc/init. d/iptables status


9. Start the SVN Service

Svnserve-d-r/home/svn

-D: Daemon
-R: svn root directory
Assuming that the IP address of the server is 192.168.1.100, the Access Directory of the game is as follows:

Svn: // 192.168.1.100/game


10. Install the client TortoiseSVN

11. Create a subdirectory
Find a directory on the client PC, and use the Administrator account to remove the game directory from svn: // 192.168.1.100/game, create four subdirectories, namely, art, design, server, and client, and then submit them.
At this time, you can use another group of accounts to test whether the account is normal.

12. After the svn server is installed, it will not start automatically by default. It will be very troublesome to start itself every time you start the server. We can set it to start upon startup.
First, write a STARTUP script svn_startup.sh.
#! /Bin/bash
/Usr/bin/svnserve-d-r/home/svn/The svnserve path here is safe. It is best to write an absolute path because the environment variable may not be loaded at startup.
How to check the absolute path?
Which svnserve

There may be another problem here. If you establish and write in windows, you may not be able to execute it after using vi or vim in linux. This is a problem with the file format.

Vi svn_startup.sh

Input: set ff press ENTER

If the displayed result is not fileformat = unix

Enter again

Set ff = unix

OK.

Then modify the execution permission of the script.

Chmod ug + x svn_startup.sh

Or omnipotent

Chmod 777 svn_startup.sh

Finally, add auto run

Vi/etc/rc. d/rc. local
Add the script path at the end, for example:
/Root/svn_startup.sh

Now, you can restart it. How can I confirm the success? Lost to you

Ps-ef | grep svnserve

A lot of work

Set up SVN server svn in Ubuntu 14.04 ://

CentOS 6.2 SVN setup (YUM installation)

Deploy Apache + SVN in CentOS 6.5

Build an SVN server using Apache + SVN

Set up and use the SVN server in Windows + reset the password on the client

Install SVN in Ubuntu Server 12.04 and migrate Virtual SVN data

Build svn service and migration method on Ubuntu Server

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.