目錄
配置開發環境版本控制Subversion
Squid + Subversion 請參考Squid一節
過程 13.1. subversion
installation
$ sudo apt-get install subversion$ sudo apt-get install subversion
create svn group and svnroot user
$ sudo groupadd svn $ sudo adduser svnroot --ingroup svn
create repository
$ svnadmin create /home/svnroot/test
testing
svnroot@netkiller:~$ svnserve -d --foreground -r /home/svnroot/
check out
neo@netkiller:/tmp$ svn list svn://localhost/test
you may see some file and directory
neo@netkiller:/tmp$ ls test/.svn/ entries format prop-base props text-base tmp
configure
$ vim repositories/conf/svnserve.conf
[general] anon-access = read auth-access = write password-db = passwd # authz-db = authz # realm = My First Repository
$ vim repositories/conf/passwd
[users] # harry = harryssecret # sally = sallyssecret neo = chen
如果不允許匿名用戶checkout代碼,配置檔案這樣寫anon-access = none
[general] anon-access = none auth-access = write
firewall
$ sudo ufw allow svn
# yum install xinetd # yum install subversion # mkdir -p /opt/svnroot
xinetd 配置
# vim /etc/xinetd.d/svn service svn { disable = no port = 3690 socket_type = stream protocol = tcp wait = no user = svnroot server = /usr/bin/svnserve server_args = -i -r /opt/svnroot } # /etc/init.d/xinetd restart Stopping xinetd: [FAILED] Starting xinetd: [ OK ] # tail /var/log/messages | grep xinetd May 5 18:57:20 SZVM42-C1-02 yum: Installed: 2:xinetd-2.3.14-16.el5.i386 May 5 18:59:22 SZVM42-C1-02 xinetd[4558]: Unknown user: svnroot [file=/etc/xinetd.d/svn] [line=8] May 5 18:59:22 SZVM42-C1-02 xinetd[4558]: Error parsing attribute user - DISABLING SERVICE [file=/etc/xinetd.d/svn] [line=8] May 5 18:59:22 SZVM42-C1-02 xinetd[4558]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in. May 5 18:59:22 SZVM42-C1-02 xinetd[4558]: Started working: 0 available services
service 名字必須與 /etc/services中定義的名字相同,否則將不能啟動,同時在/var/log/message中會提示如下
May 4 14:33:08 www xinetd[5656]: service/protocol combination not in /etc/services: subversion/tcp May 4 14:33:08 www xinetd[5656]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in. May 4 14:33:08 www xinetd[5656]: Started working: 0 available services May 4 14:33:33 www pulseaudio[21913]: sink-input.c: Failed to create sink input: too many inputs per sink. May 4 14:33:33 www pulseaudio[21913]: sink-input.c: Failed to create sink input: too many inputs per sink. May 4 14:33:33 www pulseaudio[21913]: sink-input.c: Failed to create sink input: too many inputs per sink. May 4 14:33:33 www pulseaudio[21913]: sink-input.c: Failed to create sink input: too many inputs per sink. May 4 14:33:33 www pulseaudio[21913]: sink-input.c: Failed to create sink input: too many inputs per sink. May 4 14:33:33 www pulseaudio[21913]: sink-input.c: Failed to create sink input: too many inputs per sink. May 4 14:33:33 www pulseaudio[21913]: sink-input.c: Failed to create sink input: too many inputs per sink. May 4 14:33:33 www pulseaudio[21913]: sink-input.c: Failed to create sink input: too many inputs per sink. May 4 14:33:41 www xinetd[5656]: Exiting... May 4 14:33:41 www xinetd[5676]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in. May 4 14:33:41 www xinetd[5676]: Started working: 1 available service