Linux SVN installation is still quite common, so I have studied the installation of Linux SVN. Here I will share it with you and hope it will be useful to you.
1. module required for Linux SVN installation: # yum install mod_dav_SVN after installation is complete, found in/etc/httpd/conf. d. subversion is added. conf, And the mod_dav_svn.so and mod_authz_svn.so files are added to/etc/httpd/modules, which is the subversion. conf.
2. Modify subversion. conf and cancel comments of several lines to make it:
- <Location /repos>
- DAV svn
- SVNParentPath /var/www/svn/
- #
- # # Limit write permission to list of valid users.
- # <LimitExcept GET PROPFIND OPTIONS REPORT>
- # # Require SSL connection for password protection.
- # # SSLRequireSSL
- #
- # AuthzSVNAccessFile /etc/httpd/authz.conf
- # AuthType Basic
- # AuthName "Please enter your name and password"
- # AuthUserFile /etc/httpd/conf.d/authfile
- # Require valid-user
- # </LimitExcept>
- </Location>
Here, ParentPath for Linux SVN installation is the upper-level directory of all Repository, and there is no restriction on accessing the Repository installed in Linux SVN, just like google code, which can be viewed without a user name or password, even the source code of checkout.
3. Create a svn/folder under/var/www/and create the subversion version repository under this directory:
$ Svnadmin create your_repo_name
4. Enter the repository and modify the configuration file, which is located in your_repo_name/conf. First modify svnserve. conf and find and remove the following comments:
- Anon-access=Read# Anonymous access permission, which can be read, write, or none. The default value is read.
- Auth-access=Write# Authenticate the user's permissions, which can be read, write, or none. The default value is write.
- Password-db=Passwd# Password Database path
- AuthzAuthz-db= Authz # user operation Permissions
5. Modify the passwd file in the following format:
- [users]
- user1 = password1
- user2 = password2
6. Modify the authz file in the format of specifying the permissions of each user for the directory under each repo_name (note that there is no space before each line ):
- [Repo_name:/directory1]
- User1=Rw# User1 has read and write permissions
- [Repo_name:/directory2]
- User2= R # user2 only has read permission
7. Use TortoiseSVN in windows to import the project:
Create an initial project file in the following three folders. Put the project root directory under trunk:
- Svn_temp \ trunk # contains the overall and stable code of the project.
- Svn_temp \ branch # contains a branch of a project, such as a sub-function
- Svn_temp \ tag # indicates a milestone of a project, such as a release.
- Then use the import function of TortoiseSVN. Permission denied may occur because the owner of the directory for uploading files is root and the owner of the Directory needs to be modified:
- Can't open file '/var/www/svn/repo_name/db/txn-current-lock': Permission denied
- $ Cd/var/www/svn
- $ Chown-R apache. apache repo_name
- # Chcon-R-t http_sys_content_rw_t repo_name # This step is not required because selinux has been disabled.
This may cause a problem. If any user knows the address for installing and downloading Linux SVN, he or she can import any file to repository. This may require the introduction of access control to be continued ).
- Access Mode for Linux SVN installation and startup
- Create a Linux SVN repository file and install and configure it
- Perform operations using the local Linux iso Image
- Linux WAS installation and preparation environment
- Linux yum powerful basic operations