Details how to install and configure CentOS 6.3
- 2020-05-14 05:50:59
- OfStack
Installation instructions
System environment: CentOS-6.3
Installation method: yum install (source code installation is prone to version compatibility problems)
Installation software: SVN software is automatically downloaded by the system
Check the installed version
Check if a lower version of SVN is installed
[root@localhost /]# rpm -qa subversion
Uninstall the old version SVN
[root@localhost modules]# yum remove subversion
Install SVN
[root@localhost modules]# yum install httpd httpd-devel subversion mod_dav_svn mod_auth_mysql
Confirm that the svn module has been installed
[root@localhost /]# cd /etc/httpd/modules
[root@localhost modules]# ls | grep svn
mod_authz_svn.so
mod_dav_svn.so
Verify the installation
Verify the installed version of SVN
[root@localhost modules]# svnserve --version
svnserve Version, 1.6.11 (r934486)
Compiled in Jun 23 2012 . 00:44:03
All rights reserved (C) 2000-2009 CollabNet .
Subversion Is open source software, see http://subversion.tigris.org/ Site.
This product consists of CollabNet(http://www.Collab.Net/) Development of software.
The following version library backend (FS) Modules are available :
* fs_base : Module can only operate BDB Version of the library.
* fs_fs : Modules with text files (FSFS) repository 1 The work.
Cyrus SASL Authentication is available.
Code base creation
Once the SVN software installation is complete, you will also need to set up the SVN library
[root@localhost modules]# mkdir -p /opt/svn/repositories
[root@localhost modules]# svnadmin create /opt/svn/repositories
After executing the above command, the repositories library is automatically set up, and the /opt/svn/repositories folder is found to contain conf, db,format,hooks, locks, README.txt files, indicating that an SVN library has been set up.
Configure the code base
Go to the folder conf generated above and configure it
[root@localhost modules]# cd /opt/svn/repositories/conf
User password passwd configuration
[root@localhost password]# cd /opt/svn/repositories/conf
[root@admin conf]# vi + passwd
Modify passwd as follows:
[users]
# harry = harryssecret
# sally = sallyssecret
zhoulf=123456
Permissions control the authz configuration
[root@localhost modules]# yum remove subversion
0
To set which users can access which directories, append the following to the authz file:
[root@localhost modules]# yum remove subversion
1
Service svnserve.conf configuration
[root@localhost modules]# yum remove subversion
2
Add the following:
[general]
# Anonymous access, can be read,write,none, The default is read
anon-access=none
# Enables an authorized user to write
auth-access=write
# The path to the password database
password-db=passwd
# Access control file
authz-db=authz
# The authentication namespace, subversion It is displayed in the authentication prompt and is used as a key in the credentials cache
realm=/opt/svn/repositories
Configure firewall ports
[root@localhost modules]# yum remove subversion
4
Add the following:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT
Save and restart the firewall
[root@localhost modules]# yum remove subversion
5
Start the SVN
[root@localhost modules]# yum remove subversion
6
View the SVN process
[root@localhost modules]# yum remove subversion
7
Detect SVN port
[root@localhost conf]# netstat -ln |grep 3690
tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN
Stop restarting SVN
[root@localhost modules]# yum remove subversion
9
test
The SVN service is up and testing the connection using the client.
Client connection address: svn://192.168.15.231
User name/password: zhoulf/123456
Test actions such as creating folders.