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/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值