说明:系统为CentOS 6.0,svn的配置和安装见前面一篇文章
1. 安装php和必要的软件包
- yum groupinstall "PHP Support"
- yum install php-mysql php-mbstring
- # 安装VersionControl_SVN
- /usr/bin/pear install -f –alldeps VersionControl_SVN
2. 修改Svn父目录的权限:让apache对所有的svn目录和conf配置文件目录拥有控制权限
- chown -R apache.apache /data/subversion
3. 去官网下载svnmanager:http://svnmanager.sourceforge.net/并解压
- wget http://nchc.dl.sourceforge.net/project/svnmanager/svnmanager/1.08/svnmanager-1.08.tar.gz -P /usr/local/src
- tar zxvf /usr/local/src/svnmanager-1.08.tar.gz -C /var/www/html/
- cd /var/www/html
- mv svnmanager-1.08 svnmanager && chown -R apache.apache svnmanager
4. 配置apache
- vi /etc/httpd/conf.d/svnmanager.conf
- <Location "/var/www/html/svnmanager/">
- Order deny,allow
- Deny from all
- Allow from all
- </Location>
5. 创建数据库
- mysql -uroot -p
- > create database subversion;
- > grant all on subversion.* to subversion@'192.168.1.10' identified by 'xxxxxx';
6. 编辑配置文件
- cd /var/www/html/svnmanager
- cp config.php.linux config.php
- vi config.php
- # 设置语言
- $lang = "zh_CN.utf8";
- # 设置二进制文件的位置
- $htpassword_cmd = "/usr/bin/htpasswd";
- $svn_cmd = "/usr/bin/svn";
- $svnadmin_cmd = "/usr/bin/svnadmin";
- # 设置Svn配置文件目录,Svn的父目录,Svn的http方式的认证文件,权限控制文件
- $svn_config_dir = "/data/subversion/conf";
- $svn_repos_loc = "/data/subversion";
- $svn_passwd_file = "/data/subversion/conf/htpasswd.users";
- $svn_access_file = "/data/subversion/conf/authz";
- # 设置svn协议密码文件的位置
- $svnserve_user_file="/data/subversion/conf/passwd";
- # 设置mysql数据连接
- $dsn = "mysqli://subversion:password@192.168.1.10/subversion";
7. 重启启动apache,访问svnmanager
- service httpd restart
访问http://servername:port/svnmanager,会自动建svn的数据表,第一次登陆的用户名和密码都为admin,登陆后新建一个管理员用户,admin在第一次登陆后注销会为不可用
8. 汉化
见附件, 解压,覆盖到主目录的svnmanager子目录的文件即可
转载于:https://blog.51cto.com/linuxjcq/718245