一,软件准备
1.安装apache [[email protected] ~]# yum install httpd -y 2.安装svn服务器(其中,mod_dav_svn是apache服务器访问svn的一个模块) [[email protected] ~]# yum install mod_dav_svn subversion -y 3.安装完成后可以通过如下命令查看是否安装成功 [[email protected] ~]# httpd -version [[email protected] ~]# svnserve --version [[email protected] ~]# ls /etc/httpd/modules/ | grep svn mod_authz_svn.so mod_dav_svn.so
3.在apache下配置svn [[email protected] ~]# vim /etc/httpd/conf.d/subversion.conf
1 2 3 4 5 6 7 8 9 10 11 |
|
二,简历SVN server仓库
[[email protected] ~]# mkdir /var/www/svn [[email protected] ~]# svnadmin create /var/www/svn/sungeek [[email protected] ~]# ls /var/www/svn/sungeek ---> conf db format hooks locks README.txt [[email protected] ~]# chown -R apache.apache /var/www/svn 创建用户文件passwd和权限控制文件authz [[email protected] ~]# touch /var/www/svn/passwd [[email protected] ~]# touch /var/www/svn/authz
三,配置安装PHP&IF.SVNadmin
[[email protected] ~]# yum install php -y 安装配置if.svnadmin [[email protected] ~]# wget http://sourceforge.net/projects/ifsvnadmin/files/svnadmin-1.6.2.zip/download [[email protected] ~]# cd /usr/src/ [[email protected] src]# unzip iF.SVNAdmin-stable-1.6.2 [[email protected] iF.SVNAdmin-stable-1.6.2]# cp -r iF.SVNAdmin-stable-1.6.2/ /var/www/html/svnadmin [[email protected] ~]# cd /var/www/html [[email protected] html]# chown -R apache.apache svnadmin [[email protected] html]# cd /var/www/html/svnadmin [[email protected] html]# chmod -R 777 data
5.启动服务
centos 7: systemctl start httpd.service centos6: server httpd start
6,web页面会‘目录存在,无法写入’
chown -R apache.apache /var/www/svn
7,访问web管理系统(不设置会无法登陆的)
http://ip/svnadmin/
时间: 2024-10-04 12:20:49