Collect network resources, and summarize to install svn service on centos 6.5 64-bit, and support http access through httpd service.
Note: The following steps are just my order of operations, in no particular order .
1. Install SVN
1. Download the latest version "subversion-1.7.4-0.1.el6.rfx.x86_64.rpm"
2. Upload to the server
3. Execute "rpm -ivh subversion-1.7.4-0.1.el6.rfx.x86_64.rpm" to install
4. Run "svnadmin -version" to check if the installation is successful
Download address: http://pkgs.repoforge.org/subversion/
PS:
1. The solution to the problem of "svnserve.conf:12: Option expected": The leading space of the configuration item in the configuration file needs to be deleted
2. Install httpd service
1. Execute "yum -y install httpd" to install the httpd service. If it does not exist, the system will automatically install it, otherwise it will prompt that it already exists
2. Modify the port number. The default port of httpd is 80. If other programs are already occupied (such as tomcat), you need to modify the port number, open the configuration file "/etc/httpd/conf/httpd.conf", and find "Listen 80" ", modify the following number to the desired port
3. If the firewall is enabled, you need to pass the modified port through the firewall.
4. Service settings start "chkconfig httpd on" at boot. You can use "chkconfig --list" to view "httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off" (2-5 is on), indicating that the setting is successful
5. Start the service "/etc/init.d/httpd start|restart".
5. Access "http://ip:port" locally or in the LAN, and if "Apache 2 Test Page" is displayed, the installation is successful.
PS:
Configuration file: /etc/httpd/conf/httpd.conf
Other configurations: /etc/httpd/conf.d -- configuration files for other programs, such as SVN's subversion.conf
Program directory: /var/www/html
Log directory: /ver/log/httpd
3. Create SVN library
1. After installing SVN, you can configure the SVN library
2. Create the main directory "/svndata" of the SVN library
3. Enter the main directory of the SVN repository and execute "svnadmin create repository"
4. Enter the "/svndata/repository/conf" directory to configure the svnserve configuration file,
anon-access = none #Access permissions for anonymous users, none: not allowed, read: read-only, write: read-write
auth-access = write #Access rights of the logged in user, none: not allowed, read: read-only, write: read-write
password-db = passwd #password file path
authz-db = authz #Authentication file path
realm = web #Authentication reminder message
5. Execute the "svnserve -d -r /svndata" command to start the svn library
6. Execute "mkdir -p /tmp/svn" to create the checkout directory
7. Execute "svn --username uname --password passwd co svn://ip/repository repository/" to confirm whether the checkout operation is successful to check whether the service is normal
4. Install mod_dav_svn
1. Download the latest version "mod_dav_svn-1.7.4-0.1.el6.rfx.x86_64.rpm"
2. Upload to the server
3. Execute "rpm -ivh mod_dav_svn-1.7.4-0.1.el6.rfx.x86_64.rpm" to install
4. Run "svnadmin -version" to check if the installation is successful
Download address: http://pkgs.repoforge.org/subversion/
Configuration:
Add the following before the file:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
LoadModule dontdothat_module modules/mod_dontdothat.so
Remove some comments and add the following
<Location /svn>
DAV svn
SVNParentPath / var / www / svn
AuthType Basic
AuthName "Administrator:[email protected]"
AuthzSVNAccessFile /usr/local/subversion/conf/authz.conf
AuthUserFile /usr/local/subversion/conf/authz
Require valid-user
</Location>
in
The "authz.conf" file is the authz file of the svn library
The authz file is generated by the following command
Generate files and add users: htpasswd -cb /usr/local/subversion/conf/authz uname passwd
Add user: htpasswd -b /usr/local/subversion/conf/authz uname passwd
5. Thanks to the following authors for their methods:
1. Apache+SVN to build SVN server: http://www.uml.org.cn/pzgl/200908078.asp
2. Use mod_dav_svn to access Subversion warehouse: http://www.linuxidc .com/Linux/2013-03/81379.htm
3. (Reproduced) Install the svn server under Linux (Centos6.5) and pass: http://host.iteye.com/blog/2204867
4.CentOS6. 5. Build apache+SVN environment: http://www.centoscn.com/CentosServer/ftp/2015/0130/4600.html
5. Help centos+svn+http+ domain authentication build problem: http://bbs.scmlife.com /thread-33302-1-1.html If you
have any questions, you can privately message me.