I. References
Http://wiki.centos.org/HowTos/Subversion
Ii. Prerequisites
1. Because you need to download the installation package from the network, ensure that the network is smooth.
2. Have a certain understanding of Linux. By default, this article completes installation under the root account.
Iii. Installation
1. install Apache
Run Yum install-y httpd.
2. Install Subversion
Run Yum install-y mod_dav_svn subversion.
Iv. Configuration
1. Configure Apache
Apache does not support remote access by default.
A. Modify httpd. conf to direct servername to the IP address of the local machine, for example, 192.168.188.129. Then enter the Command Service httpd restart to restart the aapche service.
B. configure the firewall so that port 80 of the local machine can be remotely accessed.
Run the following commands in sequence:
/Sbin/iptables-I input-P TCP -- dport 80-J accept
/Etc/rc. d/init. d/iptables save
/Etc/init. d/iptables restart
If you enter http: // 192.168.188.129/in the client browser, the following page shows that Apache configuration is successful. Cheers ~~
2. Configure Subversion
A. Modify the Apache configuration file of subversion
Enter the command VI/etc/httpd/CONF. d/subversion. conf, modify the configuration as follows. The configuration here mainly includes two aspects: one is the permission configuration file, such as/etc/SVN-auth-Conf,
The other is location configuration. For example, you can access SVN through http: // 192.168.188.129/repos/{repository }.
B. Add account permission Configuration
Htpasswd-CM/etc/SVN-auth-conf {username}
Username is the name of the created account. Enter the password according to the command line prompt.
C. Create a repository, such as mylib
CD/var/WWW
Mkdir SVN
CD SVN
Svnadmin create mylib
Chown-r Apache. Apache mylib
Service httpd restart
V. Test
Use the svn tool on the client to view http: // 192.168.188.129/repos/mylib. If you are prompted to enter the user name and password, the svn service is successfully installed.