First, compile and install SVN
1. First prepare the required installation package
Yum-y install gcc gcc-c++ glib* expat expat-devel
2. Download the required installation package (these packages are all stored in the/app/wodsy/soft/directory)
Subversion-1.6.1.gz
Apr-1.5.1.tar.gz
apr-util-1.5.3.tar.bz2
Sqlite-amalgamation-3071501.zip
3. Create SVN installation directory and APR installation directory
Mkdir-p/app/wodsy/subserver
Mkdir-p/APP/WODSY/APR
4. Create SVN Storage Data Directory
Mkdir-p/app/wodsy/svndata
5. Enter/app/wodsy/soft/to install Apr and apr-util compilation
(1)./configure--prefix=/app/wodsy/svndata/repos/--with-apr=/app/wodsy/apr/--with-apr-util=/app/wodsy/apr/ (Compile and install APR)
(2)./configure--prefix=/app/wodsy/svndata/repos/--with-apr=/app/wodsy/apr/--with-apr-util=/app/wodsy/apr/ (Compile and install apr-util)
(3) Extract the Sqlite-amalgamation-3071501.zip to the current directory and rename it to Sqlite-amalgamation
(4) Extract the subversion-1.6.1.gz to the current directory
(5) will sqlite-amalgamation copied to the extracted
in the >subversion-1.6.1 directory
./configure--prefix=/app/wodsy/subversion/--with-apr=/app/wodsy/apr/--with-apr-util=/ app/wodsy/apr/
make && make install
7, viewing these files in the Subversion directory and viewing the version number indicates that the installation was successful
(1) ls/app/wodsy/subversion/
Bin include Lib share (with these directories)
(2) cp-rf/app/wodsy/subversion/bin/svn*/usr/sbin/(add SVN command to System command)
(3) svnserve--version
Svnserve, version 1.6.1 (r37116) (1.6.1)
Compiled Nov 4 2014, 20:48:43
8. Create SVN repository Directory
Svnadmin Create/app/wodsy/svndata/repos
9, start the SVN service to test access to
(1) svnserve-d-r/app/wodsy/svndata (Start svn command)
svnserve-d-r/app/wodsy/svndata --listen-port=8899 (can also add ports to start SVN) span>
(2) Anonymous access test on client
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/59/F4/wKioL1TxYbmD6yNpAAB5ILWRy2A888.jpg "title=" Tmi4xxblv%pt8th~%zfhun9.png "alt=" wkiol1txybmd6ynpaab5ilwry2a888.jpg "/>
This screen shows you can access the SVN service
10. Configure SVN path
(1) Wearing a password file and directory file storage directory
Mkdir-p/app/wodsy/svn/conf
(2) edit this directory vi/app/wodsy/svndata/repos/conf/svnserve.conf
Uncomment the next two lines and do not allow spaces before
Anon-access = None does not allow anonymous users to log on
auth-access = Write Open permission
Uncomment the following two lines and add the password file and verify the file path (you can also use the default path)
Password-db =/app/wodsy/svn/conf/pwd.conf
Authz-db =/app/wodsy/svn/conf/authz.conf
11. Enter the/app/wodsy/svn/conf/directory to create the pwd.conf and authz.conf files
VI pwd.conf
[Users] (User name and user password are stored here)
Test1 = zxk123456
Test2 = fhf123456
Test3 = kfw123456
Test4 = gy123456
TEST5 = st123456
.......
VI authz.conf
[Groups] "groups" represents a group
web = test1,test2 [web] represents the group name, followed by the user
App = Test3,test4
admin = test5
.....
[/] "/" means repos repository directory
@admin = RW "@admin" indicates that users in the Administrators group have read and write access to the root directory
[/web] "/web" represents the project directory under the Repos/web repository
@web = RW "@web" means that users in the Web group have read and write permissions only to the Web directory and no permissions to other directories
........
Note: directories such as "/web" need to be created in advance on the client, added to the configuration file, and the SVN service will take effect.
12, at this time to visit the need to add a user name and password to have access to the appropriate directory
"Access to the repos directory directly, for example: svn://192.168.112.128/repos"
Second, the SVN data backup and migration
1. SOURCE Server: A
Use the Svnadmin dump command to back up the SVN repository on the source server into a single file Svn_bak
To back up the/app/wodsy/svndata/repos library to a Svn_bak file, proceed as follows:
Svnadmin Dump/app/wodsy/svndata/repos >/root/svn_bak
and upload the Svn_bak file to the B server.
2. Target server: B
Please install the SVN service on the target server first.
Restore the SVN repository as follows:
Svnadmin Load/app/wodsy/svndata/repos </root/svn_bak
Remember: Svnadmin load repository, the library must be clean, that is, (Svnadmin Create/app/wodsy/svndata/repos) after the new.
Note: If you need to modify the authz.conf file as part of the repository directory structure on both sides
Copy the pwd.conf and authz.conf files to the destination server, and the directory structure must be the same
The import succeeds and the restore is complete.
Linux compilation Install SVN 1.6.1