1. svn server installation operating system: linux redhat, get the svn installation package:
wget http://subversion.tigris.org/downloads/subversion-1.6.6.tar.gz (this is the source file) wget http://subversion.tigris.org/downloads/subversion-deps-1.6.6.tar.gz (this is the installation dependency file)
2. Decompress the two files into the same directory
tar xfvz subversion-1.6.6.tar.gz tar xfvz subversion-deps-1.6.6.tar.gz
3. Enter the unzipped subversion directory
cd subversion-1.6.6
4. Configure the settings and specify the installation directory ( /opt/subversion is my installation directory )
./configure --prefix=/opt/subversion
5. Execute make to compile
make
6. Execute make install to install.
make install
7. Add environment variables
vi / etc / profile
Add at the end of the file:
SVNPATH=$PATH:/opt/subversion/bin export SVNPATH
8. Test whether SVN is successfully installed and execute
svnserve --version
9. Create a repository directory (I customize it)
mkdir –p /opt/svndata/repos
10. Create the svn repository (corresponding to the directory defined above)
svnadmin create /opt/svndata/repos
After executing this command, the following files will be generated in the /opt/svndata/repos directory
11. Enter the conf directory (the svn repository configuration file)
The authz file is the permission control file
passwd is the account password file
svnserve.conf SVN service configuration file
12. Set account password
vi passwd
Add users and passwords in the [users] block, in the format: account=password,
[users]
cxj = 111111
pkj = 111111
13. Set permissions
vi authz
Add the following code at the end:
[/]
cxj=rw
pkj=r
It means that the root directory account cxj of the repository has read and write permissions to it, and pkj has only read permissions.
14. Modify the svnserve.conf file
vi svnserve.conf
Open a few comments below:
anon-access = read # Readable by anonymous users
auth-access = write #Authorized users can write
password-db = passwd #Which file is used as the account file
authz-db=authz #Which file to use as the authority file
realm = /opt/svndata/repos # Authentication space name, the directory where the repository is located
15. Start the svn repository
svnserve -d -r /var/svn/svnrepos
16, Add file permissions (everyone has read, write and execute permissions)
chmod -R 777 /var/svn/svnrepos
17. Add ports to the firewall
vi /etc/sysconfig/iptables
Copy the following code in the middle (skip if there is one):
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3690 -j ACCEPT restart the firewall
service iptables restart
18. Visit svn://ip refer to: http://blog.sina.com.cn/s/blog_83b5069901019b9a.html http://www.cnblogs.com/cugb-2013/p/3716801.html