svn and nginx部署

svn 安装方法,如果在centos 下只需要

yum install subversion

之后在你就执行 svnadmin create test

那么就在/opt/svn下生成了test的目录,这个地方就是test这个svn的配置,

 

之后就开始安装lnmp 怎么安装,学习用的话就直接 lnmp.org上命令行执行就行,一直等待,大概在10分钟左右就OK

完事之后,就在/opt/svn/test/conf目录的svnserv.conf里面配置你的信息

anon-access = read
auth-access = write

password-db = passwd

就好了

紧接着在 /opt/svn/test/conf/passwd 里面配置

[users]
# harry = harryssecret
# sally = sallyssecret
xiaozi=123456

然后配置 /opt/svn/test/hooks 里面配置钩子将post-commit.tmpl命名为post-commit文件,并且给予执行权限

接着在里面配置

#!/bin/sh
export LANG='zh_CN.UTF-8'
cd /home/wwwroot/tupian114
/usr/bin/svn cleanup
/usr/bin/svn update /home/wwwroot/www.tupian114.com --username 'xiaozi' --password '123456'

运行svn

#svnserve -d -r /opt/svn

#svn co svn://svn主机/test /opt/svn/test

然后再你的小乌龟 svn client 上开始连接,如果不成功,那么就是centos的防火墙没有放开端口 3690

然后的然后就ok了

posted on 2013-07-30 11:57  网宗  阅读(288)  评论(0编辑  收藏  举报

糗乐网-糗事|乐事|天下事