Subversion 安装配置
先更改一下我的系统时间,由于虚拟机每次都暂停,所以时间不对!
[root@kinggoo ~]# date -s "04/05/2011 11:44:00" && hwclock –systohc
[root@kinggoo ~]# reboot
tar -zxvf apr-1.4.2.tar.gz -C /usr/local/src
tar -zxvf apr-iconv-1.2.1.tar.gz -C /usr/local/src
tar -zxvf apr-util-1.3.10.tar.gz -C /usr/local/src
tar -zxvf db-4.7.25.tar.gz -C /usr/local/src[root@kinggoo src]# mkdir /usr/local/apr
[root@kinggoo src]# mkdir /usr/local/apr-iconv
[root@kinggoo src]# mkdir /usr/local/apr-util
[root@kinggoo src]# mkdir /usr/local/bdb[root@kinggoo apr-1.4.2]# ./configure –prefix=/usr/local/apr && make && make install
[root@kinggoo apr-1.4.2]# vim /etc/ld.so.conf
添加 /usr/local/apr/lib
[root@kinggoo apr-1.4.2]# ldconfig -v
有下面信息说明加载成功
/usr/local/apr/lib:
libapr-1.so.0 -> libapr-1.so.0.4.2
[root@kinggoo apr-iconv-1.2.1]# ./configure –prefix=/usr/local/apr-iconv –with-apr=/usr/local/apr/bin/apr-1-config && make && make install
[root@kinggoo apr-iconv-1.2.1]# vim /etc/ld.so.conf
添加 /usr/local/apr-iconv/lib
[root@kinggoo apr-iconv-1.2.1]# ldconfig -v
有下面信息说明加载成功
/usr/local/apr-iconv/lib:
libapriconv-1.so.0 -> libapriconv-1.so.0.2.1
[root@kinggoo build_unix]# ../dist/configure –prefix=/usr/local/bdb
[root@kinggoo build_unix]# vim /etc/ld.so.conf
添加 /usr/local/bdb/lib
[root@kinggoo build_unix]# ldconfig -v
有下面信息说明加载成功
/usr/local/bdb/lib:
libdb-4.7.so -> libdb.so
[root@kinggoo apr-util-1.3.10]# vim /etc/profile
在下面添加
DB_HOME=/usr/local/bdb
PATH=$PATH:$JAVA_HOME$DB_HOME/lib:$DB_HOME/include
[root@kinggoo apr-util-1.3.10]# ./configure –prefix=/usr/local/apr-util –with-apr=/usr/local/apr/bin/apr-1-config –with-iconv=/usr/local/apr-iconv –with-berkeley-db=/usr/local/bdb && make && make install[root@kinggoo apr-util-1.3.10]# vim /etc/ld.so.conf
添加 /usr/local/apr-util/lib
[root@kinggoo apr-util-1.3.10]# ldconfig -v
有下面信息说明加载成功
/usr/local/apr-util/lib:
libaprutil-1.so.0 -> libaprutil-1.so.0.3.10
重新编译apache,将apr、apr-util编译进去
[root@kinggoo httpd-2.2.9]# ./configure –prefix=/usr/local/apache2/ –sysconfdir=/etc/httpd –with-included-apr –disable-userdir –with-apr=/usr/local/apr/bin/apr-1-config –with-apr-util=/usr/local/apr-util/bin/apu-1-config –with-z=/usr/local/zlib/ –enable-maintainer-mode –enable-deflate=shared –enable-expires=shared –enable-ssl –enable-static-support –enable-dav –enable-rewrite=shared –enable-so &&make &&make install
重新启动httpd服务,访问http://ip,看是否运行正常
[root@kinggoo subversion-1.6.16]# ./configure –prefix=/usr/local/subversion –with-apxs=/usr/local/apache2/bin/apxs –with-apr=/usr/local/apr/bin/apr-1-config –with-apr-util=/usr/local/apr-util/bin/apu-1-config –with-ssl –with-zlib=/usr/local/zlib/ –enable-maintainer-mode && make && make install
[root@kinggoo ~]# /usr/local/subversion/bin/svnadmin –version
svnadmin,版本 1.6.16 (r1073529)
编译于 Apr 5 2011,14:26:40
版权所有 (C) 2000-2009 CollabNet。
Subversion 是开放源代码软件,请参阅 http://subversion.apache.org/ 站点。
此产品包含由 CollabNet (http://www.Collab.Net/) 开发的软件。
下列版本库后端(FS) 模块可用:
* fs_base : 模块只能操作BDB版本库。
* fs_fs : 模块与文本文件(FSFS)版本库一起工作。
————————————–
[root@kinggoo ~]# /usr/local/subversion/bin/svnadmin create test –fs-type bdb
[root@kinggoo ~]# chmod -R 777 test
[root@kinggoo ~]# /usr/local/subversion/bin/svnserve -d -r test #库的路径
[root@kinggoo ~]# ps -fe |grep svn #查看是否启动
[root@kinggoo ~]# netstat -ant | grep 3690 #查看端口是否启用
编辑apache的配置文件httpd.conf
<Location /svn>
DAV svn
SVNlistParentPath on
SVNParentPath /var/local/svnroot
#SVNPath /var/local/test
AuthzSVNAccessFile /var/local/svn_conf/authz.conf
AuthType Basic
AuthName "Subversion"
AuthUserFile /var/local/svn_conf/passwd.conf
Require valid-user
</Location>
创建个保存权限配置的文件【双库的配置】
mkdir /var/local/svn_conf
创建配置文件 touch /var/local/svn_conf/authz.conf
[root@kinggoo svn_conf]# cat authz.conf
[groups]
admin = liuxue
[/]
* = r
[test:/]
@admin = rw
*=[platform:/]
platform = rw
@admin = r
test = r
*=
—————————————
创建访问用户帐号
/usr/local/apache2/bin/htpasswd -cm /var/local/svn_conf/passwd.conf test(用户名)
接着会提示让输入密码
都OK后重启apache服务
并启动svnserve -d -r /var/local/svnroot
如果已启用,可以将其结束掉~一个好方法 kill -9 `/sbin/pidof svnserve`就可以结束掉,之前写了个vsftp启动脚本就是用这方法实现的!简单可靠~~当然也有可能出问题,但我还没发现!
启动库的时候,我将配置文件路径加上了!
svnserve –config-file /var/local/svn_conf/authz.conf -d -r /var/local/svnroot
出现错误
重新启动apache发现出错
Syntax error on line 423 of /etc/httpd/httpd.conf:
Invalid command ‘SVNParenPath’, perhaps misspelled or defined by a module not included in the server configuration
这个问题,很简单,是我拼写错误,少写了一个“t”,SVNParentPath
The requested URL /svn was not found on this server.
thx.
Oh my goodness! Impressive article dude! Thanks, However I am experiencing difficulties with your RSS. I don’t understand why I cannot join it. Is there anyone else having the same RSS issues? Anybody who knows the answer can you kindly respond? Thanx!!
thx.
Try this RSS, //kinggoo.com/feed
He can help you gather any other paperwork you need, go through
everything in search of the red flag that caught the IRS’s attention, and prepare for the audit proceedings. If your manual for the Sharp register has been misplaced, a new one does not need to be ordered directly from the manufacturers. You should reconcile your accounts on everyday basis and do not store it up.
不懂
Awesome post, I am going to spend more time a little bit of research but this has helped me out. Thank you. Time to head back to this amazing beach!