1. installation 1. Download: subversion-1.6.11.tar.gzand subversion-deps-1.6.11.tar.gz eg: wgethttp: // container
I. Installation
1. Download:
Subversion-1.6.11.tar.gzand subversion-deps-1.6.11.tar.gz
Eg:
Wget http://subversion.tigris.org/downloads/subversion-1.6.11.tar.gz
Wget http://subversion.tigris.org/downloads/subversion-deps-1.6.11.tar.gz
2. installation:
Tar zxvf subversion-1.6.11.tar.gz
Tar zxvf subversion-deps-1.6.11.tar.gz
Cd subversion-1.6.11/
./Configure -- prefix =/usr/local/svn
Make & make install
3. Set environment variables:
Su-
PATH = $ PATH:/usr/local/svn/bin
Export PATH
Svnserve -- version
Ii. repository and permission Configuration
1. Create the svn root directory and a repository directory
Mkdir-p/home/svnadmin/svnroot #-p create parent dir, if not exists.
Cd/home/svnadmin/svnroot
Mkdir implements ource
Svnadmin create/home/svnadmin/svnroot/javasource # create a warehouse
2. Prepare test data
Mkdir-p/home/svnadmin/svndataroot
Cd/home/svnadmin/svndataroot
Mkdir implements ource
Cd javasource
Mkdir trunk
Mkdir final
Cd trunk
Mkdir helloworld
Cd helloworld
Mkdir src
Cd src
Vi HelloWorld. java
Cd/home/svnadmin/svndataroot/javasource
3. Import the test data to the warehouse.
Svn import./file: // home/svnadmin/svnroot/javasource-m "some info"
Note: After data is imported, the source data is useless and can be deleted.
4. Permission Configuration
Vi/home/svnadmin/svnroot/javasource/conf/svnserve. conf
[General]
Anon-access = none
Auth-access = write
Password-db = passwd
Authz-db = authz
Vi/home/svnadmin/svnroot/javasource/conf/authz
[Groups]
Admin = svnadmin
Pms = hymer, howard
[Export ource:/trunk]
@ Admin = rw
@ Pms = rw
* =
[Explorource:/final]
@ Admin = rw
@ Pms = r
* =
Vi/home/svnadmin/svnroot/javasource/conf/passwd
[Users]
Svnadmin = svnadmin
Hymer = hymer
Howard = howard
Iii. Start and Stop the svn Server
1. Start the server
Svnserve-d-r/home/svnadmin/svnroot
2. Stop the server
Su-
Killall svnserve
Iv. Suggestions and references
Generally, SVN is used as a large warehouse, not only for storing code, but also for storing doc and other materials. Of course, it is best to use document materials. Here, both code and doc are called warehouses.
It is reasonable and convenient to use the same user and permission management file to manage the entire svn system. Therefore, we recommend that you:
1. Place the authz and passwd files under svnroot and rename them as hidden files. authz and. passwd;
2. perform unified permission and user password configuration in the. authz and. passwd files;
3. In the conf/svnserve. conf file of each warehouse, Set
Password-db = passwd
Authz-db = authz
To:
Password-db = ../. passwd
Authz-db =.../. authz
4. Restart svn:
Su-
Killall svnserve
Svnserve-d-r/home/svnadmin/svnroot