Mac OS X Lion 10.7.2上配置svn服务器

0. 应用程序-->系统偏好设置-->共享-->勾选“web共享”

1. 修改httpd.conf(在Macbook下位于 /etc/apache2/httpd.conf)

添加

LoadModule dav_svn_module libexec/apache2/mod_dav_svn.so
LoadModule authz_svn_module libexec/apache2/mod_authz_svn.so
Include /private/etc/apache2/extra/httpd-svn.conf

2. 创建httpd-svn.conf文件(/etc/apache2/extra/httpd-svn.conf)

<Location /svn >
DAV svn
#SVNParentPath "/Users/cheungquentin/svnRepository"
SVNPath "/Users/cheungquentin/svnRepository"
# user authentication
AuthType Basic
AuthName "Subversion repository"
AuthUserFile "/Users/cheungquentin/svnRepository/conf/htsvn.users"
# only authenticated users may access the repository
Require valid-user
</Location>

3. 初始化SVN源码库

$ svnadmin create /Users/cheungquentin/svnRepository

4. 启动服务器。

$ svnserve -d -r /Users/cheungquentin/svnRepository
没有任何提示就说明启动成功了

5. 创建 /Users/cheungquentin/svnRepository/conf/htsvn.users文件

6. 添加用户
sudo htpasswd -c /Users/cheungquentin/svnRepository/conf/htsvn.users Quentin

7. 重启apache
sudo apachectl restart

8. 测试:
http://localhost/svn

 

PS.

svnserve的常规命令:
http://tortoisesvn.net/docs/nightly/TortoiseSVN_zh_CN/tsvn-serversetup-svnserve.html
启动(需要用root权限):
svnserve -d -r /你的代码仓库地址/
关闭/重启:lsof -i :3690 
查看svn是否启动ps aux |grep ‘svn’ 查找所有svn启动的进程id,
kill-9 3703 杀死3703这个查找到的svn进程

/Users/cheungquentin/svnRepository 权限改成读写 否则提交可能失败

转载于:https://www.cnblogs.com/iapp/archive/2012/03/05/3631829.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值