Home >Operation and Maintenance >Linux Operation and Maintenance >SVN+Apache+IF.svnadmin supports https to implement web management SVN
Reading Contents
1. Introduction
2. Software preparation
3. Establish SVN Server warehouse
5. Start the service
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>
[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
[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
[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
[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
Under "Users"
;
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!