centos5.2
先安装apache php mysql pear
yum install yum install subversion mod_dav_svn
mkdir -p /var/svn/repos
更改权限,允许apache用户访问
chown x.x -R /var/svn/repos
创建版本库
svnadmin create /var/svn/repos/gamebao
修改属性为apache属主
chown 。。
下载svnmanager 在sf上最新版本1.04 1.03的似乎有问题
pear install --alldeps VersionControl_SVN-0.3.0alpha1 需要安装模块
会出现如下问题在创建新的目录的时候
svnmanager: Can't open file '/root/.subversion/servers': Permission denied
需要修改config.php
$svn_config_dir=‘/tmp';
$svn_cmd = “/usr/bin/svn --config-dir=/tmp“;
$svnadmin_cmd = “/usr/bin/svnadmin --config-dir=/tmp“;
为SVNManager创建访问用户及数据库:
#mysql –u root –p
Mysql>create database svn;
Mysql>grant all privileges on svn.* to identified by ‘[访问用户密码]’;
Mysql>flush prifileges;
Mysql>quit;
修改为配置的内容/etc/httpd/conf/httpd.conf加入以下:
DocumentRoot /var/www/svn/
ServerAdmin
ServerName svn.gamebao.net
AllowOverride None
Order deny,allow
Deny from all
Allow from all
DAV svn
SVNParentPath /var/svn/repos
AuthType Basic
AuthName "Subversion realm"
AuthUserFile /var/svn/passwdfile
AuthzSVNAccessFile /var/svn/accessfile
Require valid-user
touch /var/svn/passwdfile
#touch /var/svn/accessfile
#chown –R apache.apache passwdfile
#chown –R apache.apache accessfile
配置svnmanager
在/var/www/html/svnmanager/config.php文件中,配置相关信息,如下
$htpassword_cmd = "/usr/bin/htpasswd";
$svn_cmd = "/usr/bin/svn";
$svnadmin_cmd = "/usr/bin/svnadmin";
$svn_repos_loc = "/var/svn/repos";
$svn_passwd_file = "/var/svn/passwdfile";
$svn_access_file = "/var/svn/accessfile";
$smtp_server = "smtp.domain.org";
$dsn = "mysql://svnmanager:[password]@localhost/svn";
//Administrator account
$admin_name = "admin";
$admin_temp_password = "admin";
启动Apache、Mysql
然后就可以用了
阅读(827) | 评论(0) | 转发(0) |