作者 GitiJun 2016.12.24 17:11:00 写了58篇文章,回复33人, 安装配置svn独立服务器的步骤 阅读:1728· 评论:3· 喜欢:0 # 1. 检查系统是否已经安装如果安装就卸载 ``` # apt-get install subversion 安装 ``` # 2. 检查系统和服务进程,结束和启动 ``` # svnserve --version # netstat -ntlp # netstat -ntlp # ps aux|grep svn # ps -ef|grep svn # lsof -i:3690 # kill -9 pid ``` # 3. 建库 ``` # svnadmin create /home/user/svn/test ``` 通过ls查看创建后生成的文件三个文件:authz passwd svnserve.conf # 4. 配置 ``` # nano authz ``` ### 配置 authz文件配置 ``` [/] afa4j = rw abs = rw ``` ### 配置 passwd 账户 ``` [users] # harry = harryssecret # sally = sallyssecret afa4j = afa4j abs = abs123 ``` ### 配置访问权限 ``` [general] anon-access = none auth-access = write password-db = passwd authz-db = authz realm = /home/user/svn ``` ### 配置完成后重启服务 # 5. 客户端使用 如果客户端访问不了,需要开通防火墙 提示:端口 3690 然后client端就可以通过“svn://ip.ip.ip.ip/test”来访问svn了。 ``` svn://172.16.3.226/test ``` # 后记 尽情享用SVN吧! 其他可能需要的命令助记 ``` # apt-get install subversion 安装 # svnserve --version 查看安装的版本 # netstat -ntlp 查看svnserver是否已启动 可看到svn对应的端口3690(如果没有看见,则证明服务未启动, # svnserve -d 可使用启动svn服务, # svnserve -d -r /home/xusir/mobile 来指定启动目录) # netstat -ntlp # ps aux|grep svn # ps -ef|grep svn # lsof -i:3690 # kill -9 PID ``` 赞 | 0 赏 标签:none
cp /home/helloworld/Repository/test/conf/passwd /home/helloworld/Repository/CONFIGURATION
cp /home/helloworld/Repository/test/conf/authz /home/helloworld/Repository/CONFIGURATION
/home/helloworld/Repository/test/authz
/home/helloworld/Repository/test/passwd
password-db = /home/helloworld/Repository/CONFIGURATION/passwd
authz-db = /home/helloworld/Repository/CONFIGURATION/authz
realm = /home/helloworld/Repository/SeaWOrd
svnserve -d -r /home/helloworld/Repository/SeaWOrd --listen-port 3690
svnserve -d -r /home/helloworld/Repository/test --listen-port 3691