`
fujinbing
  • 浏览: 233454 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
阅读更多
推荐一些不错的电子书:http://www.memeshu.com

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

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


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  下载到 http://subversion.tigris.org

     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>





分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics