1. Install SVN
yum install -y subversion
2. verify whether the installation is successful
svnserve --version
3. Create an SVN version Library
Mkdir svnsvnadmin create SVN/repo Note: repo is the version library name
4. Configure SVN
After a version library is created, three configuration files are generated under the conf directory of the version Library:
[[Email protected] conf] # PWD/root/SVN/repo/conf [[email protected] conf] # lsauthz passwd svnserve. conf Description: (1) svnserve. conf: SVN service configuration file. (2) passwd: user name and password file. (3) authz: Permission configuration file.
4.1 modify the passwd file
[users]shang=123456li=123456
Note: Shang is the user name and 123456 is the password.
4.2 Use the plaintext password for configuration
VI/$ home/. Subversion/servers # Find the following content, comment out and change it to yes. Store-plaintext-passwords = Yes
4.3 modify the authz File
[groups]team=shang,li [repo:/]@team=rw
Note: The repo is the name of the SVN version library created earlier.
4.4 modify svnserve. conf
[general]anon-access = noneauth-access = writepassword-db = passwdauthz-db = authz
5. Start and Stop svn5.1 start SVN
svnserve -d -r /root/svn/
5.2 close SVN
PS-Aux | grep svnkill-9 process ID
6. Import the project
$ mkdir MyProject$ mkdir MyProject/trunk$ mkdir MyProject/branches$ mkdir MyProject/tagssvn import MyProject svn://192.168.5.228/repo/MyProject -m "first import project"
7. Export the project
svn co svn://192.168.5.228/repo/MyProject
References
1. http://blog.csdn.net/tianlesoftware/article/details/6119231
2. http://hideto.iteye.com/blog/99463
3. http://blog.51yip.com/server/901.html
4. http://codefez.com/creating-projects-in-subversion-trunk-tags-branches/
Build SVN server in centos)