安装 svn

推荐一些不错的电子书:[url]http://www.memeshu.com[/url]

svn安装需要 APR 库,APR-util 库 APACHE库
所以安装svn 前需要 确保安装 APR,APR-util,APACHE

1.安装 APR 我选择 apr-1.3.8 尽量安装 高版本 到 [url]http://apr.apache.org/[/url]下载


tar zxvf apr-1.3.8.tar.gz
cd apr-1.3.8
./configure

make

make install

tar zxvf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --with-apr=/usr/local/apr/

make

make install

2.编译安装APACHE httpd-2.2.11.tar.gz

tar zxvf httpd-2.2.11.tar.gz
cd httpd-2.2.11
./configure --prefix=/opt/apache --enable-dav --enable-so --enable-maintainer-mode --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config

make
make install

3.安装subversion-1.6.6 下载到 [url]http://subversion.tigris.org[/url]

tar zxvf subversion-1.4.0.tar.gz

./configure --with-apxs=/opt/apache/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr

make

make install


配置 svn

一、普通配置方式

1.创建仓库
mkdir -p /data/svndata/repos
svnadmin create /data/svndata/repos
2.修改 配置文件
/data/svndata/repos/conf/svnserve.conf

[general]
anon-access = none
auth-access = write
password-db = passwd

/data/svndata/repos/conf/passwd
[users]
jking = jking

3.启动

svnserve -d -r /data/svndata/repos
默认端口 3690
--listen-port 为指定的端口 svnserve -d -r /data/svndata/repos --listen-port 9999

防火墙上开放这个端口。
/sbin/iptables -A INPUT -i eth0 -p tcp --dport 3690 -j ACCEPT
/sbin/service iptables save

二、apache配置方式

1.创建密码文件
/opt/apache/bin/htpasswd -cm /data/svn/conf/passwd admin
/opt/apache/bin/htpasswd -m /data/svn/conf/passwd admin1
/opt/apache/bin/htpasswd -m /data/svn/conf/passwd admin2

2.修改权限文件 /data/svn/conf/authz.conf

[groups]
#<groupname1>=<username1>,<username2>
group1=admin,admin1

#[<versionLib>:projectName/directory]
#@<groupsname>=<authorities>
#<username>=<authorities>

#group1中所有用户对根目录下有读写权限
[/]
@group1= rw

#admin2用户对repos目录下有读写权限
[repos:/]
admin2= rw

2.配置 apache 修改 /app/soft/apache2.2.11/conf/httpd.conf

<Location /svn>
DAV svn
# SVNPath /data/svndata
SVNParentPath /data/svndata
AuthzSVNAccessFile /data/svn/conf/authz.conf
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /data/svn/conf/passwd.conf
Require valid-user
</Location>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值