系统管理 维护监控 简单生活
技术实践
Install usvn on centos
九 24th
一.了解认识
Userfriendly SVN (USVN) 是一个基于 Web 的 Subversion 资源库的配置工具,通过 USVN 可以创建新的项目,管理授权用户列表等功能。
User-Friendly USVN is a web interface written in PHP used to configure Subversion repositories.It's goal is to ease the creation of new projects without having to use the command line interface, therefor, maybe without privileged access to the server. USVN will then generate the list of users allowed to access your source code. This enable the delegation of rights to administrate Subversion repositories.
项目主页: http://www.usvn.info/
本节主要讲如何配置usvn,并不深入学习usvn的使用。
在安装和使用usvn之前,你需要
1.对svn有一定的了解, svn book (pdf 版)
2.需要apache2 及成功开启apache2的mod_dav_svn mod_rewrite
3.一个装好的subversion,且apache2能成功加载mod_svn mod_authz_svn
二.准备工作
1.install lamp (centos4.7+apache2.2.10+mysql5.1.30+php5.2.6)
参考: LAMP安装
注意:安装并正确加载mod_svn模块apache需要另加mod_dav,mod_dav_fs 两个模块. 参考如下
"./configure" "--prefix=/usr/local/apache2" "--enable-static-support" "--enable-static-htpasswd" "--enable-static-htdigest" "--enable-static-rotatelogs" "--enable-static-logresolve" "--enable-static-ab" "--enable-static-checkgid" "--enable-so" "--enable-authz-host" "--enable-mime" "--enable-dir" "--enable-log-config" "--disable-authn-file" "--disable-authn-default" "--disable-authz-groupfile" "--disable-authz-user" "--disable-authz-default" "--disable-auth-basic" "--disable-include" "--disable-filter" "--disable-charset-lite" "--disable-env" "--enable-autoindex" "--disable-asis" "--disable-cgid" "--enable-cgi" "--enable-negotiation=shared" "--enable-actions=shared" "--enable-alias" "--enable-rewrite" "--enable-deflate" --enable-dav --enable-dav-fs
否则:启动apache时会报错误
2.install svn 和svn和整合
详细方法参考:http://www.ibm.com/developerworks/cn/java/j-lo-apache-subversion/
本例中的安装简要如下:
# download the necessary files wget http://subversion.tigris.org/downloads/subversion-1.6.5.tar.bz2 wget http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz # untar the downloaded file tar zxvf sqlite-amalgamation-3.6.13.tar.gz tar jxvf subversion-1.6.5.tar.bz2 # create a "sqlite-amalgamation" Directory in subversion-1.6.5 # copy the ../sqlite-3.6.13/sqlite3.c nto subversion-1.6.5/sqlite-amalgamation mkdir -p sqlite-amalgamation cp ../sqlite-3.6.13/sqlite3.c ./sqlite-amalgamation # Compile and install ./configure --prefix=/usr/local/svn --with-apxs=/usr/local/apache2/bin/apxs make &&make install # export svn path variables in you Environment export PATH=$PATH:/usr/local/svn/bin/
### 一些对svn的测试########## mkdir /usr/local/svn/repos svnadmin create --fs-type fsfs /usr/local/svn/repos/ svn list --verbose file:///usr/local/svn/repos/ svn import /etc/sysconfig/grub file:///usr/local/svn/repos/ --message "init" ###########################
三.安装usvn
1.下载文件并解压到一个目录,如本例中/usr/local/apache2/htdocs/usvn-1.0
cd /usr/local/apache2/htdocs wget http://usvn.tigris.org/files/documents/5823/46665/usvn-1.0.0.zip unzip usvn-1.0.0.zip ______________________________________ cd usvn-1.0 [root@study usvn-1.0]# pwd /usr/local/apache2/htdocs/usvn-1.0 ______________________________________
2.添加apache的alias用于web访问,
cat << END >>/usr/local/apache2/conf/httpd.conf Alias /usvn "/usr/local/apache2/htdocs/usvn-1.0/public" <Directory "/usr/local/apache2/htdocs/usvn-1.0/public"> Options Indexes Includes FollowSymLinks MultiViews ExecCGI AllowOverride all Order allow,deny Allow from all </Directory> END
3.重启apache2
4.http://server/usvn 进入安装system check页面.根据提示来做就可以.

有两个注意:
1. 权限修改完后要修改回来. 可以参考如下
安装前
cd usvn-1.0
chmod a+w ./*
安装完后
cd ../usvn-1.0
chmod a-w ./*
2.如果提示找不到svn 可以进行如下操作.

cd /usr/local/bin
ln -s /usr/local/svn/bin/* ./
3.更详细,更深的安装请参考: https://trac.usvn.info/wiki/Documentation/Install


最新评论