A. Yum install svn server
yum -y install subversion
Two detection results of the installation
svnserve --version // display the results of the installation, installation is successful
III. Create a code repository directory
mkdir / var / svn / projectname // Create a new directory
the Create svnadmin / var / svn / ProjectName // svn repository to create the directory
If ll
the repository directory appears as follows several directories and files, it means success
Four. Svn server configuration
has three important configuration files, passwd, authz, svnserve.conf under the code repository conf directory.
-
Modify the passwd file, you add the user name and password
vim passwd passwd file is opened, read as follows [users] username1 = 123456 // format: username = password USERNAME2 = 123456 After writing a user name and password wq save and exit.
-
Authz modify the file, add the user's permission
vim authz authz open the file, read as follows [groups] // format: User-Group = username Developer = username1 // user group 1 was added to develop Designer = USERNAME2 // to add the user to design Group 2 [ProjectName: /] // Configure user permissions for a group project @developer = rw // set to read-write permission to develop group permission set design @designer = r // read only group of
-
Modify the configuration svnserve.conf
anon-access = none // modify anonymous user access the auth -access = // Write remove comments, user rights verification password -db = / var / the svn / ProjectName / the conf / the passwd // remove annotations, set a password file path the authz -db = / var / the svn / ProjectName / the conf / the authz // remove annotations, the file path set permissions realm = ProjectName // set the project name (UUID)
Four open ports svn
svn server using the default port 3690, so port 3690 open, save the settings and restart the firewall:
iptables -I INPUT -p tcp --dport 3690 -j ACCEPT /etc/rc.d/init.d/iptables save service iptables restart
V. start svn service
svnserve -d -r / var / svn
-d: daemon -r: svn root directory
Six svn server access
Windows to download and install TortoiseSVN (Click to download page) After installation is complete, click the right mouse button -> TortoiseSVN-> Repo-browser
Then the following interface, enter the URL in the location of the svn: // ip or Domain / ProjectName then Enter, you are prompted to enter the account password, enter your user name and password, you can access the svn server,