HOW TO Subversion+Apache on Fedora


To learn or use Subversion, please read the book .

To install subversion run below commands:

# yum install subversion
# yum install mod_dav_svn

Then you need to setup at least one repository to test it.

Here create the folders..

# mkdir /svn
# mkdir /svn /repos
# mkdir /svn /users
# mkdir /svn /permissions

repos – will contain all the projects

users – will contain all the user configs

permissions – will contain all the user permissions

We need to give these folders the proper permissions apache user permissions so that apache can write files on repos.

# chown -R apache .apache /svn

Then you can create repository using subversion cmd svnadmin.

# svnadmin create /svn /repos/project1

You can create multiple project repos under repos folder.

To setup apache server.

You may already have this subversion config file installed in conf.d folder otherwise you can create a new apache include file that will hold all configurations.

# vi /etc/httpd/conf.d/subversion.conf

This file need to contain something like this to serve the repository through apache :


LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /svn />
DAV svn
SVNPath /svn /repos
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /svn /users/passwords
Require valid-user
AuthzSVNAccessFile /svn /permissions/svnauthz.conf

</Location>

We need to create some files so that this config will work properly. The first is htpasswd file which will contain all the usernames nad passwords which i named “/svn /users/passwords”.

# htpasswd -cb /svn /users/ passwords username password

Next you need to create the svnauth file.

# vi /svn /permissions/svnauthz.conf

Inside place a list of users who have access to files:

[/]

username = rw

The “rw” states that this user has read/write access to the root repository /.

Restart your web server and you should be done.

service httpd restart

Now you should access subversion repos as below.

http://www.websitename.com/svn /repos/

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页