1.Yum Install subversion mysql-server httpd mod_dav_svn mod_perl sendmail wget gcc-c++ make unzip perl* NTSYSV VI m-enhanced
2.mkdir/home/svn//Create a new directory to store all SVN files
3.svnadmin create/home/svn/project//Create a new repository
4.mkdir Project Project/server project/client project/test//(Create temp directory)
SVN import project/file:///home/svn/project-m "Initializing SVN directory"
RM-RF Project (delete the temporarily created directory)
5. Add Users
To add SVN users is very simple, just add a "Username=password" entry in the/home/svn/project/conf/passwd file. To test, I added the following:
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
PM = PM_PW
Server_group = SERVER_PW
Client_group = CLIENT_PW
Test_group = TEST_PW
6. Modify the user access policy
/home/svn/project/conf/authz record the user's access policy, the following is a reference:
[Groups]
project_p = PM
project_s = Server_group
Project_c = Client_group
project_t = Test_group
[project:/]
@project_p = RW
* =
[Project:/server]
@project_p = RW
@project_s = RW
* =
[Project:/client]
@project_p = RW
@project_c = RW
* =
[Project:/doc]
@project_p = RW
@project_s = RW
@project_c = RW
@project_t = RW
* =
The above information indicates that only PM has the root directory read and write rights, Server_group can access the server directory, Client_group can access the client directory, everyone can access the doc directory.
7. Modify the svnserve.conf file to make the user and policy configuration more efficient.
Svnserve.conf content is as follows:
[General]
Anon-access = None
auth-access = Write
Password-db =/home/svn/project/conf/passwd
Authz-db =/home/svn/project/conf/authz
8.
Start the server
# svnserve-d-R/HOME/SVN
9. Testing the server
# SVN Co svn://192.168.119.142/project
CentOS 6.5 Configuration SVN server