Download the source Package
1.1 Subversion Source Package http://subversion.apache.org/download/
1.2 Downloads Sqlite-amalgamation
Version subversion-1.8.9.tar.gz is used here
Sqlite-amalgamation-201408010140.zip
2. Please refer to http://my.oschina.net/u/234018/blog/297849 installation Apr apr-util Apache
3. Unzip the installation
TAR-ZXVF subversion-1.8.9.tar.gz wget Http://www.sqlite.org/sqlite-amalgamation-3071501.zip Unzip Sqlite-amalgamation-3071501.zip mkdir/home/devtac/soft/subversion-1.8.9/sqlite-amalgamation CP./ sqlite-amalgamation-3071501/*/home/devtac/soft/subversion-1.8.9/sqlite-amalgamation./configure--prefix=/usr/ Local/subversion--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util--with-apxs=/usr/local/apache/bin/ APXS--with-openssl--enable-maintainer-mode make make and install
4. Check if the installation is successful
[[email protected] data]# cd /usr/local/subversion/bin/[[email protected] bin]# pwd/usr/local/subversion/bin[[email protected] bin]# ll Total Dosage 6780-rwxr-xr-x 1 root root 4580966 8 Month 5 13:55 svn-rwxr-xr-x 1 root root 211775 8 Month 5 13:55 svnadmin-rwxr-xr-x 1 root root 163522 8 Month 5 13:55 svndumpfilter-rwxr-xr-x 1 Root root 222480 8 Month 5 13:55 svnlook-rwxr-xr-x 1 root root 162722 8 Month 5 13:55 svnmucc-rwxr-xr-x 1 root root 495959 8 Month 5 13:55 svnrdump-rwxr-xr-x 1 root root 683761 8 Month 5 13:55 svnserve-rwxr-xr-x 1 root root 289204 August 5 13:55 svnsync-rwxr-xr-x 1 root root 115601 8 Month 5 13:55 svnversion[[email protected] bin]# svnserve -- Versionsvnserve, Version 1.6.11 (r934486) compiled in apr 12 2012,11:09:11 all rights reserved (C) 2000-2009 collabnet. subversion is an open source software, see < http://subversion.tigris.org/ site. This product contains software developed by collabnet (http://www.Collab.Net/) . The following repository backend (FS) modules are available: * fs_base : modules can only operate the BDB repository. The * fs_fs : module works with the text file (FSFS) repository. cyrus sasl authentication is available.
5 Subversion config environment variable (can not execute Subversion command under Subversion Bin directory)
Cp/etc/profile/etc/profile.bak.20140805vi/etc/profile file finally added svnpath= $PATH:/usr/local/subversion/binexport Svnpath
6. Create a warehouse
Svnadmin can only create a one-level directory, if directly execute
Mkdir-p/home/devtac/svn/case
Sometimes error when using client checkout in the back
Error: Expected file system format between "1" to "4"; Discovery format "6"
Positive solution:
Cd/home/devtacmkdir Svnsvnadmin Create/home/devtac/svn/case
Once created, you have the following directories.
[[email protected] bin]# Cd/home/devtac/svn/case/[[email protected] case]# ll total dosage 24drwxr-xr-x 2 root root 4096 August 5 16: Confdrwxr-sr-x 6 root root 4096 August 5 16:45 db-r--r--r--1 root root 2 August 5 16:36 formatdrwxr-xr-x 2 root root 40 96 August 5 16:36 hooksdrwxr-xr-x 2 root root 4096 August 5 16:36 locks-rw-r--r--1 root root 229 August 5 16:36 README.txt
7 Modifying a configuration file
Main changes/home/devtac/svn/case/conf
[Email protected] conf]# pwd/home/devtac/svn/case/conf[[email protected] conf]# lsauthz passwd svnserve.conf svnserve.c Onf.bak[[email protected] conf]# ls-al total dosage 24drwxr-xr-x 2 root root 4096 August 5 16:41. drwxr-xr-x 6 root root 4096 August 5 16:36.. -rw-r--r--1 root root 1144 August 5 16:37 authz-rw-r--r--1 root root 350 August 5 16:38 passwd-rw-r--r--1 root root 3995 8 Month 5 16:41 svnserve.conf-rw-r--r--1 root root 2279 August 5 16:37 Svnserve.conf.bak
Main changes
Svnserve.conf
Anon-access = None (anonymous user cannot access)
auth-access = Write (authenticated user readable writable)
Password-db = passwd (user password file)
Authz-db = Authz
Detailed explanation Please read the configuration file svnserve.conf Note
Attention:
# # # users has read and write access to the repository.anon-access = none auth-access = Write
Auon-access Front cannot have the space, auth-access also cannot have, svnserve.conf each line modifies the line capital not to have the space
Otherwise, after the client checkout will be error.
passwd Configuring the account password
[e-mail protected] conf]# more passwd # # # # This file was an example password file for svnserve.### It format is similar to That's svnserve.conf. As shown in the### example below it contains one sections labelled [users].### the name and password for each user follow, One account per line. [users]# Harry = harryssecret# sally = sallyssecretadmin = Admintac = Lovelifetest = Test
Authz Configure permissions as follows
[[Email protected] conf]# more authz### 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### ("). [Aliases]# 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,&joeuser = admin,tac,test# [/foo/bar]# harry = rw# &joe = r# * =# [repository:/baz/fuz]# @harry_and_sally = rw# * = r[/]user = rwadmin = rwtac = rwtest = r
Configuration file is temporarily modified
8. Import code library to warehouse
1423 mkdir-p/tmp/data/1424 echo ' 1111 ' >/tmp/data/index.html 1425 echo ' 2222 ' >/tmp/data/2.html 1426./svn im Port/tmp/data/file:///home/devtac/svn/case-m "Testttttttest"
9. Installing the Client
Tortoisesvn-1.8.7.25475-x64-svn-1.8.9.msi
Ten. Checkout
10.1 Add the SVN default port to iptables first on the server side
Restart Iptable
10.2 Start SVN
Svnserve-d-r/home/devtac/svn/case
10.2 Client Checkout
My side of the URL reads:
svn://192.168.2.241
Completed
Thank you Network Gentlemen