SVN 服务器建立

1.建立SVN库

svnadmin create

cat svndir/conf/passwd 

修改SVN用户密码

chenht  = 123456

2.建立目录权限

[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
soft = chenht

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

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

3.启动脚本

killall svnserve
nohup svnserve -d -r /home/chenht/res/svndir &

4.设置Linux启动脚本

 

 cat /etc/init.d/svn 
#!/bin/sh

case "$1" in
start)  svnserve -d -r /home/chenht/res/svndir
        ;;
stop)   killall svnserve
        ;;
restart)$0 stop
        $0 start
        ;;
esac
exit 0

5.建立启动连接

lrwxrwxrwx 1 root root   15 Oct 18 20:32 /etc/rc0.d/K01svn -> /etc/init.d/svn
lrwxrwxrwx 1 root root   15 Oct 18 20:32 /etc/rc1.d/K01svn -> /etc/init.d/svn
lrwxrwxrwx 1 root root   15 Oct 18 20:34 /etc/rc2.d/S01svn -> /etc/init.d/svn
lrwxrwxrwx 1 root root   15 Oct 18 20:34 /etc/rc3.d/S01svn -> /etc/init.d/svn
lrwxrwxrwx 1 root root   15 Oct 18 20:34 /etc/rc4.d/S01svn -> /etc/init.d/svn
lrwxrwxrwx 1 root root   15 Oct 18 20:34 /etc/rc5.d/S01svn -> /etc/init.d/svn
lrwxrwxrwx 1 root root   15 Oct 18 20:33 /etc/rc6.d/K01svn -> /etc/init.d/svn

你可能感兴趣的:(技术概要,生活点点子,svn,服务器,运维)