10月 312016
 

使用SVNManager管理SVN服务及帐号权限

 

subversion mod_dav_svn

mariadb-server mariadb httpd php php-pdo php-mysql php-pear php-mbstring

pear install VersionControl_SVN-0.5.1

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
date.timezone = Asia/Shanghai

[root@localhost ~]# pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.11 stable
Console_Getopt 1.3.1 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.1 stable
[root@localhost ~]#

 

http://pear.php.net/package/VersionControl_SVN/download/0.5.1

 

curl -O http://ncu.dl.sourceforge.net/project/svnmanager/svnmanager/1.10/svnmanager-1.10.tar.gz

[root@localhost www]# mkdir -p /var/www/svntrash

[root@localhost www]# mkdir -p svnconfig

 

CREATE DATABASE svnmanager;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER on svnmanager.* to svnmanager identified by ‘secret’;
FLUSH PRIVILEGES;

 

MariaDB [(none)]> create database svnmanager;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant select,insert,update,delete,create,drop,alter on svnmanager.* to svnmanager@localhost;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> set password for svnmanager@localhost=password(‘6yhn7ujm8ik,’);
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

 

<location /svn>
DAV svn

#Repository Folders Location (make sure this folder exists
#and keep location in mind)
SVNParentPath /srv/svn/repos

AuthType Basic
AuthName “Restricted Access”

#File will be created by SVNManager, keep location in mind!
AuthUserFile /srv/svn/htpasswd

Require valid-user
#SSLRequireSSL

#File will be created by SVNManager, keep location in mind
AuthzSVNAccessFile /srv/svn/accessfile

</location>

 

$lang = “en_US.UTF-8”;

$htpassword_cmd = “/usr/bin/htpasswd”;
$svn_cmd = “/usr/bin/svn”;
$svnadmin_cmd = “/usr/bin/svnadmin”;

$svn_config_dir = “/srv/svnconfig”;
$svn_repos_loc = “/srv/svn/repos”;
$svn_passwd_file = “/srv/svn/htpasswd”;
$svn_access_file = “/srv/svn/accessfile”;

$svn_trash_loc = “/srv/svn/trash”;

$dsn = “mysqli://svnmanager:secret@localhost/svnmanager”;

$admin_name = “admin”;
$admin_temp_password = “admin”;

 

mkdir -p svn
mkdir -p svntrash
mkdir -p svnconfig
touch svn/passwd
touch svn/authz
chown -R apache.apache svn/ svnconfig/ svntrash/

 

<Location /repos>
DAV svn
SVNParentPath /var/www/svn

AuthType Basic
AuthName “Authorization SVN”

AuthzSVNAccessFile /var/www/svn/authz
AuthUserFile /var/www/svn/passwd
Require valid-user

</Location>

 

——————————-
All tables are missing.
Creating requried tables…

Please reload page!
——————————-

svnroot / …
testuser / …

helloworld / hitest

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据