Home >Operation and Maintenance >Linux Operation and Maintenance >SVN+Apache+IF.svnadmin supports https to implement web management SVN

SVN+Apache+IF.svnadmin supports https to implement web management SVN

大家讲道理
大家讲道理Original
2017-05-28 10:28:203975browse

Reading Contents

  • 1. Introduction

  • 2. Software preparation

  • 3. Establish SVN Server warehouse

  • 4. ConfigureInstallPHP&IF.SVNadmin

  • 5. Start the service

1.Introduction Migrated to the Linux

platform; the test here was successful, so I wrote an essay to record it

What I wrote today is to build an SVN Server based on Apache and http access on CentOS7; and the implementation of IF.svnadmin web backend visual management SVN

iF.SVNAdmin

iF.SVNAdmin application is a web-based GUI for your Subversion authorization files. It is based on PHP 5.3 and requires a web server (Apache) to be installed. The application does not require a database backend or anything similar, it is entirely based on Subversion authorization and user authentication files. (+ LDAP support including users and groups)

2. Software preparation                                        

Install related software packages

<span style="font-size: 14px"><span style="color: #000000">安装过程如下:</span><span style="color: #800080">1</span><span style="color: #000000">.安装apache

[root@localhost ~]# yum install httpd </span>-<span style="color: #000000">y</span><span style="color: #800080">2</span><span style="color: #000000">.安装svn服务器(其中,mod_dav_svn是apache服务器访问svn的一个模块)

[root@localhost ~]# yum install mod_dav_svn subversion </span>-<span style="color: #000000">y<br><br></span>3.安装完成后可以通过如下命令查看是否安装成功</span>
<span style="font-size: 14px">[root@localhost ~]# httpd -version</span><br><br><span style="font-size: 14px">[root@localhost ~]# svnserve --version</span>


<span style="font-size: 14px">[root@localhost ~]# ls /etc/httpd/<a href="http://www.php.cn/code/8212.html" target="_blank">module</a>s/ | grep svn</span><br><br><span style="font-size: 14px">mod_authz_svn.so </span>
mod_dav_svn.so


<span style="font-size: 14px"><span style="color: #800080">3</span><span style="color: #000000">.在apache下配置svn <br><br></span></span>
[root@localhost ~]# vim /etc/httpd/conf.d/subversion.conf


<span style="font-size: 14px">LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNParentPath /var/www/svn   #svn的根目录<br/>SSL<a href="http://www.php.cn/wiki/136.html" target="_blank">Require</a>SSL                #SSL访问权限
AuthType Basic               #Basic认证方式
AuthName "Authorization SVN"   #认证时显示的信息
AuthUser<a href="http://www.php.cn/wiki/1313.html" target="_blank">File</a> /var/www/svn/passwd      #用户文件&密码
AuthzSVNAccessFile /var/www/svn/authz  #访问权限控制文件
Require valid-user            #要求真实用户,不能匿名
</Location></span>



3. Establish SVN Server warehouse                                                                                                                                   ’   ’     ’           ’ s ’s ’s’ Serv’s ’ ’s ’ ‐   ‐ ‐ ‐                                                                          Prepare the directory for the warehouse. This directory can contain multiple code warehouses

[root@localhost ~]# mkdir /var/www/svn

[root@localhost ~]# svnadmin create /var/www/svn/sungeek
[root@localhost ~]# ls /var/www/svn/sungeek             --->  conf  db  format  hooks  locks  README.txt
[root@localhost ~]# chown -R apache.apache /var/www/svn

创建用户文件passwd和权限控制文件authz
[root@localhost ~]# touch /var/www/svn/passwd 

[root@localhost ~]# touch /var/www/svn/authz


4. Configure and install PHP&IF.SVNadmin                                                                                                                                             


5. Start the service                                                                                                                                                                                           

[root@localhost ~]# yum install php -y

安装配置if.svnadmin

[root@localhost ~]# wget http://sourceforge.net/projects/ifsvnadmin/files/svnadmin-1.6.2.zip/download[root@localhost ~]# cd /usr/src/[root@localhost src]# unzip iF.SVNAdmin-stable-1.6.2[root@localhost iF.SVNAdmin-stable-1.6.2]# cp -r iF.SVNAdmin-stable-1.6.2/ /var/www/html/svnadmin
[root@localhost ~]# cd /var/www/html
[root@localhost html]# chown -R apache.apache svnadmin
[root@localhost html]# cd /var/www/html/svnadmin
[root@localhost html]# chmod -R 777 data

By viewing the file /usr/lib/systemd/system/svnserve.service, we learned about the

configuration file of svnserver

Yes/etc/sysconfig/svnserve
Modify /etc/sysconfig/svnserve


[root@localhost ~]# firewall-cmd --permanent --add-service=http
[root@localhost ~]# firewall-cmd --permanent --add-service=https
[root@localhost ~]# firewall-cmd --reload 

Enable the service through the following command

[root@localhost ~]# vim /etc/sysconfig/svnserve
OPTIONS="-r /var/svn"     ======> OPTIONS="-r /var/www/svn" 


The following command makes it start automatically at boot

[root@localhost ~]# systemctl start httpd.service


Restart Apache


[root@localhost ~]# systemctl enable httpd.service


After starting the webserver service, enter http://ip/svnadmin as the browser address and the configuration will appear Interface, enter the configuration information in the picture below. After entering each configuration information, you can click Test next to test whether the input is correct. Finally, save the configuration



# #After saving, you will be prompted that the default account is admin/admin.

After logging in, we can "add" under "Repositories" to add the project directory;


Under "Users"

Add users

;

In Associate the user of the corresponding project under "Access-Paths" and assign relevant read and write permissions.

The above is the detailed content of SVN+Apache+IF.svnadmin supports https to implement web management SVN. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn