1. Install SVN first
Ii. Integration of SVN and Apache
1. Create an SVN version Library
# Cd/var/www/# mkdir SVN # cd SVN # svnadmin create test1 // After SVN is installed, the root directory of the svn repository is/var/www/SVN, create a version library test1 in it
2. Modify the Apache configuration file
#vi /usr/local/apache/conf/httpd.conf
Add the following content to it:
LoadModule dav_svn_module modules/mod_dav_svn.soLoadModule authz_svn_module modules/mod_authz_svn.so<Location /svn> DAV svn SVNParentPath /var/www/svn SVNListParentPath on Order deny,allow Allow from all</Location>
3. SVN Configuration File Modification
#cd test1#vi config/authz
Add the following two lines
[/]harry = rw
#vi config/passwd
Harry = harryssecret // remove the previous line #
#vi config/svnserve.conf
Remove the following lines from the front #
anon-access = readauth-access = writepassword-db = passwdauthz-db = authz
Iii. SVN configuration in redmine
Log on to the redmine background, choose management> Project> select a project> Version library tab. Select subversion in SCM, enter the URL, and enter the login name and password (in this example, you can enter the logon name and password as, Username: Harry, password harrayssecret ). Check the project on the front-end. The version library menu is displayed. Click it to display the version library information of the project.
The above configuration is limited to HTTP URLs. If your SVN server is built with HTTPS, You need to perform the following operations.
# Vi/usr/local/redmine // enter your redmine folder # SVN ls -- config-Dir webserverredmine -- XML https://XX.XX.XXX.XXX/test1/
At this time, you will be asked to enter the user name and password, enter the correct user name and password, whether to permanently Save the SSL Certificate, and confirm. The webserverredmine directory is generated in the folder where redmine is located. The directory content is the SSL Certificate of the svn.
Modify the content of subversion_adapter.rb in the/usr/local/redmine/lib/redmine/SCM/adapters/folder.
Find:
def credentials_string str = '' str << " --username #{shell_quote(@login)}" unless @login.blank? str << " --password #{shell_quote(@password)}" unless @login.blank? || @password.blank? str << " --no-auth-cache --non-interactive " str end
Modify it:
Def credentials_string STR = ''STR <" -- username # {shell_quote (@ login)} "Unless @ login. Blank? STR <"-- password # {shell_quote (@ password)}" Unless @ login. Blank? | @ Password. Blank? STR <"-- trust-server-cert -- no-auth-Cache -- non-interactive -- config-DIR/usr/local/redmine/webserverredmine" // (note: do not add a slash to the folder at the end of the path) STR end
Restart Apache to access the version library. // Pay attention to the permissions of the webserverredmine folder.