linux svn 服务端搭建
2016-07-21 23:29
567 查看
环境是centos6.x。 关于团队对代码管理,相信大部分人习惯于svn。不过我个人比较喜欢git的。这个blog git 常用命令 就是介绍git的基本用法。现部署svn服务端方式如下:
1. 用yum安装如下:
yum install subversion
2. 输入 svn --help可以查看svn的使用方法.
usage: svn <subcommand> [options] [args]
Subversion command-line client, version 1.6.11.
Type 'svn help <subcommand>' for help on a specific subcommand.
Type 'svn --version' to see the program version and RA modules
or 'svn --version --quiet' to see just the version number.
Most subcommands take file and/or directory arguments, recursing
on the directories. If no arguments are supplied to such a
command, it recurses on the current directory (inclusive) by default.
Available subcommands:
add
blame (praise, annotate, ann)
cat
changelist (cl)
checkout (co)
cleanup
commit (ci)
copy (cp)
delete (del, remove, rm)
diff (di)
export
help (?, h)
import
info
list (ls)
lock
log
merge
mergeinfo
mkdir
move (mv, rename, ren)
propdel (pdel, pd)
propedit (pedit, pe)
propget (pget, pg)
proplist (plist, pl)
propset (pset, ps)
resolve
resolved
revert
status (stat, st)
switch (sw)
unlock
update (up)
Subversion is a tool for version control.
For additional information, see http://subversion.tigris.org/
3. 创建svn版本库目录
mkdir -p /var/svn/svnrepos
4. 创建版本库
svnadmin create /var/svn/svnrepos
得到目录如下:
drwxr-xr-x 2 root root 4096 Jan 20 18:13 conf
drwxr-sr-x 6 root root 4096 Jan 20 18:06 db
-r--r--r-- 1 root root 2 Jan 20 18:06 format
drwxr-xr-x 2 root root 4096 Jan 20 18:06 hooks
drwxr-xr-x 2 root root 4096 Jan 20 18:06 locks
-rw-r--r-- 1 root root 229 Jan 20 18:06 README.txt
5. svn的相关配置在conf下
authz文件是权限控制文 件
passwd是帐号密码文件
svnserve.conf SVN服务配置文件
6. 设置帐号密码
打开passwd文件
在[users]块中添 加用户和密码,格式:帐号=密码,如llz=llz
7. 设置权限
打开authz 文件
在末尾添加如下代码:
[/]
llz=rw # 有读写权限
carlos=r # 有读权限
8. 修改svnserve.conf文件
修改如下:
打开下面的几个注释:
anon-access = read #匿名用户可读
auth-access = write #授权用户可写
password-db = passwd #使用哪个文件作为账号文件
authz-db = authz #使用哪个文件作为权限文件
realm = /var/svn/svnrepos # 认证空间名,版本库所在目录
9. 启动svn版本库
svnserve -d -r /var/svn/svnrepos
1. 用yum安装如下:
yum install subversion
2. 输入 svn --help可以查看svn的使用方法.
usage: svn <subcommand> [options] [args]
Subversion command-line client, version 1.6.11.
Type 'svn help <subcommand>' for help on a specific subcommand.
Type 'svn --version' to see the program version and RA modules
or 'svn --version --quiet' to see just the version number.
Most subcommands take file and/or directory arguments, recursing
on the directories. If no arguments are supplied to such a
command, it recurses on the current directory (inclusive) by default.
Available subcommands:
add
blame (praise, annotate, ann)
cat
changelist (cl)
checkout (co)
cleanup
commit (ci)
copy (cp)
delete (del, remove, rm)
diff (di)
export
help (?, h)
import
info
list (ls)
lock
log
merge
mergeinfo
mkdir
move (mv, rename, ren)
propdel (pdel, pd)
propedit (pedit, pe)
propget (pget, pg)
proplist (plist, pl)
propset (pset, ps)
resolve
resolved
revert
status (stat, st)
switch (sw)
unlock
update (up)
Subversion is a tool for version control.
For additional information, see http://subversion.tigris.org/
3. 创建svn版本库目录
mkdir -p /var/svn/svnrepos
4. 创建版本库
svnadmin create /var/svn/svnrepos
得到目录如下:
drwxr-xr-x 2 root root 4096 Jan 20 18:13 conf
drwxr-sr-x 6 root root 4096 Jan 20 18:06 db
-r--r--r-- 1 root root 2 Jan 20 18:06 format
drwxr-xr-x 2 root root 4096 Jan 20 18:06 hooks
drwxr-xr-x 2 root root 4096 Jan 20 18:06 locks
-rw-r--r-- 1 root root 229 Jan 20 18:06 README.txt
5. svn的相关配置在conf下
authz文件是权限控制文 件
passwd是帐号密码文件
svnserve.conf SVN服务配置文件
6. 设置帐号密码
打开passwd文件
在[users]块中添 加用户和密码,格式:帐号=密码,如llz=llz
7. 设置权限
打开authz 文件
在末尾添加如下代码:
[/]
llz=rw # 有读写权限
carlos=r # 有读权限
8. 修改svnserve.conf文件
修改如下:
打开下面的几个注释:
anon-access = read #匿名用户可读
auth-access = write #授权用户可写
password-db = passwd #使用哪个文件作为账号文件
authz-db = authz #使用哪个文件作为权限文件
realm = /var/svn/svnrepos # 认证空间名,版本库所在目录
9. 启动svn版本库
svnserve -d -r /var/svn/svnrepos
相关文章推荐
- linux操作系统上的gz, bz2, xz, zip, 格式的压缩命令以及tar用法
- linux 下 mysql 安装(不用编译的方式)
- linux下执行mysql的sql文件
- Linux中的消息队列
- Linux 的 NUMA 技术
- linux文件系统管理
- linux常见指令及时间戳
- linux常用命令(一):目录处理命令
- 简记:一次修复CentOS7因卸载多余内核后引起启动文件丢失及其后续问题的过程
- CentOS7安装gtk+2.0和mysql及环境配置
- LinuxC编程实战学习——第六章文件操作
- weblogic安装注意事项_linux
- linux系统常用命令
- lamp
- Linux学习_信号
- ubuntu 14.04 linux下wifi驱动安装使用的一些笔记
- Linux学习笔记--命令的顺序执行、管道符、通配符、其他特殊符号
- linux命令详解之useradd命令使用方法
- Spark在Linux下集群的搭建
- 初窥Linux 之 我最常用的20条命令