Category: Linux
Linux SVN installation is still more commonly used, so I studied the Linux svn installation, here to take out and share with you, hope to be useful to everyone.
1. Linux SVN installation Required module: #yum install MOD_DAV_SVN installed, found that/etc/httpd/conf.d under the subversion.conf, and/ETC/HTTPD/ Modules out of the mod_dav_svn.so and mod_authz_svn.so two files, which is exactly what is needed in subversion.conf.
2. Modify the subversion.conf, and cancel the comments for a few 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>
Among them, Linux SVN installs Parentpath is the upper directory of all repository, here does not have to access the Linux SVN installs the repository to restrict, just like Google Code, does not need the user name password to be able to view, Even checkout source code.
3. Create a svn/folder under/var/www/and create the Subversion repository in this directory:
$ svnadmin Create Your_repo_name
4. Enter the repository, modify the configuration file, under Your_repo_name/conf, first modify the svnserve.conf, find and remove the following lines of comments:
- anon-access = read #匿名访问的权限, can be read,write,none, default is read
- auth-access = Write #认证用户的权限, can be read,write,none, default is write
- password-db = passwd #密码数据库的路径
- Authzauthz-db = Authz #用户操作权限
5. Modify the passwd file in the following format:
- [Users]
- User1 = Password1
- User2 = Password2
6. Modify the Authz file in the format: for each directory under Repo_name, specify what permissions each user should have (note that there can be no spaces before each line):
- [Repo_name:/directory1]
- User1 = rw #user1具有read和write权限
- [Repo_name:/directory2]
- User2 = R #user2只具有read权限
7. Import the project with TORTOISESVN under Windows:
The project initial file is built into the form containing the following three folders, where the project root directory is placed under the trunk:
- Svn_temptrunk #包含项目整体的, stable code
- Svn_tempbranch #包含项目的一个分支, such as a sub-function
- Svn_temptag #标志项目的一个milestone, such as a release
- Then using the import function of TortoiseSVN, there may be a problem with permission denied, because the owner of the directory where the files are uploaded 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-t http_sys_content_rw_t repo_name #这一步不需要 because SELinux has been turned off
This may be a problem, if any user know the Linux svn installation download address, you can import any file into repository. This may require the introduction of access control (to be continued). [@[email protected]]
The folder to be created for Linux SVN installation (GO)