Article Title: configure the SVN server under Fedora10. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Install subversion:
Yum install subversion. i386
(Note: You need to install urpmi subversion-server subversion-tool under mandriva)
2. Create a subversion database and modify its permissions.
# Mkdir-p # SVNPATH/repos
# Svnadmin create # SVNPATH/repos/project1
3. Start the subversion service and set the version library location
# Svnserve -- daemon -- root = # SVNPATH/repos -- listen-port = 3690
Note: the root user is not recommended to start the service. The default port number is 3690.
4. # yum list mod_dav_svn
Note: mod_dav_svn-related packages mod_dav_svn.i386 and mod_dav_svn.i386 can be found.
# Yum install mod_dav_svn.i386
Note: After the installation is complete, the subversion. conf file is automatically generated in the/etc/httpd/conf. d folder, and the following two lines are automatically added:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
Change the content between... and as follows:
DAV svn
SVNPath # SVNPATH/repos/project1
5. Restart the Apache service.
# Apachectl restart
6. Modify SELINUX Permissions
# Chcon-R-h-u system_u-t httpd_sys_content_t # SVNPATH/repos
7. You can use # lsof-I: 3690 to check whether it is enabled.
8. modify the configuration file/home/svnroot/repository/conf/svnserve. conf.
[General]
# Anonymous access permission, which can be read, write, or none. The default value is read.
Anon-access = none
# Authenticate the user's permissions, which can be read, write, or none. The default value is write.
Auth-access = write
# Remove the path of the password database #
Password-db = passwd
# User operation permissions #
Authz-db = authz
Modify the configuration file passwd
[Users]
User = passwod
User1 = password1
Modify the configuration file authz
[Test1:/]
User = rw
[Test1:/doc]
User1 = rw
9. For a single code repository
Start command svnserve-d-r/home/svnroot/repository/test1 -- listen-host 192.168.1.18
-D Indicates running in the background, and-r specifies the root directory of the server, so that you can directly access the server using svn: // server ip address. If the server has multiple ip addresses, use listen-host to specify the ip address of the listener.
We can access the svn server through svn: // 192.168.1.18 on the svn client.
For multiple code repositories, you can use the-r option to specify the server root directory at startup. However, when accessing the repository, you must specify the relative path of Each repository relative to the svn root directory.
For example, we have two code repositories:/home/svnroot/repository/test1 and/home/svnroot/repository/test2, we use svnserve-d-r/home/svnroot/repository -- listen-host 192.168.1.18 to start the service. Then, we can use svn: // 192.168.1.18/test1 and svn during client access: // 192.168.1.200/test2 to access two projects respectively
After the process is started, we can use ps aux | grep svnserv to check whether the svnserve process exists.
10. Open the server port
The default SVN port is 3690. You need to open this port on the firewall.
/Sbin/iptables-a input-I eth0-p tcp -- dport 3690-j ACCEPT
/Sbin/service iptables save
You can also use the -- listen-port option of svnserve to specify an opened port. However, the client must also add a port, such as svn: // 192.168.1.18: 9999 /.
11. yum has an interesting usage: yum whatprovides mod_dav_svn.so
12. To install mod_dav.so in mandriva, you can use urpmi apache-mod_dav_svn