install svn on debian

下载debian-cd, 共8张. 放到硬盘中

 

root@lsserver:/home/debian-cd# ls -ll
总用量 5190644
-rwxr-xr-x 1 root root 675282944  6月 13 00:08 debian-7.8.0-amd64-CD-1.iso
-rwxr-xr-x 1 root root 657158144  6月 13 00:08 debian-7.8.0-amd64-CD-2.iso
-rwxr-xr-x 1 root root 679680000  6月 13 00:09 debian-7.8.0-amd64-CD-3.iso
-rwxr-xr-x 1 root root 679972864  6月 13 00:09 debian-7.8.0-amd64-CD-4.iso
-rwxr-xr-x 1 root root 612253696  6月 13 00:09 debian-7.8.0-amd64-CD-5.iso
-rwxr-xr-x 1 root root 671080448  6月 13 00:10 debian-7.8.0-amd64-CD-6.iso
-rwxr-xr-x 1 root root 662990848  6月 13 00:10 debian-7.8.0-amd64-CD-7.iso
-rwxr-xr-x 1 root root 676347904  6月 13 00:10 debian-7.8.0-amd64-CD-8.iso

 

 

用root用户登录, 建立8个文件夹, 用于挂载后的cd.

 

ls /mnt/update-sources/ -ll


dr-xr-xr-x 1 root root 4096  1月 10  2015 dir_cd1
dr-xr-xr-x 1 root root 2048  1月 10  2015 dir_cd2
dr-xr-xr-x 1 root root 2048  1月 10  2015 dir_cd3
dr-xr-xr-x 1 root root 2048  1月 10  2015 dir_cd4
dr-xr-xr-x 1 root root 2048  1月 10  2015 dir_cd5
dr-xr-xr-x 1 root root 2048  1月 10  2015 dir_cd6
dr-xr-xr-x 1 root root 2048  1月 10  2015 dir_cd7
drwxr-xr-x 2 root root 4096  7月  4 07:12 dir_cd8


建立.sh, 放到/etc/rc.local中, 开机自动挂载光盘

 

 

root@lsserver:/home/debian-cd# more ./mount-all-cd.sh
mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-1.iso /mnt/update-sources/dir_cd1
mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-2.iso /mnt/update-sources/dir_cd2
mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-3.iso /mnt/update-sources/dir_cd3
mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-4.iso /mnt/update-sources/dir_cd4
mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-5.iso /mnt/update-sources/dir_cd5
mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-6.iso /mnt/update-sources/dir_cd6
mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-7.iso /mnt/update-sources/dir_cd7
mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-8.iso /mnt/update-sources/dir_cd8

# debian-7.8.0-amd64-CD-8.iso
# mount -o loop /home/debian-cd/debian-7.8.0-amd64-CD-8.iso /mnt/update-sources/cd8

 

root@lsserver:/home/debian-cd# more /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# because only root user can mount disk
su - root -c /home/lostspeed/mount_my_disk.sh

# !!! first run vncpasswd on below user's environment to set password for vnc
su - lostspeed -c /home/lostspeed/start_vncserver.sh

# mount all cdrom to install app
# this call must on the end, else after this call will not be run
su - root -c /home/debian-cd/mount-all-cd.sh

exit 0


安装 subversion

 

 

root@lsserver:/home/debian-cd# apt-get update
apt-get install subversion

 


安装svn-tools

 

 

 

root@lsserver:/home/debian-cd# dpkg -i ./subversion-tools_1.6.17dfsg-4+deb7u8_all.deb


建立svn库目录和一个叫demo的svn库

 

 

root@lsserver:/media/data1# mkdir ./svn-rep
root@lsserver:/media/data1# ls
lost+found  svn-rep
root@lsserver:/media/data1# cd svn-rep/
root@lsserver:/media/data1/svn-rep# ls

 

建立svn库时,需要用绝对路径! 否则填入svn用户名和口令时对不上.

 

root@lsserver:/media/data1/svn-rep# svnadmin create /media/data1/svn-rep/demo_only

 

 

启动svn服务

 

 

root@lsserver:/media/data1/svn-rep# svnserve -d

 

 

杀掉svn服务(现在不需要执行)

 

root@lsserver:/media/data1/svn-rep# ps aux |grep svn
root      4997  0.0  0.0  88216   932 ?        Ss   08:17   0:00 svnserve -d
root      5001  0.0  0.0   8064   876 pts/0    S+   08:19   0:00 grep svn
root@lsserver:/media/data1/svn-rep# kill 4997
root@lsserver:/media/data1/svn-rep# ps aux |grep svn
root      5003  0.0  0.0   8064   872 pts/0    S+   08:19   0:00 grep svn
root@lsserver:/media/data1/svn-rep#

 

查找该svn库的配置文件

 

 

root@lsserver:/# find / -name svnserve.conf
/media/data1/svn-rep/demo_only/conf/svnserve.conf

 

 

修改 该svn库的几个配置文件, 都在 /conf/下

 

root@lsserver:/media/data1/svn-rep/demo_only/conf# ls
authz  passwd  svnserve.conf

 

root@lsserver:/media/data1/svn-rep/demo_only/conf# more ./authz 
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
###  - a single user,
###  - a group of users defined in a special [groups] section,
###  - an alias defined in a special [aliases] section,
###  - all authenticated users, using the '$authenticated' token,
###  - only anonymous users, using the '$anonymous' token,
###  - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').

[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average

[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

# [/foo/bar]
# harry = rw
# &joe = r
# * =

# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r

[/]
user = rw

 

root@lsserver:/media/data1/svn-rep/demo_only/conf# more ./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
user=pwd

 

root@lsserver:/media/data1/svn-rep/demo_only/conf# more ./svnserve.conf 
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)

### Visit http://subversion.tigris.org/ for more information.

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.

anon-access = read
# anon-access = read

auth-access = write
#auth-access = write

### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file.  If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
# realm = My First Repository

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256

 

 

验证是否可迁出和可提交.

 

svn://192.168.100.200/media/data1/svn-rep/demo_only

 

可以用了.安全性和可管理先不考虑.

 

 

现在还不知道怎么让svn服务开机启动, 暂时在服务器启动完成后,用putty登上去手工启动一下svn服务.

 

不知道哪里没设置, 发现这东东比Windows下搭的svnServer差多了.

版本提交后,都看不到提交后的日志. 每个版本之间diff也不好使, 说路径不可访问.

但是还是可以保持按照版本迁出.

改天再查查资料,看看人家都怎么搞的。

 

<2015-0421>

昨天搭好的svn, 看不到提交日志. 没发用啊.

刚才查到资料,搞定了.

要设置 /conf//svnserve.conf 中 anon-access = none 才行

 

root@lsserver:/media/data1/svn-rep/test-rep-fsfs/conf# more ./svnserve.conf
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)

### Visit http://subversion.tigris.org/ for more information.

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file.  If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
realm = My First Repository

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256


svnadmin create时可以选fsfs和dbd两种格式的svn库, 从使用者角度看没有区别

 

 

svnadmin create --fs-type fsfs /media/data1/svn-rep/test-rep-fsfs
svn://192.168.100.200/media/data1/svn-rep/test-rep-fsfs/

svnadmin create --fs-type bdb /media/data1/svn-rep/test-rep-dbd
svn://192.168.100.200/media/data1/svn-rep/test-rep-dbd/

 

 

 

 

 

 

 

 

 

 

 

1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看REAdMe.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看REAdMe.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看READme.md或论文文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 5、资源来自互联网采集,如有侵权,私聊博主删除。 6、可私信博主看论文后选择购买源代码。
1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。 、 1资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看READmE.文件(md如有),本项目仅用作交流学习参考,请切勿用于商业用途。 1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值