阿里云搭建SVN服务器
来源:互联网 发布:跑步内衣 推荐 知乎 编辑:程序博客网 时间:2024/05/20 05:24
参照http://www.cnblogs.com/yun007/p/3685170.html
1:安装svn
yum install subversion
2. 开启svn服务器
svnserve -d
检查是否开启:ps aux | grep svnserve
若出现如下内容:
wkr 6537 0.0 0.0 13784 956 ? Ss 16:18 0:00 svnserve -d
wkr 7593 0.0 0.0 5784 864 pts/0 S+ 21:57 0:00 grep –color=auto svnserve
表示服务已开启。(注意:一定要有第1行,只有第2行说明服务未启动)
停止svn服务: killall svnserve
3. 建立仓库
svnadmin create /mnt/svnrepos
理论上,仓库可以建立在任何目录中。
注意:重启svnserve 执行 svnserve -d -r /mnt --listen-port 3691
这样在svn客户端checkout的时候 url需要填写
svn://ip:3691/svnrepos
如果启动的时候带如下参数:svnserve -d -r /mnt/svnrepos
客户端:svn://ip 这样子会报错。验证失败
4. 修改配置文件
编辑 svnserve.conf
vi /mnt/svnrepos/conf/svnserve.conf
把anon-access = read 改为 none,auth_access = write
password-db = passwd authz-db = authz 的注释去掉,还有[general]的注释也要去掉(这个默认没有注释)。
注:当你去掉注释的时候,不要简单的把前面的#去掉,要把前面的空格一块去掉,不然在Eclipse中使用的时候会出现配置文件格式错误的问题。
注意:如果authz-db = authz 这个注释掉了,则不需要配置/home/svnrepos/conf/authz
5. 修改帐户文件
vi /mnt/svnrepos/conf/passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
user1 = pass1 # 输入你定义的用户名和密码,密码显然没有加密
6. 修改授权文件
gedit /mnt/svnrepos/conf/authz
修改或者输入下面2行:
[svnrepos:/] ##格式为 版本库名称 + :/
user1 = rw
其中,repos1是仓库名称,user1是用户名,rw代表读写。
7.实现SVN与WEB同步,可以CO一个出来,也可以直接配在仓库中
chmod +x /mnt/svnrepos/hooks/post-commit
export LANG=en_US.UTF-8
SVN="/usr/bin/svn"
WEB="/home/wwwroot/legalhoop_svn"
$SVN update $WEB –username user1 –password pass1
- 阿里云搭建SVN服务器
- 阿里云搭建SVN服务器
- 阿里云搭建SVN服务器
- 阿里云搭建SVN服务器
- 基于阿里云服务器搭建SVN服务器
- 基于阿里云服务器搭建SVN服务器
- 阿里云服务器搭建SVN服务器
- 阿里云Ubuntu系统搭建SVN服务器
- 阿里云CentOs搭建svn服务器
- 阿里云centos7搭建svn服务器
- 阿里云服务器CentOS6.8搭建SVN服务器
- 在阿里云服务器上搭建svn服务器
- 在阿里云服务器上搭建SVN服务器
- 阿里云服务器Linux系统CentOS搭建安装svn指南
- 阿里云服务器搭建SVN教程及各种坑
- 在阿里云服务器上搭建SVN服务端
- 阿里云服务器搭建
- 阿里云服务器搭建
- Codeforces Round #395 (Div. 1) D Timofey and a flat tree (树hash)
- 判断平面内一点和三角形位置关系的算法和python语言的程序实现
- CI Weekly #14 | 如何搭建合适的持续交付开发流程?
- zookeeper原理
- MySQL 高可用架构在业务层面细化分析研究
- 阿里云搭建SVN服务器
- 错误: 找不到符号
- iOS
- 【codeforces 768C】Jon Snow and his Favourite Number
- Merge into使用详解2
- Swift & Perfect 初步搭建d
- 离开了公司,你还有什么
- [Coursera 计算导论与C语言基础] 第十周作业(下)
- C++11 auto_ptr shared_ptr unique_ptr