Original address: http://www.blogjava.net/rockblue1988/archive/2014/11/19/420246.aspx
Preparation: yum
1. Check whether it is installed
If you want to uninstall the old version:
2. Installation
3. Check if the installation is successful
If successful, the version number will be output
4. Create a warehouse directory
For example:
5. Create a project
6. Check if the creation is successful
ll
If successful, there will be several more folders in the game directory.
7. When you enter the conf directory, you will see 3 configuration files. The generated files have English comments.
Example requirements:
end group: open back-end reading and writing, planning read-only Front-
end group: open front-end reading and writing, planning, art read-only
Art group: open art reading and writing, planning read-only
Administrator group: all reads and writes
authz: user rights configuration
example:
group
manager = boss #Server
user group
server = server1,server2 #Client
user group
client = client1,client2 #Art
group
art = art1,art2 #Planning
group
design=design1,design2
[game:/]
@manager=rw
[game:/server]
@server=rw
[game:/client]
@client=rw
@design=r
@art=r
[game:/art]
@design=rw
@art=rw
@client=r
[game:/design]
@design=rw
@server=r
@client=r
@art=r
passwd: user password
boss=123456
server1=123456
server2=123456
client1=123456
client2=123456
art1=123456
art2=123456
design1=123456
design2=123456
svnserve.conf:
anon-access = none
#验证用户权限
auth-access = write
#密码文件地址
#password-db = /home/svn/game/passwd
#权限文件地址
#authz-db = /home/svn/game/authz
#项目名称(UUID)
realm =game
8.开放svn端口
默认是3690端口,你也可以用别的。已开启的跳过这一步
iptables -I INPUT -p tcp --dport 3690 -j ACCEPT
保存
/etc/rc.d/init.d/iptables save
重启
service iptables restart
查看
/etc/init.d/iptables status
9.启动SVN服务
-d:守护进程
-r:svn根目录
假设服务端IP为192.168.1.100,那么如下设置后game的访问目录就为:
10.安装客户端 TortoiseSVN
在客户端PC上找个目录,用管理员帐户从svn://192.168.1.100/game迁出game目录,分别新建art,design,server,client 4个子目录,然后提交。
这时候你可以用其他组的帐户测试下是否正常使用了。
12.安装好的svn服务端,默认是不会开机自启动的,每次开机自己启动会很麻烦,我们可以把它设成开机启动
首先:编写一个启动脚本svn_startup.sh,我放在/root/svn_startup.sh
/usr/bin/svnserve -d -r /home/svn/
绝对路径怎么查?
这里还有可能碰到一个问题,如果你在windows下建立和编写的脚步,拿到linux下,用vi或者vim修改后可能会无法执行,这是文件格式的问题
输入:set ff 回车
如果显示的结果不是fileformat=unix
再次输入
set ff=unix
就OK了
然后修改该脚本的执行权限
或者万能的
chmod 777 svn_startup.sh
最后:加入自动运行
在末尾添加脚本的路径,如:
/root/svn_startup.sh
现在,你可以重启一下试试了。 不懂得怎么确认成功?败给你了