SVN configuration – Server side (Linux) this tutorial configuration instructions
- Objective: To achieve unified code management
1. Download the required source code package
Files such as subversion-deps-1.6.17.tar.gz SVN support Library
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.17.tar.gz
Subversion-1.6.17.tar.gz SVN's main program
wget http://subversion.tigris.org/downloads/subversion-1.6.17.tar.gz
2. Source code compilation and installation
These two are going to be unpacked in the same directory.
tar zxvf subversion-deps-1.6.17.tar.gz tar xvf subversion-1.6.17.tar.gz cd subversion-1.6.17 ./configure --prefix=/opt/svn
Compiling the source code:
make make install
3. Configure Environment variables
In/etc/profile last add:
PATH=$PATH:/opt/svn/bin
Detect if the installation was successful
svnserve --version
Displaying the following information indicates that the installation was successful.
svnserve, version 1.6.17 (r1128011) compiled Mar 23 2012, 16:57:41
4. Create an SVN repository
A. Creating an SVN library TESTSVN
mkdir /var/svn
B. Enter the SVN directory
cd /var/svn
C. Create a TESTSV directory
create testsv
D. After successfully creating the warehouse TESTSV, you can view the relevant directory under the warehouse.
cd testsv ls
In the warehouse TESTSV, if you can see the following directory, the warehouse was created successfully:
Conf db format Hooks Locks README.txt
To view the configuration file for a warehouse:
cd conf/ ls
There are three configuration files for the View warehouse:
Authz passwd svnserve.conf
5. Configure Repository Information # #
A. Configuring svnserve.conf
Under the Conf directory, edit:
vi svnserve.conf
Add the following code:
[general] anon-access = none auth-access = write password-db = passwd authzauthz-db = authz realm = testsv[sasl]
Note:
* Main add Authz, passwd path, and the name of the library
* This path refers to a relative path, which refers to the current repository under the Conf directory. If necessary, you can set the path to an absolute path
B. Defining user passwords
vim /var/svn/testsv/conf/passwd
Add the following:
[users] #这个是原文件中就有的哟~wzf = 123456 testuser = testsv123456testuser1 = 123456
Meaning: "=" to the left is the user name, "=" to the right is the password for that user name. Only users under this file are eligible to log in to the repository.
C. Define Repository access rights
Edit Authz
vi /var/svn/testsv/conf/authz
Edit as follows:
[aliases] Average[groups]admin=wzfusers=testuser,testuser1 [/]*= @admin=rw@users=r
Meaning explanation
* Define the Admin group, the members under this group include WZF
* Define the Users group, under which members include Testuser,testuser1
* Multiple members separated by "," can not be divided into a specific group of users
* Admin group members in repository root/under have read ' R ' and write ' W ' right
* Members of the Users group are only entitled to read ' r ' in the repository root directory
* In addition to the admin and Users group members, other users in the repository root directory/do not have any rights
6. SVN Start-up
Create a user to start SVN
useradd svn passwd svn
Follow the prompts to set a password for the user svn
7. Set up Warehouse Group # #
Allow user svn access to Repository
-R svn:svn /var/svn
8. Start SVN
Start with a set account
-d -r /var/svn/ --listen-port 9999
which
Su svn means to start svn as user svn
-d means running in daemon (background run)
–listen-port 9999 means using 9999 ports, which you can replace with the ports you need. But note that using the end of 1024 or less
Port requires root access
-r specifies that the root directory is/VAR/SVN
Client (Windows): 1. Install the Windows client
If there is no TORTOISESVN client, you can go here to download: tortoisesvn.net/downloads.html, according to their actual situation to download the corresponding version, click here to download TORTOISESVN client.
2. Local synchronous Warehouse Code
- Select a local folder to hold the code downloaded from the server.
- Then right click on this folder and select "SVN CheckOut ...".
3. Log in to the warehouse
Fill in the warehouse address (URL), other places can not be modified. Version can be modified to indicate the beginning of the specified version number.
* The URL in this article is svn://10.10.108.107:9999/testsv/)
After clicking OK
* Enter account number, password can be
Specific reference TORTOISESVN client use method
SVN configuration – Server side (Linux)