Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Linux SVN installation and configuration graphic tutorials     - Perl loop (Programming)

- Ubuntu 14.04 LTS compiler installation R Source Code (Linux)

- ActiveMQ5.11.1 and JDK version matching relation (Linux)

- Oracle Incident Packaging Service (Database)

- numpy and SciPy installation under Python for scientific computing package (Linux)

- Lucene Getting Started Tutorial (Server)

- The Linux kernel and AVL tree in red-black tree (Programming)

- How to set up HTTPS policies for older browsers (Server)

- The three-way division of the sorting algorithm Quicksort (Programming)

- Alternative methods of intrusion bundled executable file new thinking (Linux)

- After Pydev installation, Eclipse does not display solutions (Linux)

- Ubuntu 10.04 to Ubuntu 10.10 Upgrade (Linux)

- Spring use Cache (Programming)

- Linux common network tools: batch scanning of nmap hosting service (Linux)

- In the case of using cgroups Ubuntu 14.04 and Docker (Linux)

- MySQL 5.6 database code changes (Database)

- JavaScript original values and complex values (Programming)

- Go performed using iOS and Android programming (Programming)

- Grub2 Boots the openSUSE installation image (Linux)

- Update GAMIT10.6 command (Linux)

  Linux SVN installation and configuration graphic tutorials
  Add Date : 2018-11-21      

Taiwan has its own cloud server, usually some learning materials wanted by SVN to manage the Internet to find a lot of Linux build svn tutorial, but not a complete and total feel a little something missing or wrong themselves behind after a comprehensive and Compare and multiple servers above test, made the following tutorial for reference later.

svn server has two operating modes

1. The stand-alone server (for example: svn: //xxx.com/xxx);
2. With apache. (For example: http: //svn.xxx.com/xxx);
 In order not to depend on apache, the first option - independent svn server.
svn version of the data stored there are two ways:
 BDB way because the server is interrupted, it is possible to lock the data (when engaged ldap to suffer, not to cure), they still FSFS safer way, I also choose this way.
My system environment: CentOS-6.2 + Php-5.4.3 + Nginx-1.3.0 + Mysql-5.5.25 + subversion-1.6.6

Download software

wget http://subversion.tigris.org/downloads/subversion-1.6.6.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.6.tar.gz


1. Check to see that the svn tool
 Command: rpm -qa | grep subversion
If the server is already installed you do not need to install, if you can not install a new installation
2, the first detection system has not been installed SSL:
find / -name opensslv.h
If you do not, you run the following command to install:
yum install openssl
 yum install openssl-devel
After installation find / -name opensslv.h command to locate the directory where opensslv.h that following -with-openssl = path behind,
3, extract svn installation files
Command is as follows:

tar zxvf subversion-1.6.6.tar.gz
tar zxvf subversion-deps-1.6.6.tar.gz

to extract the tar command, zxvf parameters tar command to extract the tar.gz compressed file format.
 Generate subversion-1.6.6 subdirectory after decompression, two compression decompression will be automatically placed in this directory, without having to manually change.
 Enter decompression subdirectory cd subversion-1.6.6 to compile.
4, the compiler:

./configure --prefix = / usr / local / svn --with-openssl = / usr / include / openssl

Svnserve to run back, so do not add apache compile parameters. Fsfs format to store the repository does not compile berkeley-db
If the compiler Times the following error:
no acceptable C compiler found in $ PATH
Description no gcc library, and then use the following command to install gcc compiler:
yum -y install gcc
If last seen following WARNING, we should simply be ignored, because they do not use BDB storage.

configure: WARNING: we have configured without BDB filesystem support
You do not seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL. We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end. You can find the latest version of
Berkeley DB here:


 make install
If the make install the following error occurs:
/home/upload/subversion-1.6.6/subversion/svnversion/.libs/lt-svnversion: error while loading shared libraries: libiconv.so.2: can not open shared object file: No such file or directory
 make: *** [revision-install] Error 127
1, edit /etc/ld.so.conf file
vi /etc/ld.so.conf
Add the following line of code
/ Usr / local / lib
 2, save running ldconfig:
/ Sbin / ldconfig
NOTE: ld.so.conf and ldconfig is used to maintain the system dynamic link library.
3, then install
make && make install
Test whether the installation was successful

/ Usr / local / svn / bin / svnserve --version

If shown below, svn successful installation:

svnserve, version 1.6.6 (r40053)
  compiled Dec 25 2012, 13:14:38
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet
The following repository back-end (FS) modules are available:
* Fs_fs: Module for working with a plain file (FSFS) repository.
Cyrus SASL authentication is available.

4, in order to facilitate the next operation, the svn command added to the environment-related variables:
echo "export PATH = $ PATH: / usr / local / svn / bin /" >> / etc / profile
 source / etc / profile

Configuration svn

1, to establish the root of SVN
mkdir -p / opt / svn /
 2, the establishment of a product warehouse
mkdir -p / opt / svn / tshop /
 svnadmin create / opt / svn / tshop /
If you have more than one R & D center product group, for each product group can create a SVN repository
3, a modified version of the configuration file library
vi /opt/svn/tshop/conf/svnserve.conf
Content files revised as follows:

### This file controls the configuration of the svnserve daemon, if you
### Use it to allow access to this repository. (If you only allow
### Access through http: and / or file: URLs, then this file is
### Irrelevant.)
### Visit http://subversion.tigris.org/ for more information.
### These options control access to the repository for unauthenticated
### And authenticated users. Valid values are "write", "read",
### And "none". The sample settings below are the defaults.
anon-access = none # Note that this must be set, otherwise, all users can access without a password
auth-access = write
### The password-db option controls the location of the password
### Database file. Unless you specify a path starting with a /,
### The file's location is relative to the directory containing
### This configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### Rules for path-based access control. Unless you specify a path
### Starting with a /, the file's location is relative to the the
### Directory containing this file. If you do not specify an
### Authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### Have the same password database, and vice versa. The default realm
### Is repository's uuid.
realm = tshop
### This option specifies whether you want to use the Cyrus SASL
### Library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### Reading 'Cyrus SASL authentication is available.'
# Use-sasl = true
### These options specify the desired strength of the security layer
### That you want SASL to provide. 0 means no encryption, 1 means
### Integrity-checking only, values larger than 1 are correlated
### To the effective key length for encryption (e.g. 128 means 128-bit
### Encryption). The values below are the defaults.
# Min-encryption = 0
# Max-encryption = 256

Modify user profiles take effect immediately, without restarting svn.
4, begin setting passwd user account information

vi / data / svn / repos / conf / passwd
After modifying the contents are as follows:
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### Example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
### Below to add users and passwords, one per line username = password
# Harry = harryssecret
# Sally = sallyssecret
### =========== Here is my add user information ======== #######
iitshare = password1
itblood = password2

5, begin setting authz. User Access
vi / data / svn / repos / conf / authz
After modifying the contents are as follows:

### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### Files.
### As shown below each section defines authorizations for the path and
### (Optional) repository specified by the section name.
. ### The authorizations follow An authorization line can refer to:
### - A single user,
### - A group of users defined in a special [groups] section,
### - An alias defined in a special [aliases] section,
### - All authenticated users, using the '$ authenticated' token,
### - Only anonymous users, using the '$ anonymous' token,
### - Anyone, using the '*' wildcard.
### A match can be inverted by prefixing the rule with '~'. Rules can
### Grant read ( 'r') access, read-write ( 'rw') access, or no access
### ( '').
# Joe = / C = XZ / ST = Dessert / L = Snake City / O = Snake Oil,
        Ltd./OU=Research Institute / CN = Joe Average
# [Groups]
# Harry_and_sally = harry, sally
# Harry_sally_and_joe = harry, sally, & joe
# [/ Foo / bar]
# Harry = rw
# & Joe = r
# * =
# [Repository: / baz / fuz]
# @harry_and_sally = Rw
# * = R
### -------------------- Here I added new ---------------------- - ###
### Masked above [groups] because the following is added
devteam = iitshare, itblood #devteam project team includes two user iitshare, itblood
iitshare = rw
itblood =
[Tshop: / tb2c]
@devteam = rw
itblood =
[Tshop: / tb2b2c]
@devteam = rw
itblood = r

Wherein a user group can contain one or more users, separated by commas between users.

devteam = iitshare, itblood #devteam project team includes two user iitshare, itblood
iitshare = rw #iitshare read and write permissions to the root directory
itblood = #itblood root directory without any permissions
#### If you need to configure tb2c, permission tb2b2c project, provided that the following tshop warehouse requires both projects
#### If not, tshop will not have access to
[Tshop: / tb2c] # of tb2c project tshop warehouse permission control
@devteam = rw # devteam control group read and write permissions to the project tb2c
itblood = # itblood limit all permissions, other users have read and write permissions
[Tshop: / tb2b2c] # of tshop: tb2b2c warehouse project control permissions
@devteam = rw # restrictions devteam group read and write access to the project tb2b2c
itblood = r # itblood only read access restrictions, other users have read and write permissions

6. Note:
* User rights profile name must appear in the user defined profile.
* Modification of the rights profile take effect immediately, without restarting svn.
 User Group Format:

Wherein a user group can contain one or more users, separated by commas between users.
Repository directory format:
[: / project / directory]
@ =

Wherein the inner part of the block number can have a variety of writing:
 [/], And the following represents the root directory, the root directory is svnserve start specified, we specify the / home / svndata, [/] that represents the library set permissions for all versions.
[Tshop: /] expressed repository tshop set permissions;
[Tshop: / abc] expressed repository tshop the abc project set permissions;
[Tshop: / abc / aaa] indicates aaa directory set permissions on the repository tshop of abc projects;
 Permissions body can be a user group, user, or *, the user group in front of the @, * means all users.
 Permissions can be w, r, wr and empty, empty means no access.
7. Establish start svn users
useradd svn
When prompted, set a password for the user svn
 It allows users to access the svn repository:
chown -R svn: svn / opt / svn
 8, start svn:
 One way: svnserve -d -r / opt / svn / # default start port number is 3690
Second way: su - svn -c "svnserve -d -listen-port 9999 -r / opt / svn /"
among them:
su - svn svn represents a user's identity to start svn;
-d represents (background) run in daemon mode;
-listen-port 9999 that the use of port 9999, can be replaced with the ports you need. But note that the use of ports below 1024 requires root privileges;
-r / opt / svn specify the root directory is / opt / svn.
9. Check whether to activate
netstat -tunlp | grep svn
If the following information describes the successful launch
tcp 0 0* LISTEN 10973 / svnserve
 10, will be added to the boot svn
 Edit rc.local file: vi /etc/rc.d/rc.local
Start by adding the following command:
/ Usr / local / svn / bin / svnserve -d -listen-port 9999 -r / opt / svn
 11, if you want to stop svn, use the following command:
killall svnserve
 12, if you want to svn as a service:
 Create a file named svn in the directory /etc/rc.d/init.d/
 And set permissions to 755: chmod 755 /etc/rc.d/init.d/svn
Edit svn file: vi /etc/rc.d/init.d/svn, in which add the following code:

#! / Bin / bash
# Build this file in /etc/rc.d/init.d/svn
# Chmod 755 /etc/rc.d/init.d/svn
Under # centos can use the following commands to manage svn: service svn start (restart / stop)
SVN_HOME = / opt / svn
if [! -f "/ usr / local / svn / bin / svnserve"]
    echo "svnserver startup: can not start"
case "$ 1" in
        echo "Starting svnserve ..."
        / Usr / local / svn / bin / svnserve -d --listen-port 9999 -r $ SVN_HOME
        echo "Finished!"
        echo "Stoping svnserve ..."
        killall svnserve
        echo "Finished!"
        $ 0 stop
        $ 0 start
        echo "Usage: svn {start | stop | restart}"
        exit 1

Then you can start to SVN service svn start (restart / stop) mode.
 Svn access through the web there are many methods, see Configuring websvn method or configuration bsSvnBrowser

Client Access

1, download the installation file
window 64-bit words download: TortoiseSVN-
 window 32-bit words download: TortoiseSVN-
Specific download files can be downloaded from the Internet under a lot of looking
2, through the client access
 At the following address:
svn: // {your-server-ip}: 9999 / tshop / or svn: // {your-server-ip}: 3690 / tshop /
 Do not be accessed in the browser, the following address http ways:
http: // {your-server-ip}: 9999 / tshop / or http: // {your-server-ip}: 3690 / tshop /
That certainly does not work, because you do not configure the http service, the above is to install a separate SVN server

So far Linux build SVN whole process has ended
- Oracle data files deleted recover after physical (Database)
- Hadoop connection failed or stuck processing (Server)
- Interesting example of Linux Sort command (Linux)
- Subquery Oracle study notes (Database)
- DELL D630 Wireless LAN Driver Installation CentOS6 (Linux)
- Hibernate learning introductory tutorial (Programming)
- Use XtraBackup to MySQL database online incremental backup and recovery (Database)
- Git commands (Linux)
- C ++ Supplements --new delete overload (Programming)
- Category prevent DoS attacks against Linux (Linux)
- Necessity in Java packages (Programming)
- Installation and use Docker under Ubuntu 14.04 (Linux)
- Oracle TDE transparent data encryption (Database)
- imp / exp Oracle Database import and export commands (Database)
- How to use Android Studio to play more package names APK (Programming)
- CentOS 6.6 installation certification system based on the ftp service (Server)
- Using Libreoffice under ubuntu (Linux)
- Classical sorting algorithm - Selection Sort (Linux)
- Sturdy build secure Linux server (Linux)
- How to download video youtube-dl in Linux (Linux)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.